X-Git-Url: https://git.rvb.name/esp-clock.git/blobdiff_plain/dab14a20e37e760a82b72f50f765caa26fff556e..6d3be4253d91ef9289fa4f3b7e280b2258fabaf1:/alarm.cpp?ds=sidebyside diff --git a/alarm.cpp b/alarm.cpp index 4028b6c..2964418 100644 --- a/alarm.cpp +++ b/alarm.cpp @@ -22,8 +22,9 @@ 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); + reportMessage(F("Будильник сработал!")); } }