You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the uptime counter is coded with an uint32. the uptime is in milliseconds therefore after 49 days (2^32 milliseconds), uptime folds over. Moreover some coversions in the code from uint32 to long give negative values. for uptime after 49/2=25.5 days (2^31 ms)
Some possible solution for ESP32 arch:
In AutoConnectPageImpl.hpp line 1009
#elif defined(ARDUINO_ARCH_ESP32)
long millisecs = esp_timer_get_time() / 1000;
It would be then usefull to convert either to seconds instead of keeping milliseconds in an uint32 variable, or use int64_t all the way long. Not sure if the arduino compiler handles properly uint64
JL
The text was updated successfully, but these errors were encountered:
the uptime counter is coded with an uint32. the uptime is in milliseconds therefore after 49 days (2^32 milliseconds), uptime folds over. Moreover some coversions in the code from uint32 to long give negative values. for uptime after 49/2=25.5 days (2^31 ms)
Some possible solution for ESP32 arch:
In AutoConnectPageImpl.hpp line 1009
#elif defined(ARDUINO_ARCH_ESP32)
long millisecs = esp_timer_get_time() / 1000;
esp_timer_get_time() returns an int64_t (see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/esp_timer.html#_CPPv418esp_timer_get_timev)
It would be then usefull to convert either to seconds instead of keeping milliseconds in an uint32 variable, or use int64_t all the way long. Not sure if the arduino compiler handles properly uint64
JL
The text was updated successfully, but these errors were encountered: