mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-17 15:56:30 +00:00
Merge pull request #16250 from Jason2866/S3_TempSens
S3 Temp sensor support
This commit is contained in:
commit
b59cd41d37
@ -656,16 +656,12 @@ float CpuTemperature(void) {
|
|||||||
return t;
|
return t;
|
||||||
*/
|
*/
|
||||||
#else
|
#else
|
||||||
#ifndef CONFIG_IDF_TARGET_ESP32S3
|
|
||||||
// Currently (20210801) repeated calls to temperatureRead() on ESP32C3 and ESP32S2 result in IDF error messages
|
// Currently (20210801) repeated calls to temperatureRead() on ESP32C3 and ESP32S2 result in IDF error messages
|
||||||
static float t = NAN;
|
static float t = NAN;
|
||||||
if (isnan(t)) {
|
if (isnan(t)) {
|
||||||
t = (float)temperatureRead(); // In Celsius
|
t = (float)temperatureRead(); // In Celsius
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
#else
|
|
||||||
return NAN;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
#ifdef USE_ESP32_SENSORS
|
#ifdef USE_ESP32_SENSORS
|
||||||
#ifndef CONFIG_IDF_TARGET_ESP32S3
|
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
* ESP32 CPU Temperature and optional Hall Effect sensor
|
* ESP32 CPU Temperature and optional Hall Effect sensor
|
||||||
*
|
*
|
||||||
@ -139,7 +138,5 @@ bool Xsns127(uint8_t function) {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // Not CONFIG_IDF_TARGET_ESP32S3
|
|
||||||
#endif // USE_ESP32_SENSORS
|
#endif // USE_ESP32_SENSORS
|
||||||
#endif // ESP32
|
#endif // ESP32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user