avoid min+hour to be out of range after changing the batteries
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3375 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
21130ebc29
commit
5bfa9b7548
1 changed files with 12 additions and 7 deletions
|
@ -46,7 +46,12 @@ bool alarm_screen(void)
|
|||
|
||||
rtc_get_alarm(&h, &m);
|
||||
|
||||
m = m / 5 * 5; /* 5 min accuracy should be enough */
|
||||
if (m > 60 || h > 24) { /* after battery-change RTC-values are out of range */
|
||||
m = 0;
|
||||
h = 12;
|
||||
} else {
|
||||
m = m / 5 * 5; /* 5 min accuracy should be enough */
|
||||
}
|
||||
|
||||
bool done=false;
|
||||
char buf[32];
|
||||
|
|
Loading…
Reference in a new issue