mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Scenario class in working condition
This commit is contained in:
@@ -131,12 +131,6 @@ void buttonOut() {
|
||||
void buttonOutSet() {
|
||||
String key = sCmd.order();
|
||||
String state = sCmd.next();
|
||||
|
||||
Serial.println("==");
|
||||
Serial.println(key);
|
||||
Serial.println(state);
|
||||
Serial.println("==");
|
||||
|
||||
String pin = jsonReadStr(configOptionJson, key + "_pin");
|
||||
String inv = jsonReadStr(configOptionJson, key + "_inv");
|
||||
if (inv == "") {
|
||||
@@ -230,7 +224,7 @@ void handle_time_init() {
|
||||
TIME, 1000, [&](void *) {
|
||||
jsonWriteStr(configLiveJson, "time", timeNow->getTime());
|
||||
jsonWriteStr(configLiveJson, "timenow", timeNow->getTimeJson());
|
||||
eventGen("timenow", "");
|
||||
//eventGen("timenow", "");
|
||||
},
|
||||
nullptr, true);
|
||||
}
|
||||
|
||||
31
src/main.cpp
31
src/main.cpp
@@ -1,15 +1,16 @@
|
||||
|
||||
#include <SSDP.h>
|
||||
|
||||
#include "Class/CallBackTest.h"
|
||||
#include "Class/NotAsinc.h"
|
||||
#include "Class/Switch.h"
|
||||
#include "Class/ScenarioClass.h"
|
||||
#include "Class/Switch.h"
|
||||
#include "Cmd.h"
|
||||
#include "ItemsList.h"
|
||||
#include "Global.h"
|
||||
#include "Utils\WebUtils.h"
|
||||
#include "Init.h"
|
||||
#include "ItemsList.h"
|
||||
#include "Utils/Timings.h"
|
||||
#include <SSDP.h>
|
||||
#include "Utils\WebUtils.h"
|
||||
|
||||
void not_async_actions();
|
||||
|
||||
@@ -77,8 +78,10 @@ void setup() {
|
||||
SsdpInit();
|
||||
|
||||
ts.add(
|
||||
TEST, 1000 * 60, [&](void*) {
|
||||
pm.info(printMemoryStatus());
|
||||
TEST, 30000, [&](void*) {
|
||||
//pm.info(printMemoryStatus());
|
||||
|
||||
//myScenario->loop();
|
||||
},
|
||||
nullptr, true);
|
||||
|
||||
@@ -106,23 +109,11 @@ void loop() {
|
||||
//loopScenario();
|
||||
loopCmd();
|
||||
loopSerial();
|
||||
|
||||
|
||||
myNotAsincActions->loop();
|
||||
ts.update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void clock_init() {
|
||||
timeNow = new Clock();
|
||||
timeNow->setNtpPool(jsonReadStr(configSetupJson, "ntp"));
|
||||
@@ -134,5 +125,3 @@ void clock_init() {
|
||||
},
|
||||
nullptr, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user