Fix timer re-trigger after restart

5.14.0a
 * Fix timer re-trigger within one minute after restart (#2744)
This commit is contained in:
Theo Arends 2018-05-16 17:17:31 +02:00
parent b67a1291e9
commit 25ba74cfb4
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
/* 5.14.0a
* Add Eastron SDM630 energy meter (#2735)
* Add KNX communication enhancement (#2742)
* Fix timer re-trigger within one minute after restart (#2744)
*
* 5.14.0 20180515
* Update language files

View File

@ -262,7 +262,7 @@ void TimerEverySecond()
{
if (RtcTime.valid) {
if (!RtcTime.hour && !RtcTime.minute && !RtcTime.second) { TimerSetRandomWindows(); } // Midnight
if (RtcTime.minute != timer_last_minute) { // Execute every minute only once
if ((uptime > 60) && (RtcTime.minute != timer_last_minute)) { // Execute from one minute after restart every minute only once
timer_last_minute = RtcTime.minute;
int16_t time = (RtcTime.hour *60) + RtcTime.minute;
uint8_t days = 1 << (RtcTime.day_of_week -1);