Skip to content

Commit 313189c

Browse files
author
JeroenSt
committed
Changed light sleep to modem sleep to prevent packet loss on wifi (esp8266/Arduino#5998)
1 parent 4fb3d81 commit 313189c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

espMQTT.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
// #define ESPMQTT_OPENTHERM
3939
// #define ESPMQTT_SMARTMETER
4040
// #define ESPMQTT_GROWATT
41-
#define ESPMQTT_GROWATT_MODBUS
41+
// #define ESPMQTT_GROWATT_MODBUS
4242
// #define ESPMQTT_SDM120
4343
// #define ESPMQTT_DDM18SD
4444
// #define ESPMQTT_WATERMETER
@@ -50,7 +50,7 @@
5050
// #define ESPMQTT_SOIL
5151
// #define ESPMQTT_DIMMER
5252
// #define ESPMQTT_RELAY
53-
// #define ESPMQTT_LIVINGROOM
53+
#define ESPMQTT_LIVINGROOM
5454
// #define ESPMQTT_BBQTEMP
5555
// #define ESPMQTT_GOODWE
5656

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

0 commit comments

Comments
 (0)