schedule commands timing, retry

This commit is contained in:
MichaelDvP
2023-02-27 09:16:41 +01:00
parent 84c90dd587
commit f48aeb0917
2 changed files with 76 additions and 52 deletions

View File

@@ -23,6 +23,7 @@
#define EMSESP_SCHEDULER_SERVICE_PATH "/rest/schedule" // GET and POST
#define SCHEDULEFLAG_SCHEDULE_TIMER 0x80 // 7th bit for Timer
#define MAX_STARTUP_RETRIES 3 // retry the statup commands x times
namespace emsesp {
@@ -36,6 +37,7 @@ class ScheduleItem {
std::string cmd;
std::string value;
std::string description;
uint8_t retry_cnt;
};
class WebScheduler {
@@ -52,6 +54,7 @@ class WebSchedulerService : public StatefulService<WebScheduler> {
void begin();
void loop();
bool command(std::string cmd, std::string data);
// make all functions public so we can test in the debug and standalone mode
#ifndef EMSESP_STANDALONE