Add option 0 to command Timers

6.0.0a
* Add option 0 to command Timers disarming all timers (#2962)
This commit is contained in:
Theo Arends 2018-06-26 16:44:17 +02:00
parent 862623b295
commit 6a9a996e98
2 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
/* 6.0.0a /* 6.0.0a
* Add option 0 to command Timers disarming all timers (#2962)
* Add time in minutes to rule Time#Initialized, Time#set and Time#Minute (#2669) * Add time in minutes to rule Time#Initialized, Time#set and Time#Minute (#2669)
* Add rule variables %time% for minutes since midnight, %uptime%, %sunrise% and %sunset% giving time in minutes (#2669) * Add rule variables %time% for minutes since midnight, %uptime%, %sunrise% and %sunset% giving time in minutes (#2669)
* Add heap and stack debug information * Add heap and stack debug information

View File

@ -451,6 +451,11 @@ boolean TimerCommand()
} }
} }
else if (CMND_TIMERS == command_code) { else if (CMND_TIMERS == command_code) {
if (XdrvMailbox.data_len && (XdrvMailbox.payload == 0)) {
for (byte i = 0; i < MAX_TIMERS; i++) {
Settings.timer[i].arm = 0; // Disable all timers
}
}
byte jsflg = 0; byte jsflg = 0;
byte lines = 1; byte lines = 1;
for (byte i = 0; i < MAX_TIMERS; i++) { for (byte i = 0; i < MAX_TIMERS; i++) {