diff --git a/include/lorawan.h b/include/lorawan.h index 6acdb24c..72f42d26 100644 --- a/include/lorawan.h +++ b/include/lorawan.h @@ -55,7 +55,7 @@ const char *getBwName(rps_t rps); const char *getCrName(rps_t rps); #if (TIME_SYNC_LORAWAN) -static void user_request_network_time_callback(void *pVoidUserUTCTime, +void user_request_network_time_callback(void *pVoidUserUTCTime, int flagSuccess); #endif diff --git a/src/display.cpp b/src/display.cpp index 7f4da8f5..05808f3c 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -77,9 +77,9 @@ void init_display(bool verbose) { // init display #ifndef DISPLAY_FLIP - oledInit(OLED_128x64, ANGLE_0, false, -1, -1, 400000L); + oledInit(OLED_128x64, false, false, -1, -1, 400000L); #else - oledInit(OLED_128x64, ANGLE_FLIPY, false, -1, -1, 400000L); + oledInit(OLED_128x64, true, false, -1, -1, 400000L); #endif // clear display diff --git a/src/irqhandler.cpp b/src/irqhandler.cpp index 47172528..901c0449 100644 --- a/src/irqhandler.cpp +++ b/src/irqhandler.cpp @@ -20,16 +20,16 @@ void irqHandler(void *pvParameters) { if (InterruptStatus & UNMASK_IRQ) // interrupt handler to be enabled? mask_irq = false; - // else if (mask_irq) // suppress processing if interrupt handler is - // disabled + + // suppress processing if interrupt handler is disabled + // or time critical lmic jobs are pending in next 100ms #if (HAS_LORA) else if (mask_irq || os_queryTimeCriticalJobs(ms2osticks(100))) #else else if (mask_irq) #endif - // suppress processing if interrupt handler is disabled - // or time critical lmic jobs are pending in next 100ms continue; + else if (InterruptStatus & MASK_IRQ) { // interrupt handler to be disabled? mask_irq = true; continue; diff --git a/src/lorawan.cpp b/src/lorawan.cpp index fe8ffae5..8b787580 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -373,7 +373,7 @@ void lora_enqueuedata(MessageBuffer_t *message) { void lora_queuereset(void) { xQueueReset(LoraSendQueue); } #if (TIME_SYNC_LORAWAN) -static void IRAM_ATTR user_request_network_time_callback(void *pVoidUserUTCTime, +void IRAM_ATTR user_request_network_time_callback(void *pVoidUserUTCTime, int flagSuccess) { // Explicit conversion from void* to uint32_t* to avoid compiler errors time_t *pUserUTCTime = (time_t *)pVoidUserUTCTime;