mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
devide into files
This commit is contained in:
29
src/items/mInputTime.cpp
Normal file
29
src/items/mInputTime.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "items/itemsGlobal.h"
|
||||
#include "Class/Input.h"
|
||||
//==========================================Модуль ввода времени============================================
|
||||
//input-time time1 inputTime Ввод Введите.время 4 st[10-00-00]
|
||||
//==========================================================================================================
|
||||
void inputTime() {
|
||||
myInput = new Input();
|
||||
myInput->update();
|
||||
String key = myInput->gkey();
|
||||
sCmd.addCommand(key.c_str(), inputTimeSet);
|
||||
myInput->inputSetDefaultStr();
|
||||
myInput->clear();
|
||||
}
|
||||
|
||||
void inputTimeSet() {
|
||||
String key = sCmd.order();
|
||||
String state = sCmd.next();
|
||||
myInput->inputSetStr(key, state);
|
||||
}
|
||||
|
||||
void handle_time_init() {
|
||||
ts.add(
|
||||
TIME, 1000, [&](void *) {
|
||||
jsonWriteStr(configLiveJson, "time", timeNow->getTime());
|
||||
jsonWriteStr(configLiveJson, "timenow", timeNow->getTimeJson());
|
||||
//eventGen("timenow", "");
|
||||
},
|
||||
nullptr, true);
|
||||
}
|
||||
Reference in New Issue
Block a user