diff --git a/include/lorawan.h b/include/lorawan.h index 0010f9de..58b0f3e2 100644 --- a/include/lorawan.h +++ b/include/lorawan.h @@ -21,7 +21,7 @@ #endif extern QueueHandle_t LoraSendQueue; -extern TaskHandle_t lmicTask; +extern TaskHandle_t lmicTask, lorasendTask; esp_err_t lora_stack_init(); void lmictask(void *pvParameters); diff --git a/include/senddata.h b/include/senddata.h index d81b852b..4a748445 100644 --- a/include/senddata.h +++ b/include/senddata.h @@ -10,7 +10,7 @@ extern Ticker sendcycler; void SendPayload(uint8_t port, sendprio_t prio); -void sendCounter(void); +void sendData(void); void checkSendQueues(void); void flushQueues(); void sendcycle(void); diff --git a/src/cyclic.cpp b/src/cyclic.cpp index d78d56c4..a4ba6703 100644 --- a/src/cyclic.cpp +++ b/src/cyclic.cpp @@ -30,10 +30,12 @@ void doHousekeeping() { #if (HAS_LORA) ESP_LOGD(TAG, "LMiCtask %d bytes left | Taskstate = %d", uxTaskGetStackHighWaterMark(lmicTask), eTaskGetState(lmicTask)); + ESP_LOGD(TAG, "Lorasendtask %d bytes left | Taskstate = %d", + uxTaskGetStackHighWaterMark(lorasendTask), eTaskGetState(lorasendTask)); #endif #if (HAS_GPS) - ESP_LOGD(TAG, "Gpsloop %d bytes left | Taskstate = %d", - uxTaskGetStackHighWaterMark(GpsTask), eTaskGetState(GpsTask)); + ESP_LOGD(TAG, "Gpsloop %d bytes left | Taskstate = %d", + uxTaskGetStackHighWaterMark(GpsTask), eTaskGetState(GpsTask)); #endif #ifdef HAS_SPI ESP_LOGD(TAG, "spiloop %d bytes left | Taskstate = %d", diff --git a/src/irqhandler.cpp b/src/irqhandler.cpp index cb5de1ec..db4201a1 100644 --- a/src/irqhandler.cpp +++ b/src/irqhandler.cpp @@ -65,7 +65,7 @@ void irqHandler(void *pvParameters) { // is time to send the payload? if (InterruptStatus & SENDCYCLE_IRQ) - sendCounter(); + sendData(); } } diff --git a/src/senddata.cpp b/src/senddata.cpp index 65d656c5..5e209faf 100644 --- a/src/senddata.cpp +++ b/src/senddata.cpp @@ -53,7 +53,7 @@ void SendPayload(uint8_t port, sendprio_t prio) { } // SendPayload // interrupt triggered function to prepare payload to send -void sendCounter() { +void sendData() { uint8_t bitmask = cfg.payloadmask; uint8_t mask = 1; @@ -130,7 +130,7 @@ void sendCounter() { mask <<= 1; } // while (bitmask) -} // sendCounter() +} // sendData() void flushQueues() { #if (HAS_LORA)