You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When any alarm is set for the first time on the device (When the EEPROM has no data) it does ring.
But if the same alarm is set again for any other time, it doesn't ring.
Turns out that in the code, the variable alarm_triggered[relavant_alarm] is not being set to false when ever alarm_enabled = true is the issue.
Have to correct the code snippet below by putting the line alarm_triggered[alarm] = false; below and out of the if statement.
{
delay(50);
alarm_minutes[alarm] = temp_minute;
if (!alarm_enabled)
{
alarm_enabled = true;
save_is_alarm_enabled();
for (int i = 0; i < n_alarms; i++)
{
alarm_triggered[i] = true;
}
}
alarm_triggered[alarm] = false;
show_modal_page(alarm_ring, 1000, "Alarm set to " + formatNumber(temp_hour) + ":" + formatNumber(temp_minute), 10);
save_alarm(alarm);
break;
}
Code snippet is inside the function set_alarm(int alarm) inside alarms.cpp.
The text was updated successfully, but these errors were encountered:
When any alarm is set for the first time on the device (When the EEPROM has no data) it does ring.
But if the same alarm is set again for any other time, it doesn't ring.
Turns out that in the code, the variable
alarm_triggered[relavant_alarm]
is not being set to false when everalarm_enabled
=true
is the issue.Have to correct the code snippet below by putting the line
alarm_triggered[alarm] = false;
below and out of the if statement.Code snippet is inside the function
set_alarm(int alarm)
insidealarms.cpp
.The text was updated successfully, but these errors were encountered: