Support WiFi OTA (#6352)

* Support WiFi OTA

* Fix trunk warnings

* Make getVersion() check for project name too

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Mike
2025-03-20 21:39:33 +03:00
committed by GitHub
parent 0d95b1afcc
commit 31c0e8fa2c
5 changed files with 149 additions and 13 deletions

View File

@@ -9,6 +9,8 @@
#include "nimble/NimbleBluetooth.h"
#endif
#include <WiFiOTA.h>
#if HAS_WIFI
#include "mesh/wifi/WiFiAPClient.h"
#endif
@@ -139,12 +141,19 @@ void esp32Setup()
#if !MESHTASTIC_EXCLUDE_BLUETOOTH
String BLEOTA = BleOta::getOtaAppVersion();
if (BLEOTA.isEmpty()) {
LOG_INFO("No OTA firmware available");
LOG_INFO("No BLE OTA firmware available");
} else {
LOG_INFO("OTA firmware version %s", BLEOTA.c_str());
LOG_INFO("BLE OTA firmware version %s", BLEOTA.c_str());
}
#else
LOG_INFO("No OTA firmware available");
#endif
#if !MESHTASTIC_EXCLUDE_WIFI
String version = WiFiOTA::getVersion();
if (version.isEmpty()) {
LOG_INFO("No WiFi OTA firmware available");
} else {
LOG_INFO("WiFi OTA firmware version %s", version.c_str());
}
WiFiOTA::initialize();
#endif
// enableModemSleep();