summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristi Scarborough <christi@coraline.org>2005-02-06 17:21:42 +0000
committerChristi Scarborough <christi@coraline.org>2005-02-06 17:21:42 +0000
commita83ffb208f53a91aeab09b933e3544ec29919ce1 (patch)
tree1aa7f5fe667b2d65cf3482a5488539d7d25cec90 /apps
parent59eb461f8255b636800c120d7640d10d6a15e175 (diff)
downloadrockbox-a83ffb208f53a91aeab09b933e3544ec29919ce1.tar.gz
rockbox-a83ffb208f53a91aeab09b933e3544ec29919ce1.zip
A proper alarm clock for the V2/FM (and v1 with mod)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5818 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/alarm_menu.c18
-rw-r--r--apps/lang/english.lang8
2 files changed, 14 insertions, 12 deletions
diff --git a/apps/alarm_menu.c b/apps/alarm_menu.c
index 20b2f51821..47d2c1226b 100644
--- a/apps/alarm_menu.c
+++ b/apps/alarm_menu.c
@@ -82,20 +82,11 @@ bool alarm_screen(void)
82 lcd_update(); 82 lcd_update();
83 rtc_init(); 83 rtc_init();
84 rtc_set_alarm(h,m); 84 rtc_set_alarm(h,m);
85 /* in some cases enabling the alarm results in an activated AF flag */ 85 rtc_enable_alarm(true);
86 /* this should not happen, but it does */
87 /* if you know why, tell me! */
88 /* for now, we try again forever in this case */
89 while (rtc_enable_alarm(true)) { /* error occured */
90 sleep(HZ / 10);
91 rtc_init();
92 rtc_set_alarm(h,m);
93 }
94 sleep(HZ);
95 lcd_puts(0,1,str(LANG_ALARM_MOD_SHUTDOWN)); 86 lcd_puts(0,1,str(LANG_ALARM_MOD_SHUTDOWN));
96 lcd_update(); 87 lcd_update();
97 sleep(HZ); 88 sleep(HZ);
98 power_off(); 89 done = true;
99 } else { 90 } else {
100 lcd_clear_display(); 91 lcd_clear_display();
101 lcd_puts(0,0,str(LANG_ALARM_MOD_ERROR)); 92 lcd_puts(0,0,str(LANG_ALARM_MOD_ERROR));
@@ -150,6 +141,11 @@ bool alarm_screen(void)
150 case BUTTON_STOP: 141 case BUTTON_STOP:
151 case BUTTON_MENU: 142 case BUTTON_MENU:
152#endif 143#endif
144 lcd_clear_display();
145 lcd_puts(0,0,str(LANG_ALARM_MOD_DISABLE));
146 lcd_update();
147 sleep(HZ);
148 rtc_enable_alarm(false);
153 done = true; 149 done = true;
154 break; 150 break;
155 } 151 }
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 827ec0d002..82e3da494c 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -1155,7 +1155,7 @@ new:
1155 1155
1156id: LANG_ALARM_MOD_SHUTDOWN 1156id: LANG_ALARM_MOD_SHUTDOWN
1157desc: The text that tells the user that the alarm time is ok and the device shuts off (for the RTC alarm mod). 1157desc: The text that tells the user that the alarm time is ok and the device shuts off (for the RTC alarm mod).
1158eng: "Shutting Down..." 1158eng: "Alarm Set"
1159voice: "" 1159voice: ""
1160new: 1160new:
1161 1161
@@ -3003,3 +3003,9 @@ desc: Start Rockbox in Recording screen
3003eng: "Show recording screen on startup" 3003eng: "Show recording screen on startup"
3004voice: "Show recording screen on startup" 3004voice: "Show recording screen on startup"
3005new: 3005new:
3006
3007id: LANG_ALARM_MOD_DISABLE
3008desc: Announce that the RTC alarm has been turned off
3009eng: "Alarm Disabled"
3010voice: "Alarm Disabled"
3011new: