diff --git a/README.md b/README.md index 5119bf8..8d27779 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ In your existing `idf_component.yml` or in a new `idf_component.yml` next to you ``` dependencies: johboh/EspNowNetwork: - version: ">=0.5.0" + version: ">=0.5.1" ``` ### Examples diff --git a/examples/espidf/host/main/idf_component.yml b/examples/espidf/host/main/idf_component.yml index ba03658..57bf831 100644 --- a/examples/espidf/host/main/idf_component.yml +++ b/examples/espidf/host/main/idf_component.yml @@ -1,5 +1,5 @@ dependencies: johboh/EspNowNetwork: - #version: ">=0.5.0" + #version: ">=0.5.1" # Remove path and enable version to use EspNowNetwork from repository path: ../../../../ \ No newline at end of file diff --git a/examples/espidf/node/main/idf_component.yml b/examples/espidf/node/main/idf_component.yml index ba03658..57bf831 100644 --- a/examples/espidf/node/main/idf_component.yml +++ b/examples/espidf/node/main/idf_component.yml @@ -1,5 +1,5 @@ dependencies: johboh/EspNowNetwork: - #version: ">=0.5.0" + #version: ">=0.5.1" # Remove path and enable version to use EspNowNetwork from repository path: ../../../../ \ No newline at end of file diff --git a/idf_component.yml b/idf_component.yml index 2581f50..04895b3 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.5.0" +version: "0.5.1" description: Library for setting up a network of ESP NOW nodes url: https://github.com/Johboh/EspNowNetwork dependencies: diff --git a/library.json b/library.json index 57b53a6..c581b40 100644 --- a/library.json +++ b/library.json @@ -7,7 +7,7 @@ { "name": "Johan Böhlin" }, - "version": "0.5.0", + "version": "0.5.1", "license": "MIT", "repository": { diff --git a/library.properties b/library.properties index c2b522b..bd3326b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=EspNowNetwork -version=0.5.0 +version=0.5.1 author=Johan Böhlin maintainer=Johan Böhlin sentence=Library for setting up a network of ESP NOW nodes diff --git a/src/impl/EspNowOta.cpp b/src/impl/EspNowOta.cpp index a2d36bb..6151f94 100644 --- a/src/impl/EspNowOta.cpp +++ b/src/impl/EspNowOta.cpp @@ -288,10 +288,11 @@ bool EspNowOta::writeStreamToPartition(const esp_partition_t *partition, esp_htt } md5.add((uint8_t *)buffer, (uint16_t)bytes_filled); + bytes_read += bytes_filled; // If this is the end, finish up. - if (bytes_filled != SPI_FLASH_SEC_SIZE) { - log("This is the end", ESP_LOG_INFO); + if (bytes_read == content_length) { + log("End of stream, writing data to partition", ESP_LOG_INFO); if (!md5hash.empty()) { md5.calculate(); @@ -326,7 +327,6 @@ bool EspNowOta::writeStreamToPartition(const esp_partition_t *partition, esp_htt } } - bytes_read += bytes_filled; vTaskDelay(0); // Yield/reschedule }