lora_send code sanitization
This commit is contained in:
parent
679582857a
commit
02326a1c7f
@ -21,7 +21,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern QueueHandle_t LoraSendQueue;
|
extern QueueHandle_t LoraSendQueue;
|
||||||
extern TaskHandle_t lmicTask;
|
extern TaskHandle_t lmicTask, lorasendTask;
|
||||||
|
|
||||||
esp_err_t lora_stack_init();
|
esp_err_t lora_stack_init();
|
||||||
void lmictask(void *pvParameters);
|
void lmictask(void *pvParameters);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
extern Ticker sendcycler;
|
extern Ticker sendcycler;
|
||||||
|
|
||||||
void SendPayload(uint8_t port, sendprio_t prio);
|
void SendPayload(uint8_t port, sendprio_t prio);
|
||||||
void sendCounter(void);
|
void sendData(void);
|
||||||
void checkSendQueues(void);
|
void checkSendQueues(void);
|
||||||
void flushQueues();
|
void flushQueues();
|
||||||
void sendcycle(void);
|
void sendcycle(void);
|
||||||
|
@ -30,10 +30,12 @@ void doHousekeeping() {
|
|||||||
#if (HAS_LORA)
|
#if (HAS_LORA)
|
||||||
ESP_LOGD(TAG, "LMiCtask %d bytes left | Taskstate = %d",
|
ESP_LOGD(TAG, "LMiCtask %d bytes left | Taskstate = %d",
|
||||||
uxTaskGetStackHighWaterMark(lmicTask), eTaskGetState(lmicTask));
|
uxTaskGetStackHighWaterMark(lmicTask), eTaskGetState(lmicTask));
|
||||||
|
ESP_LOGD(TAG, "Lorasendtask %d bytes left | Taskstate = %d",
|
||||||
|
uxTaskGetStackHighWaterMark(lorasendTask), eTaskGetState(lorasendTask));
|
||||||
#endif
|
#endif
|
||||||
#if (HAS_GPS)
|
#if (HAS_GPS)
|
||||||
ESP_LOGD(TAG, "Gpsloop %d bytes left | Taskstate = %d",
|
ESP_LOGD(TAG, "Gpsloop %d bytes left | Taskstate = %d",
|
||||||
uxTaskGetStackHighWaterMark(GpsTask), eTaskGetState(GpsTask));
|
uxTaskGetStackHighWaterMark(GpsTask), eTaskGetState(GpsTask));
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_SPI
|
#ifdef HAS_SPI
|
||||||
ESP_LOGD(TAG, "spiloop %d bytes left | Taskstate = %d",
|
ESP_LOGD(TAG, "spiloop %d bytes left | Taskstate = %d",
|
||||||
|
@ -65,7 +65,7 @@ void irqHandler(void *pvParameters) {
|
|||||||
|
|
||||||
// is time to send the payload?
|
// is time to send the payload?
|
||||||
if (InterruptStatus & SENDCYCLE_IRQ)
|
if (InterruptStatus & SENDCYCLE_IRQ)
|
||||||
sendCounter();
|
sendData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ void SendPayload(uint8_t port, sendprio_t prio) {
|
|||||||
} // SendPayload
|
} // SendPayload
|
||||||
|
|
||||||
// interrupt triggered function to prepare payload to send
|
// interrupt triggered function to prepare payload to send
|
||||||
void sendCounter() {
|
void sendData() {
|
||||||
|
|
||||||
uint8_t bitmask = cfg.payloadmask;
|
uint8_t bitmask = cfg.payloadmask;
|
||||||
uint8_t mask = 1;
|
uint8_t mask = 1;
|
||||||
@ -130,7 +130,7 @@ void sendCounter() {
|
|||||||
mask <<= 1;
|
mask <<= 1;
|
||||||
} // while (bitmask)
|
} // while (bitmask)
|
||||||
|
|
||||||
} // sendCounter()
|
} // sendData()
|
||||||
|
|
||||||
void flushQueues() {
|
void flushQueues() {
|
||||||
#if (HAS_LORA)
|
#if (HAS_LORA)
|
||||||
|
Loading…
Reference in New Issue
Block a user