Fixed OTA Ethernet bug
All checks were successful
Test compiling project / test (push) Successful in 2m28s

This commit is contained in:
2025-02-23 02:38:59 +01:00
parent 2c4344e40d
commit 146a4412e0
6 changed files with 73 additions and 17 deletions

View File

@@ -81,6 +81,7 @@ void check_update_task(void* parameter) {
OTA ota("https://iot.tobiasmaier.me/firmware/waterlevel", current_software_version, "INA233");
#endif
OTA spiffs_fs("https://iot.tobiasmaier.me/filesystem/waterlevel", REQUIRED_SPIFFS_VERSION, "generic");
// Init SPIFFS update and check for update
// If there is a SPIFSS update it will be ran automatically, as SPIFFS is necessary for the firmware to run
@@ -139,11 +140,12 @@ void run_ota_update_task(void* parameter) {
void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventType type,
void *arg, uint8_t *data, size_t len) {
if (type == WS_EVT_CONNECT) {
Serial.println("WebSocket client connected");
} else if (type == WS_EVT_DISCONNECT) {
Serial.println("WebSocket client disconnected");
} else if (type == WS_EVT_DATA) {
// Optionally process data received from the client
}
if (type == WS_EVT_CONNECT) {
Serial.println("WebSocket client connected");
} else if (type == WS_EVT_DISCONNECT) {
Serial.println("WebSocket client disconnected");
} else if (type == WS_EVT_DATA) {
// Optionally process data received from the client
}
}