boot delay 3 sec
This commit is contained in:
parent
2f04602048
commit
b960fd6b92
@ -4,6 +4,8 @@
|
|||||||
#include "clock.h"
|
#include "clock.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
#define BOOT_DELAY_SECONDS 3
|
||||||
|
|
||||||
void bootDelay() {
|
void bootDelay() {
|
||||||
info("Waiting for WiFi...");
|
info("Waiting for WiFi...");
|
||||||
while (!isWiFiConnected()) {
|
while (!isWiFiConnected()) {
|
||||||
@ -18,9 +20,9 @@ void bootDelay() {
|
|||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
info("Waiting 5 seconds for OTA update...");
|
info("Waiting %d seconds for OTA update...", BOOT_DELAY_SECONDS);
|
||||||
const auto start = millis();
|
const auto start = millis();
|
||||||
while (millis() - start < 5000) {
|
while (millis() - start < BOOT_DELAY_SECONDS * 1000) {
|
||||||
wifiLoop();
|
wifiLoop();
|
||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user