Skip to content

Commit

Permalink
Fix the compilation error in ESP32 SDK version 1.0.4 and earlier.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Mar 14, 2021
1 parent e5855de commit eec144e
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=Firebase Arduino Client Library for ESP8266 and ESP32

version=2.0.7
version=2.0.8

author=Mobizt

Expand Down
4 changes: 2 additions & 2 deletions src/Firebase_ESP_Client.cpp
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/Firebase_ESP_Client.h
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
19 changes: 5 additions & 14 deletions src/wcs/esp32/FB_HTTPClient32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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(<esp_idf_version.h>)
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(3, 3, 0)
_wcs->setInsecure();
#endif
#endif
}

Expand Down
6 changes: 5 additions & 1 deletion src/wcs/esp32/FB_HTTPClient32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -46,6 +46,10 @@
#error WiFi UART bridge was not supported.
#endif

#if __has_include(<esp_idf_version.h>)
#include <esp_idf_version.h>
#endif

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#define FLASH_FS DEFAULT_FLASH_FS
Expand Down

0 comments on commit eec144e

Please sign in to comment.