From 29976f99dfe1b532d4a5a31bac8c779d5f1609ff Mon Sep 17 00:00:00 2001 From: wysiwyng <4764286+wysiwyng@users.noreply.github.com> Date: Tue, 20 Feb 2018 17:04:42 +0100 Subject: [PATCH] check for max #schedules working --- code/espurna/scheduler.ino | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/code/espurna/scheduler.ino b/code/espurna/scheduler.ino index 0603e048..ecd1c470 100644 --- a/code/espurna/scheduler.ino +++ b/code/espurna/scheduler.ino @@ -18,7 +18,7 @@ Adapted by Xose PĂ©rez void _schWebSocketOnSend(JsonObject &root){ root["schVisible"] = 1; - root["maxScheduled"] = SCHEDULER_MAX_SCHEDULES; + root["maxSchedules"] = SCHEDULER_MAX_SCHEDULES; JsonArray &sch = root.createNestedArray("schedule"); for (byte i = 0; i < SCHEDULER_MAX_SCHEDULES; i++) { if (!hasSetting("schSwitch", i)) break; @@ -138,7 +138,7 @@ void _schCheck() { relayStatus(sch_switch, sch_action); } } - DEBUG_MSG_P(PSTR("[SCH] Schedule #%d TRIGGERED!!\n"), sch_switch); + DEBUG_MSG_P(PSTR("[SCH] Schedule #%d TRIGGERED!!\n"), i); // Show minutes to trigger every 15 minutes // or every minute if less than 15 minutes to scheduled time. @@ -155,13 +155,9 @@ void _schCheck() { ); } #endif - } - } - } - } void _schLoop() { @@ -176,7 +172,6 @@ void _schLoop() { last_minute = current_minute; _schCheck(); } - } // -----------------------------------------------------------------------------