Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0428c73

Browse files
committed
Bug fixes
1 parent7a7578b commit0428c73

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

‎src/FirebaseArduino.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void FirebaseArduino::setBool(const String& path, bool value) {
6161
}
6262

6363
voidFirebaseArduino::setString(const String& path,const String& value) {
64-
JsonVariantjson(value);
64+
JsonVariantjson(value.c_str());
6565
set(path, json);
6666
}
6767

‎src/FirebaseArduino.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#ifndef FIREBASE_ARDUINO_H
1818
#defineFIREBASE_ARDUINO_H
1919

20+
#include<string>
21+
// This is needed to compile std::string on esp8266.
22+
templateclassstd::basic_string<char>;
23+
2024
#include"Firebase.h"
2125
#include"FirebaseObject.h"
2226

‎src/FirebaseHttpClient_Esp8266.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
#include<sstream>
21

32
#include"FirebaseHttpClient.h"
43

4+
#include<stdio.h>
5+
56
// The ordering of these includes matters greatly.
67
#include<WiFiClientSecure.h>
78
#include<ESP8266WiFi.h>
@@ -60,9 +61,9 @@ class FirebaseHttpClientEsp8266 : public FirebaseHttpClient {
6061

6162
std::stringerrorToString(int error_code)override {
6263
#ifdef USE_ESP_ARDUINO_CORE_2_0_0
63-
std::ostringstream ss;
64-
ss << error_code;
65-
returnss.str();
64+
char buff[11];
65+
itoa(error_code, buff,10);
66+
returnbuff;
6667
#else
6768
returnHTTPClient::errorToString(error_code).c_str();
6869
#endif

‎test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ firebase-test: ${OBJS}
5151
check: firebase-test
5252
./firebase-test
5353

54+
#TODO: had to echo this because it picks up FirebaseObject.h as well and deletes it :(
5455
clean:
5556
echo rm -f${OBJS} firebase-test

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp