[SYS][BREAKING] Add gateway states, Offline mode and refactor sleep (#2020)

Gaterway states to improve LED management
Make the sleep function accessible outside BT
BREAKING remove sleep for ESP8266
BREAKING lowpowermode API changed to powermode and new mode definition

Co-authored-by: Florian <1technophile@users.noreply.github.com>
This commit is contained in:
FlorianandFlorian authored and GitHub committed 2024-08-23 16:55:04 -05:00
1 parent 068c2e457a
commit f9a5c6961a
16 files changed
+367 -443

No files matched your search

+2 -4
View File
@@ -159,10 +159,8 @@ void MeasureDS1820Temp() {
String origin = String(OW_TOPIC) + "/" + ds1820_addr[i];
DS1820data["origin"] = origin;
handleJsonEnqueue(DS1820data);
delay(10);
# if defined(DEEP_SLEEP_IN_US) || defined(ESP32_EXT0_WAKE_PIN)
ready_to_sleep = true;
# endif
if (SYSConfig.powerMode > 0)
ready_to_sleep = true;
} else {
Log.trace(F("DS1820: Temperature for device %s didn't change, don't publish it." CR), (char*)ds1820_addr[i].c_str());
}