refactor(ota): implement polling-based update system and fix API typo
Test project compilation / test (push) Successful in 3m52s
Test project compilation / test (push) Successful in 3m52s
- Fix typo in OTA update status API endpoint (/ota_udpate_status → /ota_update_status) - Replace WebSocket-based update progress with polling mechanism - Add OTA lifecycle callbacks (started, finished, progress, error) - Implement check_update_task with internet connectivity verification - Add LittleFS/SPIFFS update support - Simplify update progress page to use 90-second delay and polling instead of real-time WebSocket updates This refactor improves reliability by checking internet connectivity before attempting updates and simplifies the frontend by removing WebSocket complexity in favor of a timeout-based polling approach.
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ function fetchWaterData(gauge) {
|
||||
}
|
||||
|
||||
function fetchUpdateData(gauge) {
|
||||
const apiUrl = '/ota_udpate_status';
|
||||
const apiUrl = '/ota_update_status';
|
||||
// Fetching data from the API
|
||||
fetch(apiUrl)
|
||||
.then(response => response.json())
|
||||
|
||||
Reference in New Issue
Block a user