Rockbox mail archiveSubject: Re: Alarm feature
Re: Alarm feature
From: Uwe Freese <mail_at_uwe-freese.de>
Date: Tue, 25 Mar 2003 11:30:31 +0100
Alexandre FLAMENT wrote on Tuesday, March 25, 2003, 10:58:31 AM:
>>>With current rockbox, when I set alarm, it shutdown just after.
>>Oh, I can see how that can be annoying.
>>Uwe, is there a reason for this or was it just the way you did it when you wrote the code for your own mod?
AF> I didn't wrote code but I found a power_off() in apps/alarm_menu.c, is
AF> it really need ?
Ahh. Yes! ;-))
It must be avoided that the alarm is set in the RTC and the device is
not turned off. If the alarm goes on when the device is on, it presses
the on button forever and the device "hangs"! Currently, if the device
is turned on, the alarm is automatically turned off (the RTC does it by
itself when the main power goes on for the RTC).
So for the behaviour you want, the alarm menu has to changed that the
user can set the alarm to "no alarm". The boolean "alarm on/off" has
to be saved in the config block (the alarm time itself is stored in
RTC). And finally, the alarm has to be set each time before shutting
down. And this is what's a little bit tricky. As you may know, the AJB
has Hardware shutdown when pressing OFF for a long time. So we have to
set the alarm just when the user presses off and disable it again if
he releases the key (if he pressed OFF only a short time, not turning
off the device).
This all could be implemented and should work without problems. I just
didn't need that feature.
That's how I use the alarm: When I go to bed, I go to the alarm menu,
set the time when I want to wake up (this time is different every day
- I'm a student <g>) and activate it.
The behaviour you want only saves time (no need to enter the alarm
menu every time) if one wants to wake up *every day* and at the *same
time every day*. And this was not the case here.
Question: Should the proposed behaviour added? Is there anybody out
here who is willing to do this or should I do it (this will take 1-2
weeks, because I don't have so much time right now).
Received on 2003-03-25