serial.flush() when writing out GPIO table

i have experienced lost lines in the table
This commit is contained in:
Frank
2022-12-04 22:46:00 +01:00
parent ce5e631ee4
commit 6a96963ab1

View File

@@ -32,7 +32,8 @@ void WLED::reset()
yield(); // enough time to send response to client
}
applyBri();
DEBUG_PRINTLN(F("WLED RESET"));
USER_PRINTLN(F("WLED RESET"));
if (canUseSerial()) Serial.flush(); // WLEDMM: wait until Serial has completed sending its buffer
ESP.restart();
}
@@ -491,6 +492,7 @@ void WLED::setup()
pinManager.getPinConflicts(pinNr).c_str(),
pinManager.getPinSpecialText(pinNr).c_str()
);
if (canUseSerial()) Serial.flush(); // avoid lost lines (buffer overflow?)
}
}
USER_PRINTLN(F("WLED initialization done.\n"));