| 83 | } |
| 84 | |
| 85 | void connectivity_loop(void*) { |
| 86 | esp_task_wdt_add(NULL); // Register this task with WDT |
| 87 | // Init wifi |
| 88 | init_WiFi(); |
| 89 | |
| 90 | init_webserver(); |
| 91 | |
| 92 | if (mdns_enabled) { |
| 93 | init_mDNS(); |
| 94 | } |
| 95 | |
| 96 | init_display(); |
| 97 | |
| 98 | if (espnow_enabled) { |
| 99 | init_espnow(); |
| 100 | } |
| 101 | |
| 102 | while (true) { |
| 103 | START_TIME_MEASUREMENT(wifi); |
| 104 | wifi_monitor(); |
| 105 | |
| 106 | update_display(); |
| 107 | |
| 108 | if (espnow_enabled) { |
| 109 | update_espnow(); |
| 110 | } |
| 111 | |
| 112 | ota_monitor(); |
| 113 | |
| 114 | END_TIME_MEASUREMENT_MAX(wifi, datalayer.system.status.wifi_task_10s_max_us); |
| 115 | |
| 116 | mqtt_loop_watchdog.panic_if_exceeded_ms(60000, "MQTT task watchdog reset triggered!"); |
| 117 | |
| 118 | esp_task_wdt_reset(); // Reset watchdog |
| 119 | delay(1); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | void logging_loop(void*) { |
| 124 | bool sd_initialized = false; |
nothing calls this directly
no test coverage detected