Skip to content

Commit

Permalink
Changed light sleep to modem sleep to prevent packet loss on wifi (es…
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenSt committed Apr 29, 2022
1 parent 4fb3d81 commit 313189c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions espMQTT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// #define ESPMQTT_OPENTHERM
// #define ESPMQTT_SMARTMETER
// #define ESPMQTT_GROWATT
#define ESPMQTT_GROWATT_MODBUS
// #define ESPMQTT_GROWATT_MODBUS
// #define ESPMQTT_SDM120
// #define ESPMQTT_DDM18SD
// #define ESPMQTT_WATERMETER
Expand All @@ -50,7 +50,7 @@
// #define ESPMQTT_SOIL
// #define ESPMQTT_DIMMER
// #define ESPMQTT_RELAY
// #define ESPMQTT_LIVINGROOM
#define ESPMQTT_LIVINGROOM
// #define ESPMQTT_BBQTEMP
// #define ESPMQTT_GOODWE

Expand Down Expand Up @@ -2533,7 +2533,7 @@ void SleepDelay(uint32_t mseconds) {
if (mseconds) {
uint32_t wait = millis() + mseconds;
while (wait > millis() && !Serial.available()) { // We need to service serial buffer ASAP as otherwise we get uart buffer overrun
delay(1);
delay(1);//delayMicroseconds(50);
}
} else {
delay(0);
Expand Down

0 comments on commit 313189c

Please sign in to comment.