X-Git-Url: https://git.rvb.name/esp-clock.git/blobdiff_plain/9d5bed5c1af4aca9cb37dbff3e111f51c67da451..7fff81f521f6b9d6f277d972f59411452fb4a677:/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); } }