clock fix

This commit is contained in:
Yuri Trikoz
2020-06-27 04:20:48 +03:00
parent 39a3cb04ed
commit 7ac0691347
7 changed files with 69 additions and 74 deletions

View File

@@ -15,7 +15,7 @@ SoftwareSerial *mySerial = nullptr;
void getData();
void CMD_init() {
void cmd_init() {
sCmd.addCommand("button", button);
sCmd.addCommand("buttonSet", buttonSet);
sCmd.addCommand("buttonChange", buttonChange);
@@ -330,10 +330,8 @@ void timeSet() {
void handle_time_init() {
ts.add(
TIME, 1000, [&](void *) {
String tmp = timeNow->getTime();
jsonWriteStr(configLiveJson, "time", tmp);
tmp.replace(":", "-");
jsonWriteStr(configLiveJson, "timenow", tmp);
jsonWriteStr(configLiveJson, "time", timeNow->getTime());
jsonWriteStr(configLiveJson, "timenow", timeNow->getTimeJson());
eventGen("timenow", "");
},
nullptr, true);