Explorar o código

Fix bug calculating time for MD5
Closes https://github.com/espressif/esp-serial-flasher/pull/19

Nathan Phillips %!s(int64=4) %!d(string=hai) anos
pai
achega
d411ab137c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/esp_loader.c

+ 1 - 1
src/esp_loader.c

@@ -78,7 +78,7 @@ static inline void md5_final(uint8_t digets[16]) { }
 
 static uint32_t timeout_per_mb(uint32_t size_bytes, uint32_t time_per_mb)
 {
-    uint32_t timeout = ERASE_REGION_TIMEOUT_PER_MB * (size_bytes / 1e6);
+    uint32_t timeout = time_per_mb * (size_bytes / 1e6);
     return MAX(timeout, DEFAULT_FLASH_TIMEOUT);
 }