Отключаем 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 //#pragma once
#include "Global.h" //#include "Global.h"
#include "MqttClient.h" //#include "MqttClient.h"
void eventGen2(String eventName, String eventValue); //void eventGen2(String eventName, String eventValue);
extern void spaceCmdExecute(String &cmdStr); //extern void spaceCmdExecute(String &cmdStr);
extern String getValueJson(String &key); //extern String getValueJson(String &key);

View File

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