Skip to content

Commit

Permalink
Revert change that removed ESP32 temperature sensor - fix #2585
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Dec 18, 2024
1 parent 79aeaf6 commit 9cd8d5b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions targets/esp32/jshardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,13 @@ bool jshIsDeviceInitialised(IOEventFlags device) {

// the esp32 temperature sensor - undocumented library function call. Unsure of values returned.
JsVarFloat jshReadTemperature() {
#if CONFIG_IDF_TARGET_ESP32
extern uint8_t temprature_sens_read();
return temprature_sens_read();
#else
jsError(">> jshReadTemperature Not implemented");
return NAN;
#endif
}

// the esp8266 can read the VRef but then there's no analog input, so we don't support this
Expand Down

0 comments on commit 9cd8d5b

Please sign in to comment.