Skip to content

Commit ce6e778

Browse files
committed
Fixed the Arduino esp32 link error by ensuring the legacy temp sensor code only compiles when the sensor is actually available
1 parent efe6e16 commit ce6e778

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/esp_cpu_monitor/cpu_monitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ bool ESPCpuMonitor::initTemperatureSensor() {
397397
return false;
398398
}
399399
return true;
400-
#elif ESPCM_HAS_TEMP_SENSOR_OLD
400+
#elif ESPCM_TEMP_SENSOR_AVAILABLE && ESPCM_HAS_TEMP_SENSOR_OLD
401401
temp_sensor_config_t cfg = TSENS_CONFIG_DEFAULT();
402402
esp_err_t err = temp_sensor_set_config(cfg);
403403
if (err != ESP_OK) {

0 commit comments

Comments
 (0)