продолжение переписи api

This commit is contained in:
Dmitry Borisenko
2022-10-09 17:04:05 +02:00
parent 8287bb9ebb
commit fe30d7c27d
7 changed files with 84 additions and 86 deletions

View File

@@ -228,14 +228,14 @@ class Loging : public IoTItem {
String topic = mqttRootDevice + "/" + id;
String json = "{\"maxCount\":0,\"topic\":\"" + topic + "\",\"status\":[]}";
String pk = "/string/chart.json|" + json;
standWebSocket.broadcastTXT(pk);
//standWebSocket.broadcastTXT(pk);
}
void publishChartToWsSinglePoint(String value) {
String topic = mqttRootDevice + "/" + id;
String json = "{\"maxCount\":" + String(calculateMaxCount()) + ",\"topic\":\"" + topic + "\",\"status\":[{\"x\":" + String(unixTime) + ",\"y1\":" + value + "}]}";
String pk = "/string/chart.json|" + json;
standWebSocket.broadcastTXT(pk);
//standWebSocket.broadcastTXT(pk);
}
void setPublishDestination(int publishType, int wsNum = -1) {

View File

@@ -192,7 +192,7 @@ class LogingDaily : public IoTItem {
String topic = mqttRootDevice + "/" + id;
String json = "{\"maxCount\":" + String(calculateMaxCount()) + ",\"topic\":\"" + topic + "\",\"status\":[{\"x\":" + String(unixTime) + ",\"y1\":" + value + "}]}";
String pk = "/string/chart.json|" + json;
standWebSocket.broadcastTXT(pk);
//standWebSocket.broadcastTXT(pk);
}
void setPublishDestination(int publishType, int wsNum = -1) {