maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Request] Battery charge status on status LED (https://talk.maemo.org/showthread.php?t=63431)

TiagoTiago 2010-10-06 19:30

Re: [Request] Battery charge status on status LED
 
just plain color blinks could get confused with regular LED patterns, somthing more complex than that would be needed, perhaps a prefix pattern that would always play before the actual charge status pattern would help.

TiagoTiago 2010-10-06 19:33

Re: [Request] Battery charge status on status LED
 
Is that why the LED pattern editor has such a big difficulty to test a pattern? How does HealthCheck's LED test does it?

woody14619 2010-10-06 19:34

Re: [Request] Battery charge status on status LED
 
The problem with this is that the LED use does actually eat battery. It may not seem like much, but when you're blinking it every 30 seconds all day, it adds up.

A better idea may be to trigger on another indicator (like say camera button) when the screen is off, and have it blink things to you then. Or, just have it use espeak to say the time and % battery left maybe? A lot easier than learning morris code to tell the time and battery level. ;)

TiagoTiago 2010-10-06 19:37

Re: [Request] Battery charge status on status LED
 
Just keep the average usage of the LED to somthing similar to the default white flashing

woody14619 2010-10-06 19:44

Re: [Request] Battery charge status on status LED
 
Default white flashing? Does yours flash white at times? Mine never flashes unless something is going on, like a incoming SMS. The only time I see white is when the device is powering up or down...

TiagoTiago 2010-10-06 19:50

Re: [Request] Battery charge status on status LED
 
With the screen locked and no notifications etc waiting, it flashes faint white every once in a while

lemmyslender 2010-10-06 23:21

Re: [Request] Battery charge status on status LED
 
OK, messing around a little bit; this is probably one of the worst ways to do this, but:

I wrote a little script that will:
1) grep the current bar level, and compare it to a previously stored level
2) if the levels are the same (ie 6 bars) it will exit
3) if the levels are different it will
4a) overwrite the current mce.ini file with a new mce.ini file based on the bar level
4b) restart mce
4c) set the stored bar value to the current value
5) exit
*settings,notification light, device on needs to be checked.

Obviously this needs to be run as root. There are a variety of ways to have the script run automatically at a predetermined interval. If the level hasn't changed nothing is written or restarted.

Based on the wiki, mce shouldn't be restarted too often (several times in less than 2 minutes) or there may be problems restarting it. If the battery last for 4 hours at 100% cpu, and there are 8 bar levels, there should be about 30 minutes between changes (if I did my math right). So from that perspective it shouldn't cause any issues.

I suppose it could do very bad things if something prevented if from completely writing the file, or the file was corrupted.

I'll play with it a little more, if it seems to work and there is interest, I could post it.

hawaii 2010-10-07 01:15

Re: [Request] Battery charge status on status LED
 
Anytime you restart MCE, you'll lose "stacked" or in-progress notifications. This is not conducive at all.

There is no sane way to do this with MCE.

TiagoTiago 2010-10-07 01:19

Re: [Request] Battery charge status on status LED
 
There gotta be a better way to control the status LED...

bakuur 2010-10-07 20:56

Re: [Request] Battery charge status on status LED
 
please post it if you can
ill work on it too
maybe i can help you abit ;)


All times are GMT. The time now is 08:50.

vBulletin® Version 3.8.8