diff --git a/src/dev/esp32/esp32.cpp b/src/dev/esp32/esp32.cpp index 0904f7c0..67775ac7 100644 --- a/src/dev/esp32/esp32.cpp +++ b/src/dev/esp32/esp32.cpp @@ -20,7 +20,9 @@ #define BACKLIGHT_CHANNEL 0 +#ifndef ESP32S2 uint8_t temprature_sens_read(); +#endif namespace dev { @@ -304,9 +306,11 @@ void Esp32Device::get_info(JsonDocument& doc) void Esp32Device::get_sensors(JsonDocument& doc) { +#ifndef ESP32S2 JsonObject sensor = doc.createNestedObject(F("ESP32")); uint32_t temp = (temprature_sens_read() - 32) * 100 / 1.8; sensor[F("Temperature")] = serialized(String(1.0f * temp / 100, 2)); +#endif } long Esp32Device::get_uptime() diff --git a/src/dev/esp32/esp32.h b/src/dev/esp32/esp32.h index 0e936da4..bab1d6de 100644 --- a/src/dev/esp32/esp32.h +++ b/src/dev/esp32/esp32.h @@ -13,7 +13,9 @@ extern "C" { #endif +#ifndef ESP32S2 uint8_t temprature_sens_read(); +#endif #ifdef __cplusplus }