Merge branch 'esp8266_native_framework_update' into integration

This commit is contained in:
J. Nick Koston
2025-12-26 22:37:59 -10:00
2 changed files with 5 additions and 4 deletions
@@ -223,7 +223,7 @@ bool ESP8266OTABackend::write_buffer_() {
}
bool ESP8266OTABackend::write_buffer_final_() {
// Same as write_buffer_() but without MD5 update (for final padded write)
// Similar to write_buffer_(), but without flash mode patching or MD5 update (for final padded write)
if (this->buffer_len_ == 0) {
return true;
}
@@ -334,9 +334,9 @@ bool ESP8266OTABackend::verify_end_() {
return false;
}
// Check if new firmware's flash size fits (only when auto-detection is disabled)
// With FLASH_MAP_SUPPORT (modern cores), flash size is auto-detected from chip
#if !FLASH_MAP_SUPPORT
// Check if new firmware's flash size fits (only when auto-detection is disabled)
// With FLASH_MAP_SUPPORT (modern cores), flash size is auto-detected from chip
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
uint32_t bin_flash_size = ESP.magicFlashChipSize((bytes[3] & 0xf0) >> 4);
// NOLINTNEXTLINE(readability-static-accessed-through-instance)
+2 -1
View File
@@ -19,6 +19,7 @@ class ESP8266OTABackend : public OTABackend {
OTAResponseTypes write(uint8_t *data, size_t len) override;
OTAResponseTypes end() override;
void abort() override;
// Compression supported in all ESP8266 Arduino versions ESPHome supports (>= 2.7.0)
bool supports_compression() override { return true; }
protected:
@@ -49,7 +50,7 @@ class ESP8266OTABackend : public OTABackend {
size_t image_size_{0};
md5::MD5Digest md5_{};
uint8_t expected_md5_[16]; // MD5 = 16 bytes
uint8_t expected_md5_[16]; // Fixed-size buffer for 128-bit (16-byte) MD5 digest
bool md5_set_{false};
};