Fix HTTPUpdate flash size check and add SPIFFS size check (#2161)

* Fix error in PR #2048: if ::available() is called before ::connect() _rxBuffer is not initialised

* Fixed flash size check and added SPIFFS size check

* Rewriting ESP.getFreeSketchSpace(), moving code from HTTPUpdate.cpp
This commit is contained in:
Jeroen88
2018-12-06 20:39:52 +01:00
committed by Me No Dev
parent bb7dea1566
commit 884e417a49
3 changed files with 29 additions and 8 deletions

View File

@ -42,6 +42,7 @@
#define HTTP_UE_SERVER_FAULTY_MD5 (-105)
#define HTTP_UE_BIN_VERIFY_HEADER_FAILED (-106)
#define HTTP_UE_BIN_FOR_WRONG_FLASH (-107)
#define HTTP_UE_NO_PARTITION (-108)
enum HTTPUpdateResult {
HTTP_UPDATE_FAILED,