Отключаем Buffers модуль

This commit is contained in:
2022-10-28 16:22:18 +03:00
parent 593bebd0de
commit 305a5f5ccb
2 changed files with 33 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
#pragma once
#include "Global.h"
#include "MqttClient.h"
//#pragma once
//#include "Global.h"
//#include "MqttClient.h"
void eventGen2(String eventName, String eventValue);
extern void spaceCmdExecute(String &cmdStr);
extern String getValueJson(String &key);
//void eventGen2(String eventName, String eventValue);
//extern void spaceCmdExecute(String &cmdStr);
//extern String getValueJson(String &key);

View File

@@ -1,35 +1,35 @@
#include "Buffers.h"
//#include "Buffers.h"
//генеирует событие
void eventGen2(String eventName, String eventValue) {
if (!jsonReadBool(settingsFlashJson, "scen")) {
return;
}
String event = eventName + " " + eventValue + ",";
eventBuf += event;
// void eventGen2(String eventName, String eventValue) {
// if (!jsonReadBool(settingsFlashJson, "scen")) {
// return;
// }
// String event = eventName + " " + eventValue + ",";
// eventBuf += event;
SerialPrint("i", "Event add", eventName + " " + eventValue);
// SerialPrint("i", "Event add", eventName + " " + eventValue);
if (jsonReadBool(settingsFlashJson, "MqttOut")) {
if (eventName != "timenow") {
publishEvent(eventName, eventValue);
}
}
}
// if (jsonReadBool(settingsFlashJson, "MqttOut")) {
// if (eventName != "timenow") {
// publishEvent(eventName, eventValue);
// }
// }
// }
void spaceCmdExecute(String& cmdStr) {
cmdStr += "\r\n";
cmdStr.replace("\r\n", "\n");
cmdStr.replace("\r", "\n");
while (cmdStr.length()) {
String buf = selectToMarker(cmdStr, "\n");
if (buf != "") {
sCmd.readStr(buf);
SerialPrint("i", F("Order done W"), buf);
}
cmdStr = deleteBeforeDelimiter(cmdStr, "\n");
}
}
// void spaceCmdExecute(String& cmdStr) {
// cmdStr += "\r\n";
// cmdStr.replace("\r\n", "\n");
// cmdStr.replace("\r", "\n");
// while (cmdStr.length()) {
// String buf = selectToMarker(cmdStr, "\n");
// if (buf != "") {
// sCmd.readStr(buf);
// SerialPrint("i", F("Order done W"), buf);
// }
// cmdStr = deleteBeforeDelimiter(cmdStr, "\n");
// }
// }
// String getValueJson(String& key) {
// String live = jsonReadStr(paramsHeapJson, key);