Fix internal temperature reading on ESP32 (#1391)
The previous macro used SENS_SAR_MEAS_WAIT2_REG to identify if we have the reading capability was not working, so replacing it by a fresh one NO_INT_TEMP_READING, defined as a negation due to the fact that most of the ESP32 supports internal temperature reading.
This commit is contained in:
1 parent
ad97e9a677
commit
76b5e9269f
5 files changed
+8
-6
No files matched your search
@@ -107,7 +107,7 @@ void MQTTtoONOFF(char* topicOri, char* datacallback) {
|
||||
//Check regularly temperature of the ESP32 board and switch OFF the relay if temperature is more than MAX_TEMP_ACTUATOR
|
||||
# ifdef MAX_TEMP_ACTUATOR
|
||||
void OverHeatingRelayOFF() {
|
||||
# if defined(ESP32) && defined(SENS_SAR_MEAS_WAIT2_REG) // This macro is necessary to retrieve temperature and not present with S3 and C3 environment
|
||||
# if defined(ESP32) && !defined(NO_INT_TEMP_READING)
|
||||
if (millis() > (timeinttemp + TimeBetweenReadingIntTemp)) {
|
||||
float internalTempc = intTemperatureRead();
|
||||
Log.trace(F("Internal temperature of the ESP32 %F" CR), internalTempc);
|
||||
|
||||
Reference in new issue
Block a user