mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
Optimize sleepdelay
This commit is contained in:
parent
d1ef1c3255
commit
5c92c5a9a9
@ -368,8 +368,7 @@ void BacklogLoop(void) {
|
||||
void SleepDelay(uint32_t mseconds) {
|
||||
if (mseconds) {
|
||||
uint32_t wait = millis() + mseconds;
|
||||
while (!TimeReached(wait)) {
|
||||
if (Serial.available()) { return; } // We need to service serial buffer ASAP as otherwise we get uart buffer overrun
|
||||
while (!TimeReached(wait) && !Serial.available()) { // We need to service serial buffer ASAP as otherwise we get uart buffer overrun
|
||||
delay(1);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user