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,
RainerLothar Behrens wrote:
_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
