post-merge

* reduce memory footprint by removing all unneeded functions in ota_update.cpp
* don't compile ota_update.cpp when WLED_DISABLE_OTA is defined
This commit is contained in:
Frank
2025-11-29 21:26:24 +01:00
parent 00e026ce08
commit 23ce580a28
2 changed files with 18 additions and 7 deletions

View File

@@ -9,6 +9,8 @@
#pragma once
#if 0 // WLEDMM not needed - we only want getBootloaderSHA256Hex();
// Platform-specific metadata locations
#ifdef ESP32
#define BUILD_METADATA_SECTION ".rodata_custom_desc"
@@ -51,12 +53,14 @@ std::pair<bool, String> getOTAResult(AsyncWebServerRequest *request);
*/
void handleOTAData(AsyncWebServerRequest *request, size_t index, uint8_t *data, size_t len, bool isFinal);
#endif
#if defined(ARDUINO_ARCH_ESP32) && !defined(WLED_DISABLE_OTA)
/**
* Calculate and cache the bootloader SHA256 digest
* Reads the bootloader from flash at offset 0x1000 and computes SHA256 hash
*/
void calculateBootloaderSHA256();
static void calculateBootloaderSHA256();
/**
* Get bootloader SHA256 as hex string
@@ -68,5 +72,5 @@ String getBootloaderSHA256Hex();
* Invalidate cached bootloader SHA256 (call after bootloader update)
* Forces recalculation on next call to calculateBootloaderSHA256 or getBootloaderSHA256Hex
*/
void invalidateBootloaderSHA256Cache();
static void invalidateBootloaderSHA256Cache();
#endif