MCPcopy Create free account
hub / github.com/dalathegreat/Battery-Emulator / connectivity_loop

Function connectivity_loop

Software/Software.cpp:85–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void 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
123void logging_loop(void*) {
124 bool sd_initialized = false;

Callers

nothing calls this directly

Calls 11

init_WiFiFunction · 0.85
init_webserverFunction · 0.85
init_mDNSFunction · 0.85
init_displayFunction · 0.85
init_espnowFunction · 0.85
wifi_monitorFunction · 0.85
update_displayFunction · 0.85
update_espnowFunction · 0.85
ota_monitorFunction · 0.85
delayFunction · 0.85
panic_if_exceeded_msMethod · 0.80

Tested by

no test coverage detected