diff --git a/README.md b/README.md index a2ebc791f..536a79972 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Firebase Arduino Client Library for ESP8266 and ESP32 -Google's Firebase Arduino Client Library for ESP8266 and ESP32 v 2.0.7 +Google's Firebase Arduino Client Library for ESP8266 and ESP32 v 2.0.8 This library supports ESP8266 and ESP32 MCU from Espressif. The following are platforms in which the libraries are also available (RTDB only). diff --git a/library.json b/library.json index eaddcd3db..e40b4b8d9 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Firebase Arduino Client Library for ESP8266 and ESP32", - "version": "2.0.7", + "version": "2.0.8", "keywords": "communication, REST, esp32, esp8266, arduino", "description": "This client library provides the functions to work with Firebase Realtime database, Firestore, Storage and Cloud messaging.", "repository": { diff --git a/library.properties b/library.properties index 25d400cbe..67638a45b 100644 --- a/library.properties +++ b/library.properties @@ -1,6 +1,6 @@ name=Firebase Arduino Client Library for ESP8266 and ESP32 -version=2.0.7 +version=2.0.8 author=Mobizt diff --git a/src/Firebase_ESP_Client.cpp b/src/Firebase_ESP_Client.cpp index 4d614b6a3..b7bff9efe 100644 --- a/src/Firebase_ESP_Client.cpp +++ b/src/Firebase_ESP_Client.cpp @@ -1,9 +1,9 @@ /** - * Google's Firebase ESP Client Main class, Firebase_ESP_Client.h version 2.0.7 + * Google's Firebase ESP Client Main class, Firebase_ESP_Client.h version 2.0.8 * * This library supports Espressif ESP8266 and ESP32 * - * Created March 14, 2021 + * Created March 15, 2021 * * This work is a part of Firebase ESP Client library * Copyright (c) 2020, 2021 K. Suwatchai (Mobizt) diff --git a/src/Firebase_ESP_Client.h b/src/Firebase_ESP_Client.h index 5244ddd49..347d0ff64 100644 --- a/src/Firebase_ESP_Client.h +++ b/src/Firebase_ESP_Client.h @@ -1,9 +1,9 @@ /** - * Google's Firebase ESP Client Main class, Firebase_ESP_Client.h version 2.0.7 + * Google's Firebase ESP Client Main class, Firebase_ESP_Client.h version 2.0.8 * * This library supports Espressif ESP8266 and ESP32 * - * Created March 14, 2021 + * Created March 15, 2021 * * This work is a part of Firebase ESP Client library * Copyright (c) 2020, 2021 K. Suwatchai (Mobizt) diff --git a/src/README.md b/src/README.md index eb28508b4..7447c4455 100644 --- a/src/README.md +++ b/src/README.md @@ -1,7 +1,7 @@ # Firebase Arduino Client Library for ESP8266 and ESP32 -Google's Firebase Arduino Client Library for ESP8266 and ESP32 v 2.0.7 +Google's Firebase Arduino Client Library for ESP8266 and ESP32 v 2.0.8 The default filessystem used in the library is flash and SD. diff --git a/src/wcs/esp32/FB_HTTPClient32.cpp b/src/wcs/esp32/FB_HTTPClient32.cpp index c4001402f..13ef3e834 100644 --- a/src/wcs/esp32/FB_HTTPClient32.cpp +++ b/src/wcs/esp32/FB_HTTPClient32.cpp @@ -2,7 +2,7 @@ * Customized version of ESP32 HTTPClient Library. * Allow custom header and payload * - * v 1.0.7 + * v 1.0.8 * * The MIT License (MIT) * Copyright (c) 2021 K. Suwatchai (Mobizt) @@ -130,19 +130,10 @@ bool FB_HTTPClient32::connect(void) void FB_HTTPClient32::setInsecure() { -#ifdef CONFIG_ARDUINO_IDF_BRANCH - size_t len = strlen_P(esp_idf_branch_str); - char *tmp = new char[len + 1]; - memset(tmp, 0, len + 1); - std::string s = CONFIG_ARDUINO_IDF_BRANCH; - size_t p1 = s.find(tmp, 0); - if (p1 != std::string::npos) - { - float v = atof(s.substr(p1 + len, s.length() - p1 - len).c_str()); - if (v >= 3.3f) - _wcs->setInsecure(); - } - delete[] tmp; +#if __has_include() +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(3, 3, 0) + _wcs->setInsecure(); +#endif #endif } diff --git a/src/wcs/esp32/FB_HTTPClient32.h b/src/wcs/esp32/FB_HTTPClient32.h index ea7dfdf8c..cb2818ba9 100644 --- a/src/wcs/esp32/FB_HTTPClient32.h +++ b/src/wcs/esp32/FB_HTTPClient32.h @@ -2,7 +2,7 @@ * Customized version of ESP32 HTTPClient Library. * Allow custom header and payload * - * v 1.0.7 + * v 1.0.8 * * The MIT License (MIT) * Copyright (c) 2021 K. Suwatchai (Mobizt) @@ -46,6 +46,10 @@ #error WiFi UART bridge was not supported. #endif +#if __has_include() +#include +#endif + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #define FLASH_FS DEFAULT_FLASH_FS