@@ -42,10 +42,10 @@ ESP8266HTTPUpdate::~ESP8266HTTPUpdate(void) {
42
42
* @param httpsFingerprint const char *
43
43
* @return t_httpUpdate_return
44
44
*/
45
- t_httpUpdate_return ESP8266HTTPUpdate::update(const char * url, const char * current_version, const char * httpsFingerprint) {
45
+ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * url, const char * current_version, const char * httpsFingerprint, bool reboot ) {
46
46
HTTPClient http;
47
47
http.begin (url, httpsFingerprint);
48
- return handleUpdate (&http, current_version);
48
+ return handleUpdate (&http, current_version, reboot , false );
49
49
}
50
50
51
51
/* *
@@ -55,10 +55,10 @@ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * url, const char * cur
55
55
* @param httpsFingerprint const char *
56
56
* @return t_httpUpdate_return
57
57
*/
58
- t_httpUpdate_return ESP8266HTTPUpdate::updateSpiffs(const char * url, const char * current_version, const char * httpsFingerprint) {
58
+ t_httpUpdate_return ESP8266HTTPUpdate::updateSpiffs(const char * url, const char * current_version, const char * httpsFingerprint, bool reboot ) {
59
59
HTTPClient http;
60
60
http.begin (url, httpsFingerprint);
61
- return handleUpdate (&http, current_version, false , true );
61
+ return handleUpdate (&http, current_version, reboot , true );
62
62
}
63
63
64
64
/* *
@@ -70,16 +70,16 @@ t_httpUpdate_return ESP8266HTTPUpdate::updateSpiffs(const char * url, const char
70
70
* @param httpsFingerprint const char *
71
71
* @return
72
72
*/
73
- t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port, const char * url, const char * current_version, bool https, const char * httpsFingerprint) {
73
+ t_httpUpdate_return ESP8266HTTPUpdate::update(const char * host, uint16_t port, const char * url, const char * current_version, bool https, const char * httpsFingerprint, bool reboot ) {
74
74
HTTPClient http;
75
75
http.begin (host, port, url, https, httpsFingerprint);
76
- return handleUpdate (&http, current_version);
76
+ return handleUpdate (&http, current_version, reboot , false );
77
77
}
78
78
79
- t_httpUpdate_return ESP8266HTTPUpdate::update(String host, uint16_t port, String url, String current_version, bool https, String httpsFingerprint) {
79
+ t_httpUpdate_return ESP8266HTTPUpdate::update(String host, uint16_t port, String url, String current_version, bool https, String httpsFingerprint, bool reboot ) {
80
80
HTTPClient http;
81
81
http.begin (host, port, url, https, httpsFingerprint);
82
- return handleUpdate (&http, current_version.c_str ());
82
+ return handleUpdate (&http, current_version.c_str (), reboot , false );
83
83
}
84
84
85
85
/* *
0 commit comments