Re: Acustic 'empty battery warning' ?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: List for Openmoko community discussion <community@...>
Date: Wednesday, December 17, 2008 - 6:45 pm

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:

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Acustic 'empty battery warning' ?, Lothar Behrens, (Wed Dec 17, 7:57 am)
Re: Acustic 'empty battery warning' ?, Michael 'Mickey' Lauer, (Thu Dec 18, 7:50 pm)
Re: Acustic 'empty battery warning' ?, Fox Mulder, (Wed Dec 17, 6:45 pm)
Re: Acustic 'empty battery warning' ?, Timo Juhani Lindfors, (Wed Dec 17, 8:16 am)
Re: Acustic 'empty battery warning' ?, William Kenworthy, (Wed Dec 17, 8:35 am)
Re: Acustic 'empty battery warning' ?, Lothar Behrens, (Wed Dec 17, 9:12 am)
Re: Acustic 'empty battery warning' ?, W.Kenworthy, (Wed Dec 17, 8:10 pm)
Re: Acustic 'empty battery warning' ?, Lothar Behrens, (Thu Dec 18, 3:54 am)
Re: Acustic 'empty battery warning' ?, Timo Juhani Lindfors, (Wed Dec 17, 9:30 am)
Re: Acustic 'empty battery warning' ?, Lothar Behrens, (Wed Dec 17, 8:35 am)
Re: Acustic 'empty battery warning' ?, François, (Sat Dec 20, 12:20 pm)
Re: Acustic 'empty battery warning' ?, john dowd, (Mon Dec 22, 10:44 am)
Re: Acustic 'empty battery warning' ?, leonardo, (Wed Dec 17, 8:34 am)
Re: Acustic 'empty battery warning' ?, Neil Jerram, (Wed Dec 17, 8:01 am)