2020-10-20 17:22:26 +03:00
|
|
|
#include "Class/LineParsing.h"
|
2020-11-04 23:48:21 +03:00
|
|
|
#include "BufferExecute.h"
|
2020-10-20 17:22:26 +03:00
|
|
|
#include "Global.h"
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
|
|
|
|
void sysUptime() {
|
|
|
|
|
myLineParsing.update();
|
|
|
|
|
String key = myLineParsing.gkey();
|
|
|
|
|
sCmd.addCommand(key.c_str(), uptimeReading);
|
2020-10-20 23:58:23 +03:00
|
|
|
sensorReadingMap30sec += key + ",";
|
2020-10-20 17:22:26 +03:00
|
|
|
myLineParsing.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void uptimeReading() {
|
|
|
|
|
String key = sCmd.order();
|
|
|
|
|
String uptime = timeNow->getUptime();
|
|
|
|
|
jsonWriteStr(configLiveJson, key, uptime);
|
|
|
|
|
publishStatus(key, uptime);
|
2020-10-20 22:55:45 +03:00
|
|
|
SerialPrint("I", "Sensor", "'" + key + "' data: " + uptime);
|
2020-10-20 17:22:26 +03:00
|
|
|
}
|