Fix: Remove temperature readings for ESP32-S2 modules

For some reasons this leads to WDT resets on this kind of module.
This is just a workaround until another solution is found.
This commit is contained in:
Thomas Basler 2024-12-14 12:36:50 +01:00
parent 726a08ec2c
commit 2edec642fb

View File

@ -19,6 +19,12 @@ CpuTemperatureClass CpuTemperature;
float CpuTemperatureClass::read() float CpuTemperatureClass::read()
{ {
#ifdef CONFIG_IDF_TARGET_ESP32S2
// Disabling temperature reading for ESP32-S2 models as it might lead to WDT resets.
// See: https://github.com/espressif/esp-idf/issues/8088
return NAN;
#endif
std::lock_guard<std::mutex> lock(_mutex); std::lock_guard<std::mutex> lock(_mutex);
float temperature = NAN; float temperature = NAN;