mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-05 14:56:32 +02:00
Feature/http update (#1979)
* Added HTTPUpdate class for downloading sketches from a server * Added HTTPUpdate class for downloading sketches from a server * Added HTTPUpdate to CMakeLists.txt * Change ESP8266 class references to ESP32 for httpUpdate.ino example * Change ESP8266 class references to ESP32 for httpUpdate.ino example. setLedPin() commented out because not all boards support LED_BUITLIN * Added check to handle mixup of old and present api properly * Correct HTTPClient::setTimeout() to convert milliseconds to seconds. Correct WiFiClient::setTimeout() to call Stream::setTimeout() with seconds converted back to milliseconds. Remove inproper checks for _insecure. * Added small comment because it looked like the Travis build did not finish
This commit is contained in:
@ -41,7 +41,7 @@ class UpdateClass {
|
||||
Call this to check the space needed for the update
|
||||
Will return false if there is not enough space
|
||||
*/
|
||||
bool begin(size_t size=UPDATE_SIZE_UNKNOWN, int command = U_FLASH);
|
||||
bool begin(size_t size=UPDATE_SIZE_UNKNOWN, int command = U_FLASH, int ledPin = -1, uint8_t ledOn = LOW);
|
||||
|
||||
/*
|
||||
Writes a buffer to the flash and increments the address
|
||||
@ -174,6 +174,9 @@ class UpdateClass {
|
||||
|
||||
String _target_md5;
|
||||
MD5Builder _md5;
|
||||
|
||||
int _ledPin;
|
||||
uint8_t _ledOn;
|
||||
};
|
||||
|
||||
extern UpdateClass Update;
|
||||
|
Reference in New Issue
Block a user