From 2bdf335127e641c65f31fe3bac29eb9b3899a85c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 10 Aug 2025 17:53:24 -0500 Subject: [PATCH] uint32_t --- esphome/components/esphome/ota/ota_esphome.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/esphome/ota/ota_esphome.cpp b/esphome/components/esphome/ota/ota_esphome.cpp index c8156b8df2..60a9ae3cf5 100644 --- a/esphome/components/esphome/ota/ota_esphome.cpp +++ b/esphome/components/esphome/ota/ota_esphome.cpp @@ -172,7 +172,7 @@ void ESPHomeOTAComponent::handle_data_() { #endif // Read remaining 4 bytes of magic (we already read the first byte 0x6C in handle_handshake_) - if (!this->readall_(buf, 4, OTA_SOCKET_TIMEOUT_DATA)) { + if (!this->readall_(buf, 4)) { ESP_LOGW(TAG, "Read magic bytes failed"); goto error; // NOLINT(cppcoreguidelines-avoid-goto) } @@ -407,7 +407,7 @@ error: #endif } -bool ESPHomeOTAComponent::readall_(uint8_t *buf, size_t len, uint16_t timeout) { +bool ESPHomeOTAComponent::readall_(uint8_t *buf, size_t len, uint32_t timeout) { uint32_t start = millis(); uint32_t at = 0; while (len - at > 0) { @@ -438,7 +438,7 @@ bool ESPHomeOTAComponent::readall_(uint8_t *buf, size_t len, uint16_t timeout) { return true; } -bool ESPHomeOTAComponent::writeall_(const uint8_t *buf, size_t len, uint16_t timeout) { +bool ESPHomeOTAComponent::writeall_(const uint8_t *buf, size_t len, uint32_t timeout) { uint32_t start = millis(); uint32_t at = 0; while (len - at > 0) {