From 6956ea957ab2ff29277329211b758dac9d25d6e9 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Tue, 4 Aug 2020 15:06:44 +0200 Subject: [PATCH] Bugfix: When only one param is sent, the total length field is not send, to the overhead bytes are 5 instead of 6 --- src/utility/wifi_drv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/wifi_drv.cpp b/src/utility/wifi_drv.cpp index 9110af56..24beece8 100644 --- a/src/utility/wifi_drv.cpp +++ b/src/utility/wifi_drv.cpp @@ -1154,7 +1154,7 @@ int8_t WiFiDrv::downloadOTA(const char* url, uint8_t url_len) SpiDrv::sendParam((uint8_t*)url, url_len, LAST_PARAM); // pad to multiple of 4 - int commandSize = 6 + url_len; + int commandSize = 5 + url_len; while (commandSize % 4) { SpiDrv::readChar(); commandSize++;