добавил наследника для класса отправки в сокеты

This commit is contained in:
Dmitry Borisenko
2021-12-28 00:01:01 +01:00
parent 4a7b130b26
commit be35992c84
9 changed files with 54 additions and 37 deletions

21
src/сlasses/sendJson.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "сlasses/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('}') + "}";
send(jsonArrayElement, _num);
}
}
SendJson* mySendJson;