From 1e97541c1c3a7d541e85fbda5fd9ced225a758b9 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 14 Nov 2020 13:02:54 +0100 Subject: [PATCH] wait for NTP client to get correct time --- src/LoRa_APRS_iGate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index acb2a86..0ddc08f 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -415,10 +415,10 @@ void setup_lora() void setup_ntp() { timeClient.begin(); - if(!timeClient.forceUpdate()) + while(!timeClient.forceUpdate()) { - logPrintlnW("NTP Client force update issue!"); - show_display("WARN", "NTP Client force update issue!", 2000); + logPrintlnW("NTP Client force update issue! Waiting 1 sek..."); + show_display("WARN", "NTP Client force update issue! Waiting 1 sek...", 1000); } logPrintlnI("NTP Client init done!"); show_display("INFO", "NTP Client init done!", 2000);