Depending on your distribution, that should be a one-liner in the rules.
See how we blink the red power led on critical status and add an_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
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_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
while true; do
if [ `capacity` -lt 10 ]; then
alert
fi
sleep 120I'm guessing yes but I do not know the PMU stuff well.
_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
Doesnt it already do that - I know that in the middle of the night I
used to get regularly awakened by a "shfffft" sound from the Fr as theIts actually a good idea - I use a couple of perl scripts to flash the
leds in various colours/rates to indicate charge. Doesnt help when shut
down though. Perhaps a cron job to wake every hour and check the
charge, then go back to sleep? Does cron work on the FR these days?BillK
--
William Kenworthy <billk@iinet.net.au>
Home in Perth!_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
--Apple-Mail-4--43210596
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bitHmm,
using the clock to wake me up in the morning would be an option to
check the
battery.It even wakes up, or boots, if I have shut down the phone :-)
If the clock is not at a really alarm time (to wake me up :-),
it could configure the next wakeup to check the battery.Is that a solution if PMU doesn't support us with another solution ?
Lothar
-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen--Apple-Mail-4--43210596
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; "><div>Hmm,</div><div><br =
class=3D"webkit-block-placeholder"></div><div>using the clock to wake me =
up in the morning would be an option to check =
the</div><div>battery.</div><div><br =
class=3D"webkit-block-placeholder"></div><div>It even wakes up, or =
boots, if I have shut down the phone :-)</div><div><br =
class=3D"webkit-block-placeholder"></div><div>If the clock is not at a =
really alarm time (to wake me up :-), </div><div>it could configure =
the next wakeup to check the battery.</div><div><br =
class=3D"webkit-block-placeholder"></div><div>Is that a solution if PMU =
doesn't support us with another solution ?</div><div><br =
class=3D"webkit-block-placeholder"></div><div>Lothar</div><div><br></div><=
div><div>Am 17.12.2008 um 13:35 schrieb William Kenworthy:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite">Doesnt it =
already d...
What distro? - clock doesnt work on 2008.9 through to the current
testing.BillK
_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
--Apple-Mail-2-24073028
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bitIt's only an idea. Indeed I currently have ASU 2008/9.
Lothar
-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen--Apple-Mail-2-24073028
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; ">It's only an idea. Indeed I =
currently have ASU 2008/9.<div><br =
class=3D"webkit-block-placeholder"></div><div>Lothar</div><div><br><div><d=
iv>Am 18.12.2008 um 01:10 schrieb W.Kenworthy:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite">What =
distro? - clock doesnt work on 2008.9 through to the =
current<br>testing.<br><br>BillK<br><br><br>On Wed, 2008-12-17 at 14:12 =
+0100, Lothar Behrens wrote:<br><blockquote =
type=3D"cite">Hmm,<br></blockquote><blockquote =
type=3D"cite"><br></blockquote><blockquote =
type=3D"cite"><br></blockquote><blockquote type=3D"cite">using the clock =
to wake me up in the morning would be an option =
to<br></blockquote><blockquote type=3D"cite">check =
the<br></blockquote><blockquote =
type=3D"cite">battery.<br></blockquote><blockquote =
type=3D"cite"><br></blockquote><blockquote =
type=3D"cite"><br></blockquote><blockquote type=3D"cite">It even wakes =
type=3D"cite"><br></blockquote><blockquote type=3D"cite">If the clock =
is not at a really alarm time (to wake me up :-), =
<br></blockquote><blockquote type=3D"cite">it could configure the next =
wa...
Sure, make the phone wake up every 2 hours to check battery level.
_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
--Apple-Mail-3--45471066
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen--Apple-Mail-3--45471066
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; "><br><div><div>Am 17.12.2008 um =
13:16 schrieb Timo Juhani Lindfors:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite">Lothar =
Behrens <<a =
?<br></blockquote><br>while true; do<br> if [ `capacity` -lt 10 ]; =
then<br> alert<br> fi<br> =
sleep 120<br>done<br><br></blockquote><div><br></div><div>this is =
a starting point :-)</div><br><blockquote type=3D"cite"><blockquote =
type=3D"cite">Is there also a way when the device is in suspend mode, to =
wakeup and<br></blockquote><blockquote type=3D"cite">do this warning =
?<br></blockquote><br>I'm guessing yes but I do not know the PMU stuff =
well.</blockquote><div><br =
class=3D"webkit-block-placeholder"></div><div>Is there any documentation =
for PMU ?</div><br><blockquote =
type=3D"cite"><br><br><br>_______________________________________________<=
br>Openmoko community mailing list<br><a =
href=3D"mailto:community@lists.openmoko.org">community@lists.openmoko.org<=
/a><br>http://lists.openmoko.org/mailman/listinfo/community<br><br></block=
quote></div><br><div apple-content-edited=3D"true"> <span =
c...
Le 14230i=C3=A8me jour apr=C3=A8s Epoch,
I've a small script that works as a daemon, checking interval depends
on the charge (described on a file), play sounds (except when
charging) depending on the current charge.There is no doc, no install proc, it's not packaged, but it can be
done easily...The config file (default values in the script) contains:
# Les diff=C3=A9rents niveaux
THRESHOLDS=3D"100:20:1200: 20:10:600:low 10:5:150:critical 5:0:30:emergen=
cy"Each group of check parms is max:min:delay:sound
If level is between (_max_,_min_), the "aplay" _sound_.wav and wait _delay_
for next check.Hope it helps.
It has passed quite a long time since I upgraded the bootloader, does
the FR boots when the battery is totally down?
I'had seen this thread that seemed to have addressed this issue:
http://lists.openmoko.org/pipermail/devel/2008-October/002531.htmlciao,
leonardo.--
http://leonardo.lilik.it
Key fingerprint = 2C20 A587 05AC 42E5 1292 D0D4 3EED CFB5 52FD AD1E_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
Qtopia 4.3.2 on FR does it, so I guess there must be a way.
Neil
_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Artem Bityutskiy | [PATCH 18/44 take 2] [UBI] build unit implementation |
| James Morris | Re: LSM conversion to static interface |
git: | |
| Paul Jackson | [PATCH] cpuset sched_load_balance kmalloc fix |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Linus Torvalds | Re: [GIT]: Networking |
