Acustic 'empty battery warning' ?

Fox Mulder Quakeman1 at gmx.net
Wed Dec 17 23:45:12 CET 2008


With an FSO based system you could do this easily with help of oevents.
In the file /etc/freesmartphone/oevents/rules.yaml exists two entries
for actions to be taken when the battery is nearly empty. You could
easily edit these entries and do LED actions or play some sound files.
The relevant entries are these:

    while: PowerStatus()
    filters: HasAttr(status, "critical")
    actions: SetLed("gta02_power_orange", "blink")

    trigger: PowerStatus()
    filters: HasAttr(status, "empty")
    actions: Command('poweroff')

You can add your own actions as described at the beginning of this file.
For example the following line look good for your scenario:

# - PlaySound(file)         : Action that starts to play an audio file

I already edited this file to start the red AUX LED blinking when on
battery to see if my freerunner is in standby or just the screen is
blanked. And i also edited the maximum brightness to be 60 and not 90 in
this file to save some energy (bright enough to still see everything
good). So you can do really nice things with help of the oevents rules. :)

Ciao,
     Rainer

Lothar Behrens wrote:
> Hi,
> 
> I am asking me if it is not possible to get an acustic 'empty battery'
> warning some time before my phone really get's down.
> 
> Is there a way to do this ?
> 
> Is there also a way when the device is in suspend mode, to wakeup and do
> this warning ? 
> 
> Hope there is a solution. Other mobile phones do this :-)
> 
> Thanks
> 
> Lothar
> 
> -- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
> <http://www.lollisoft.de>
> Lothar Behrens
> Heinrich-Scheufelen-Platz 2
> 73252 Lenningen
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community




More information about the community mailing list