mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
parent
1e49cb5a2a
commit
7b5184c89b
@ -368,7 +368,11 @@ void BacklogLoop(void) {
|
|||||||
void SleepDelay(uint32_t mseconds) {
|
void SleepDelay(uint32_t mseconds) {
|
||||||
if (mseconds) {
|
if (mseconds) {
|
||||||
for (uint32_t wait = 0; wait < mseconds; wait++) {
|
for (uint32_t wait = 0; wait < mseconds; wait++) {
|
||||||
|
// ESP8266 does an optimistic_yield(1000) in Serial.available()
|
||||||
|
// ESP32 does not so needs delay here
|
||||||
|
#ifdef ESP32
|
||||||
delay(1);
|
delay(1);
|
||||||
|
#endif
|
||||||
if (Serial.available()) { break; } // We need to service serial buffer ASAP as otherwise we get uart buffer overrun
|
if (Serial.available()) { break; } // We need to service serial buffer ASAP as otherwise we get uart buffer overrun
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -383,7 +387,6 @@ void loop(void) {
|
|||||||
XsnsCall(FUNC_LOOP);
|
XsnsCall(FUNC_LOOP);
|
||||||
|
|
||||||
OsWatchLoop();
|
OsWatchLoop();
|
||||||
|
|
||||||
ButtonLoop();
|
ButtonLoop();
|
||||||
SwitchLoop();
|
SwitchLoop();
|
||||||
#ifdef USE_DEVICE_GROUPS
|
#ifdef USE_DEVICE_GROUPS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user