mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
убрал русские символы
This commit is contained in:
27
src/classes/sendJson.cpp
Normal file
27
src/classes/sendJson.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "classes/sendJson.h"
|
||||
|
||||
SendJson::SendJson() {}
|
||||
SendJson::~SendJson() {}
|
||||
|
||||
void SendJson::sendFile(String path, uint8_t num) {
|
||||
_path = path;
|
||||
_num = num;
|
||||
file = seekFile(path);
|
||||
}
|
||||
|
||||
void SendJson::loop() {
|
||||
if (file.available()) {
|
||||
String jsonArrayElement = _path + file.readStringUntil('}') + "}";
|
||||
sendWs(jsonArrayElement);
|
||||
}
|
||||
}
|
||||
|
||||
void SendJson::sendWs(String& jsonArrayElement) {
|
||||
standWebSocket.sendTXT(_num, jsonArrayElement);
|
||||
}
|
||||
|
||||
void SendJson::sendMqtt(String& jsonArrayElement) {
|
||||
// mqtt send to do
|
||||
}
|
||||
|
||||
SendJson* mySendJson;
|
||||
Reference in New Issue
Block a user