mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
22 lines
423 B
C++
22 lines
423 B
C++
|
|
#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;
|