diff --git a/src/main.cpp b/src/main.cpp index e38178d6..a8d301a1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -86,7 +86,7 @@ uint16_t volatile macs_total = 0, macs_wifi = 0, macs_ble = 0, hw_timer_t *ppsIRQ = NULL, *displayIRQ = NULL; -TaskHandle_t irqHandlerTask, ClockTask; +TaskHandle_t irqHandlerTask = NULL, ClockTask = NULL; SemaphoreHandle_t I2Caccess; bool volatile TimePulseTick = false; time_t userUTCTime = 0; @@ -419,6 +419,11 @@ void setup() { #warning you did not specify a time source, time will not be synched #endif +#if (TIME_SYNC_LORASERVER) + // create time sync task + timesync_init(); +#endif + // start pps timepulse ESP_LOGI(TAG, "Starting Timekeeper..."); assert(timepulse_init()); // setup timepulse