mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-28 15:12:19 +03:00
продолжение переписи api
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user