timesync.cpp: bugfix irq masking release (#392)

This commit is contained in:
Verkehrsrot 2019-07-22 11:25:05 +02:00
parent 0ce58cc8bf
commit 79c20113a7

View File

@ -64,7 +64,7 @@ void process_timesync_req(void *taskparameter) {
// wait until we are joined if we are not // wait until we are joined if we are not
while (!LMIC.devaddr) { while (!LMIC.devaddr) {
vTaskDelay(5000); vTaskDelay(1000);
} }
// collect timestamp samples // collect timestamp samples
@ -135,10 +135,9 @@ void process_timesync_req(void *taskparameter) {
setMyTime(time_to_set, time_to_set_fraction_msec); setMyTime(time_to_set, time_to_set_fraction_msec);
finish:
// end of time critical section: release I2C bus and re-enable app irq's // end of time critical section: release I2C bus and re-enable app irq's
unmask_user_IRQ(); unmask_user_IRQ();
finish:
timeSyncPending = false; timeSyncPending = false;
} // infinite while(1) } // infinite while(1)