Skip to content

Commit e2d65d8

Browse files
committed
Fix ESP8266 compilation error.
1 parent 7feb65d commit e2d65d8

File tree

14 files changed

+621
-388
lines changed

14 files changed

+621
-388
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ESP Line Notify",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"keywords": "communication, REST, esp32, esp8266, arduino",
55
"description": "Line Notify Library for ESP8266 and ESP32. Send the Line notification message, sticker, map and images. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.",
66
"repository": {

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name=ESP Line Notify
22

3-
version=2.1.0
3+
version=2.1.1
44

55
author=Mobizt
66

src/ESP_Line_Notify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* LINE Notify Arduino Library for Arduino version 2.0.0
2+
* LINE Notify Arduino Library for Arduino version 2.1.1
33
*
4-
* Created May 5, 2022
4+
* Created May 30, 2023
55
*
66
*
77
* The MIT License (MIT)

src/ESP_Line_Notify.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* LINE Notify Arduino Library for Arduino version 2.0.0
2+
* LINE Notify Arduino Library for Arduino version 2.1.1
33
*
4-
* Created May 5, 2022
4+
* Created May 30, 2023
55
*
66
*
77
* The MIT License (MIT)

src/ESP_Line_Notify_Const.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define ESP_LINE_NOTIFY_CONST_H
33

44
#include <Arduino.h>
5+
#include "FS_Config.h"
56

67
#include "wcs/ESP_Line_Notify_Clients.h"
78

src/json/FirebaseJson.cpp

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
2-
* FirebaseJson, version 3.0.0
2+
* FirebaseJson, version 3.0.6
33
*
44
* The Easiest Arduino library to parse, create and edit JSON object using a relative path.
55
*
6-
* Created May 6, 2022
6+
* Created March 5, 2023
77
*
88
* Features
99
* - Using path to access node element in search style e.g. json.get(result,"a/b/c")
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* The MIT License (MIT)
17-
* Copyright (c) 2022 K. Suwatchai (Mobizt)
17+
* Copyright (c) 2023 K. Suwatchai (Mobizt)
1818
* Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
1919
*
2020
*
@@ -205,36 +205,27 @@ void FirebaseJsonBase::mAdd(MB_VECTOR<MB_String> keys, MB_JSON **parent, int beg
205205
}
206206
}
207207

208-
void FirebaseJsonBase::makeList(const char *str, MB_VECTOR<MB_String> &keys, char delim)
208+
void FirebaseJsonBase::makeList(const MB_String &str, MB_VECTOR<MB_String> &keys, char delim)
209209
{
210210
clearList(keys);
211-
212-
int current = 0, previous = 0;
213-
current = strpos(str, delim, 0);
211+
size_t current, previous = 0;
212+
current = str.find(delim, previous);
214213
MB_String s;
215-
while (current != -1)
214+
while (current != MB_String::npos)
216215
{
217-
s.clear();
218-
substr(s, str, previous, current - previous);
219-
trim(s);
220-
if (s.length() > 0)
221-
keys.push_back(s);
222-
216+
pushLish(str.substr(previous, current - previous), keys);
223217
previous = current + 1;
224-
current = strpos(str, delim, previous);
218+
current = str.find(delim, previous);
225219
}
220+
pushLish(str.substr(previous, current - previous), keys);
221+
}
226222

227-
s.clear();
228-
229-
if (previous > 0 && current == -1)
230-
substr(s, str, previous, strlen(str) - previous);
231-
else
232-
s = str;
233-
234-
trim(s);
223+
void FirebaseJsonBase::pushLish(const MB_String &str, MB_VECTOR<MB_String> &keys)
224+
{
225+
MB_String s = str;
226+
s.trim();
235227
if (s.length() > 0)
236228
keys.push_back(s);
237-
s.clear();
238229
}
239230

240231
void FirebaseJsonBase::clearList(MB_VECTOR<MB_String> &keys)

0 commit comments

Comments
 (0)