Cleaning and optimization

This commit is contained in:
Dmitry Borisenko
2020-11-19 04:14:52 +03:00
parent 4f9763334b
commit 70c34d3d8d
15 changed files with 29 additions and 978 deletions

View File

@@ -52,7 +52,7 @@ void telegramMsgParse(String msg) {
}
else if (msg.indexOf("get") != -1) {
msg = deleteBeforeDelimiter(msg, "_");
myBot->sendMessage(jsonReadInt(configSetupJson, "chatId"), jsonReadStr(configLiveJson, msg));
myBot->sendMessage(jsonReadInt(configSetupJson, "chatId"), getValue(msg)); //jsonReadStr(configLiveJson , msg));
SerialPrint("<-", "Telegram", "chat ID: " + String(jsonReadInt(configSetupJson, "chatId")) + ", msg: " + String(msg));
}
else if (msg.indexOf("all") != -1) {
@@ -99,7 +99,7 @@ String returnListOfParams() {
count++;
if (count > 1) {
String id = selectFromMarkerToMarker(buf, ";", 2);
String value = jsonReadStr(configLiveJson, id);
String value = getValue(id); //jsonReadStr(configLiveJson , id);
String page = selectFromMarkerToMarker(buf, ";", 4);
page.replace("#", " ");
String name = selectFromMarkerToMarker(buf, ";", 5);