Notices


Reply
Thread Tools
Posts: 284 | Thanked: 74 times | Joined on Mar 2010 @ Wigan, UK
#61
bakuur, do you know what/where activates the 'PatternBatteryCharging'?


**Edit** - Ok, what I was thinking wont work so the above question doesnt really matter. I want what you have done - changing colour of led's for the battery charge amount, but I want it whilst its charging so i know roughly how long is left before the battery is full.

The command
Code:
`hal-device bme | grep battery.charge_level.current | awk '{print $3}'`
will not work when its on charge, it reports the value of when it was put on charge. For example, i put it on charge when the battery was on 1, then kept running the command and it still reports 1 unless I unplugged it to which it was actually at 7.

Ideally i want both:

- Changing colour led's with the pattern you have got it at now
- Changing colour led's when on charge with the charge pattern

This is so that I know what the battery level is and also whether it is on charge or not.

Do you have any ideas on how to do this?

Last edited by kaos_king; 2010-11-02 at 15:08.
 
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#62
i knew this problem would come back and bite me in the a** :P
ofcource there is a way to get around this
ill just need some time to figure it out

ps:the new script is working but has few minor bugs
and the only way to solve it is by solving the problem you have!

because if i want to get around the bug im having and solve it, the script will become really heave
but the N900 knows no impossible!

cheers!
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!
 
Posts: 284 | Thanked: 74 times | Joined on Mar 2010 @ Wigan, UK
#63
Originally Posted by bakuur View Post
i knew this problem would come back and bite me in the a** :P
ofcource there is a way to get around this
ill just need some time to figure it out

ps:the new script is working but has few minor bugs
and the only way to solve it is by solving the problem you have!

because if i want to get around the bug im having and solve it, the script will become really heave
but the N900 knows no impossible!

cheers!
Haha!

No problem. I'll continue looking at this.
 
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#64
thanks mate
i could always use another good pair of hands
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!
 
Posts: 9 | Thanked: 1 time | Joined on Feb 2010 @ Hamburg, Germany
#65
Hi,

I would love to have this on my N900.
I think, I missed something. It is impossible for me to activate the new patterns. I tried it in the terminal. I can activate / deactivate all the "standard" Patterns but not the new ones. "PatternExample" won't work for me too.

Did I miss something ?!

regards Jonni
 
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#66
Originally Posted by xtjonni View Post
Hi,

I would love to have this on my N900.
I think, I missed something. It is impossible for me to activate the new patterns. I tried it in the terminal. I can activate / deactivate all the "standard" Patterns but not the new ones. "PatternExample" won't work for me too.

Did I miss something ?!

regards Jonni
yes , you miss to put yours in active pattern line
LEDPatterns=...............

Last edited by blue_led; 2010-11-03 at 16:11.
 

The Following User Says Thank You to blue_led For This Useful Post:
Posts: 9 | Thanked: 1 time | Joined on Feb 2010 @ Hamburg, Germany
#67
stupid me. That did the trick. Thank you!

By the way: I'm using "alarmed" to get the script executed in intervals which works for me.

Last edited by xtjonni; 2010-11-03 at 10:09.
 

The Following User Says Thank You to xtjonni For This Useful Post:
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#68
okay that was the other APP i was talking about
but doesnt it take space from the memory?? for processes and stuff??
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!
 
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#69
@bakuur

because hal-device bme don't report battery.charge_level.current when phone is in charging mode you can put one IF in your script
Warn: this is not an working code
IF not_charging THEN your script
ELSE my_proposal

my_proposal
assumption: battery level rise linear with voltage
read battery.voltage.current and make some simple math
when this number is close to 4200 this mean battery full
we ( all of us ) must find 0 level voltage . my n900 report 3585 right now and battery low
maybe is not very accurate this but this is better than nothing

better information you can find in bq27200 battery gauge chip but need read on i2c bus

second proposal
because you run an script your script can alter led currents. is safer than edit mce.ini and the script need one pattern only and can be the default pattern so no mce.ini edit needed.
some inspiration here
actual script is is miles ahead
if you allow i can spam your thread with my script variant.

Last edited by blue_led; 2010-11-04 at 22:21.
 
Posts: 429 | Thanked: 217 times | Joined on Apr 2010 @ Dubai
#70
Originally Posted by blue_led View Post
@bakuur

because hal-device bme don't report battery.charge_level.current when phone is in charging mode you can put one IF in your script
Warn: this is not an working code
IF not_charging THEN your script
ELSE my_proposal

my_proposal
assumption: battery level rise linear with voltage
read battery.voltage.current and make some simple math
when this number is close to 4200 this mean battery full
we ( all of us ) must find 0 level voltage . my n900 report 3585 right now and battery low
maybe is not very accurate this but this is better than nothing

better information you can find in bq27200 battery gauge chip but need read on i2c bus

second proposal
because you run an script your script can alter led currents. is safer than edit mce.ini and the script need one pattern only and can be the default pattern so no mce.ini edit needed.
some inspiration here
actual script is is miles ahead
i found a way around this problem for the battery bar
ive noticed that if i read the percentage of the battery i would get a reading while charging
but if i use the bar level command i wont

so doing so i changed the whole base for the script
abit of tricky work for me right now but will be done by tommorw
further more and i dont know if i got you right...but do you suggest that the program will edit your mce.ini every 1 minute??

as i read before that is very dangerous...
and plus you will reset the sms and call notifications

please correct me if im wrong about that

in my script you edit the mce.ini only once
and i think its much safer that way

but thanks alot for the proposal i would love to hear more about this
__________________
N900 @850Mhz
My N900 changed my life and made it ALOT easier!
 
Reply

Tags
bakuur, battery, indicator, notification


 
Forum Jump


All times are GMT. The time now is 16:43.