4 bool enable_hourly = cfg.getBoolValue(F("enable_hourly"));
5 int hourly_count = cfg.getIntValue(F("hourly_count"));
6 bool hourly_night = cfg.getBoolValue(F("hourly_night"));
7 int hourly_beep_ms = cfg.getIntValue(F("hourly_beep_ms"));
8 int hourly_silent_ms = cfg.getIntValue(F("hourly_silent_ms"));
9 int hourly_tone = cfg.getIntValue(F("hourly_tone"));
10 if ( enable_hourly && hourly_count && (!isNight() || hourly_night)) {
11 int length = hourly_count * hourly_beep_ms + (hourly_count - 1) * hourly_silent_ms;
12 beep(hourly_tone, length, hourly_beep_ms, hourly_silent_ms);
17 bool enable_alarm = cfg.getBoolValue(F("enable_alarm"));
18 int alarm_hour = cfg.getIntValue(F("alarm_hour"));
19 int alarm_minute = cfg.getIntValue(F("alarm_minute"));
20 const char* alarm_days = cfg.getCharValue(F("alarm_days"));
21 int alarm_tone = cfg.getIntValue(F("alarm_tone"));
22 int alarm_length = cfg.getIntValue(F("alarm_length"));
23 int alarm_beep_ms = cfg.getIntValue(F("alarm_beep_ms"));
24 int alarm_silent_ms = cfg.getIntValue(F("alarm_silent_ms"));
25 if ( enable_alarm && hh == alarm_hour && mi == alarm_minute && alarm_days[dd?dd-1:6]!='0') {
26 beep(alarm_tone, alarm_length * 1000, alarm_beep_ms, alarm_silent_ms);
31 unregisterTimeHandler(F("hourly-beep"));
32 unregisterTimeHandler(F("check-alarm"));
33 registerTimeHandler(F("hourly-beep"),'h',hourlyBeep);
34 registerTimeHandler(F("check-alarm"),'m',checkAlarm);