X-Git-Url: https://git.rvb.name/esp-clock.git/blobdiff_plain/dab14a20e37e760a82b72f50f765caa26fff556e..0174683f7a6c4fb500e69b4eaffc6613bb865617:/alarm.cpp?ds=sidebyside diff --git a/alarm.cpp b/alarm.cpp index 4028b6c..e609dba 100644 --- a/alarm.cpp +++ b/alarm.cpp @@ -22,7 +22,7 @@ void checkAlarm() { int alarm_length = cfg.getIntValue(F("alarm_length")); int alarm_beep_ms = cfg.getIntValue(F("alarm_beep_ms")); int alarm_silent_ms = cfg.getIntValue(F("alarm_silent_ms")); - if ( enable_alarm && hh == alarm_hour && mi == alarm_minute && alarm_days[dd?dd-1:6]!='0') { + if ( enable_alarm && (hh == alarm_hour) && (mi == alarm_minute) && (alarm_days[dw?dw-1:6]!='0')) { beep(alarm_tone, alarm_length * 1000, alarm_beep_ms, alarm_silent_ms); } }