cyclic.cpp: task errorhandling added
This commit is contained in:
parent
02c29afca6
commit
ef15fa2d2a
@ -22,44 +22,55 @@ void doHousekeeping() {
|
|||||||
if ((RTC_runmode == RUNMODE_UPDATE) || (RTC_runmode == RUNMODE_MAINTENANCE))
|
if ((RTC_runmode == RUNMODE_UPDATE) || (RTC_runmode == RUNMODE_MAINTENANCE))
|
||||||
do_reset(true); // warmstart
|
do_reset(true); // warmstart
|
||||||
|
|
||||||
// heap and task storage debugging
|
// print heap and task storage information
|
||||||
ESP_LOGD(TAG, "Heap: Free:%d, Min:%d, Size:%d, Alloc:%d, StackHWM:%d",
|
ESP_LOGD(TAG, "Heap: Free:%d, Min:%d, Size:%d, Alloc:%d, StackHWM:%d",
|
||||||
ESP.getFreeHeap(), ESP.getMinFreeHeap(), ESP.getHeapSize(),
|
ESP.getFreeHeap(), ESP.getMinFreeHeap(), ESP.getHeapSize(),
|
||||||
ESP.getMaxAllocHeap(), uxTaskGetStackHighWaterMark(NULL));
|
ESP.getMaxAllocHeap(), uxTaskGetStackHighWaterMark(NULL));
|
||||||
ESP_LOGD(TAG, "IRQhandler %d bytes left | Taskstate = %d",
|
|
||||||
uxTaskGetStackHighWaterMark(irqHandlerTask),
|
if (irqHandlerTask != NULL)
|
||||||
eTaskGetState(irqHandlerTask));
|
ESP_LOGD(TAG, "IRQhandler %d bytes left | Taskstate = %d",
|
||||||
ESP_LOGD(TAG, "Rcommand interpreter %d bytes left | Taskstate = %d",
|
uxTaskGetStackHighWaterMark(irqHandlerTask),
|
||||||
uxTaskGetStackHighWaterMark(rcmdTask), eTaskGetState(rcmdTask));
|
eTaskGetState(irqHandlerTask));
|
||||||
|
if (rcmdTask != NULL)
|
||||||
|
ESP_LOGD(TAG, "Rcommand interpreter %d bytes left | Taskstate = %d",
|
||||||
|
uxTaskGetStackHighWaterMark(rcmdTask), eTaskGetState(rcmdTask));
|
||||||
#if (HAS_LORA)
|
#if (HAS_LORA)
|
||||||
ESP_LOGD(TAG, "LMiCtask %d bytes left | Taskstate = %d",
|
if (lmicTask != NULL)
|
||||||
uxTaskGetStackHighWaterMark(lmicTask), eTaskGetState(lmicTask));
|
ESP_LOGD(TAG, "LMiCtask %d bytes left | Taskstate = %d",
|
||||||
ESP_LOGD(TAG, "Lorasendtask %d bytes left | Taskstate = %d",
|
uxTaskGetStackHighWaterMark(lmicTask), eTaskGetState(lmicTask));
|
||||||
uxTaskGetStackHighWaterMark(lorasendTask),
|
if (lorasendTask != NULL)
|
||||||
eTaskGetState(lorasendTask));
|
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",
|
if (GpsTask != NULL)
|
||||||
uxTaskGetStackHighWaterMark(GpsTask), eTaskGetState(GpsTask));
|
ESP_LOGD(TAG, "Gpsloop %d bytes left | Taskstate = %d",
|
||||||
|
uxTaskGetStackHighWaterMark(GpsTask), eTaskGetState(GpsTask));
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_SPI
|
#ifdef HAS_SPI
|
||||||
ESP_LOGD(TAG, "spiloop %d bytes left | Taskstate = %d",
|
if (spiTask != NULL)
|
||||||
uxTaskGetStackHighWaterMark(spiTask), eTaskGetState(spiTask));
|
ESP_LOGD(TAG, "spiloop %d bytes left | Taskstate = %d",
|
||||||
|
uxTaskGetStackHighWaterMark(spiTask), eTaskGetState(spiTask));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAS_MQTT
|
#ifdef HAS_MQTT
|
||||||
ESP_LOGD(TAG, "MQTTloop %d bytes left | Taskstate = %d",
|
if (mqttTask != NULL)
|
||||||
uxTaskGetStackHighWaterMark(mqttTask), eTaskGetState(mqttTask));
|
ESP_LOGD(TAG, "MQTTloop %d bytes left | Taskstate = %d",
|
||||||
|
uxTaskGetStackHighWaterMark(mqttTask), eTaskGetState(mqttTask));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined HAS_DCF77 || defined HAS_IF482)
|
#if (defined HAS_DCF77 || defined HAS_IF482)
|
||||||
ESP_LOGD(TAG, "Clockloop %d bytes left | Taskstate = %d",
|
if (ClockTask != NULL)
|
||||||
uxTaskGetStackHighWaterMark(ClockTask), eTaskGetState(ClockTask));
|
ESP_LOGD(TAG, "Clockloop %d bytes left | Taskstate = %d",
|
||||||
|
uxTaskGetStackHighWaterMark(ClockTask), eTaskGetState(ClockTask));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED)
|
#if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED)
|
||||||
ESP_LOGD(TAG, "LEDloop %d bytes left | Taskstate = %d",
|
if (ledLoopTask != NULL)
|
||||||
uxTaskGetStackHighWaterMark(ledLoopTask),
|
ESP_LOGD(TAG, "LEDloop %d bytes left | Taskstate = %d",
|
||||||
eTaskGetState(ledLoopTask));
|
uxTaskGetStackHighWaterMark(ledLoopTask),
|
||||||
|
eTaskGetState(ledLoopTask));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// read battery voltage into global variable
|
// read battery voltage into global variable
|
||||||
|
Loading…
Reference in New Issue
Block a user