From 79c20113a757dc3cf9d6d8bf48cb2d819d28d4c7 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Mon, 22 Jul 2019 11:25:05 +0200 Subject: [PATCH] timesync.cpp: bugfix irq masking release (#392) --- src/timesync.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/timesync.cpp b/src/timesync.cpp index 88bc6aa8..42cdecd9 100644 --- a/src/timesync.cpp +++ b/src/timesync.cpp @@ -64,7 +64,7 @@ void process_timesync_req(void *taskparameter) { // wait until we are joined if we are not while (!LMIC.devaddr) { - vTaskDelay(5000); + vTaskDelay(1000); } // collect timestamp samples @@ -135,10 +135,9 @@ void process_timesync_req(void *taskparameter) { setMyTime(time_to_set, time_to_set_fraction_msec); + finish: // end of time critical section: release I2C bus and re-enable app irq's unmask_user_IRQ(); - - finish: timeSyncPending = false; } // infinite while(1)