From 65710a92996f154ef19af9c811eafd93cf1847e7 Mon Sep 17 00:00:00 2001 From: Mikhael Skvortsov Date: Thu, 20 Mar 2025 10:46:27 +0300 Subject: [PATCH] Fix trunk warnings --- src/platform/esp32/WiFiOTA.cpp | 12 +++++------- src/platform/esp32/WiFiOTA.h | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/platform/esp32/WiFiOTA.cpp b/src/platform/esp32/WiFiOTA.cpp index d0cdc1cbe..e67630582 100644 --- a/src/platform/esp32/WiFiOTA.cpp +++ b/src/platform/esp32/WiFiOTA.cpp @@ -1,6 +1,6 @@ -#include -#include +#include "WiFiOTA.h" #include "configuration.h" +#include #include namespace WiFiOTA @@ -58,8 +58,7 @@ void saveConfig(meshtastic_Config_NetworkConfig *network) bool trySwitchToOTA() { esp_app_desc_t app_desc; - const esp_partition_t *part = esp_partition_find_first( - ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_OTA_1, NULL); + const esp_partition_t *part = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_OTA_1, NULL); if (!part) return false; if (ESP_ERROR_CHECK_WITHOUT_ABORT(esp_ota_get_partition_description(part, &app_desc)) != ESP_OK) @@ -75,8 +74,7 @@ String getVersion() { String version; esp_app_desc_t app_desc; - const esp_partition_t *part = esp_partition_find_first( - ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_OTA_1, NULL); + const esp_partition_t *part = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_OTA_1, NULL); if (!part) return version; if (ESP_ERROR_CHECK_WITHOUT_ABORT(esp_ota_get_partition_description(part, &app_desc)) != ESP_OK) @@ -85,4 +83,4 @@ String getVersion() return version; } -} +} // namespace WiFiOTA diff --git a/src/platform/esp32/WiFiOTA.h b/src/platform/esp32/WiFiOTA.h index dd572d8b5..61860ed5e 100644 --- a/src/platform/esp32/WiFiOTA.h +++ b/src/platform/esp32/WiFiOTA.h @@ -1,8 +1,8 @@ #ifndef WIFIOTA_H #define WIFIOTA_H -#include #include "mesh-pb-constants.h" +#include namespace WiFiOTA { @@ -13,6 +13,6 @@ void recoverConfig(meshtastic_Config_NetworkConfig *network); void saveConfig(meshtastic_Config_NetworkConfig *network); bool trySwitchToOTA(); String getVersion(); -} +} // namespace WiFiOTA #endif // WIFIOTA_H