26
26
#ifndef ESP8266HTTPUPDATE_H_
27
27
#define ESP8266HTTPUPDATE_H_
28
28
29
- #define HTTPUPDATE_1_2_COMPATIBLE
30
-
31
29
#include < Arduino.h>
32
30
#include < ESP8266WiFi.h>
33
31
#include < WiFiClient.h>
34
32
#include < WiFiUdp.h>
35
33
#include < ESP8266HTTPClient.h>
36
34
35
+ #ifndef HTTPUPDATE_1_2_COMPATIBLE
36
+ #define HTTPUPDATE_1_2_COMPATIBLE HTTPCLIENT_1_1_COMPATIBLE
37
+ #endif
38
+
37
39
#ifdef DEBUG_ESP_HTTP_UPDATE
38
40
#ifdef DEBUG_ESP_PORT
39
41
#define DEBUG_HTTP_UPDATE (fmt, ...) DEBUG_ESP_PORT.printf_P( (PGM_P)PSTR(fmt), ## __VA_ARGS__ )
@@ -85,7 +87,7 @@ class ESP8266HTTPUpdate
85
87
_ledOn = ledOn;
86
88
}
87
89
88
- #ifdef HTTPUPDATE_1_2_COMPATIBLE
90
+ #if HTTPUPDATE_1_2_COMPATIBLE
89
91
// This function is deprecated, use rebootOnUpdate and the next one instead
90
92
t_httpUpdate_return update(const String& url, const String& currentVersion,
91
93
const String& httpsFingerprint, bool reboot) __attribute__((deprecated));
@@ -97,7 +99,7 @@ class ESP8266HTTPUpdate
97
99
#endif
98
100
t_httpUpdate_return update(WiFiClient& client, const String& url, const String& currentVersion = " " );
99
101
100
- #ifdef HTTPUPDATE_1_2_COMPATIBLE
102
+ #if HTTPUPDATE_1_2_COMPATIBLE
101
103
// This function is deprecated, use one of the overloads below along with rebootOnUpdate
102
104
t_httpUpdate_return update(const String& host, uint16_t port, const String& uri, const String& currentVersion,
103
105
bool https, const String& httpsFingerprint, bool reboot) __attribute__((deprecated));
@@ -112,7 +114,7 @@ class ESP8266HTTPUpdate
112
114
t_httpUpdate_return update(WiFiClient& client, const String& host, uint16_t port, const String& uri = " /" ,
113
115
const String& currentVersion = " " );
114
116
115
- #ifdef HTTPUPDATE_1_2_COMPATIBLE
117
+ #if HTTPUPDATE_1_2_COMPATIBLE
116
118
// This function is deprecated, use rebootOnUpdate and the next one instead
117
119
t_httpUpdate_return updateSpiffs(const String& url, const String& currentVersion,
118
120
const String& httpsFingerprint, bool reboot) __attribute__((deprecated));
0 commit comments