View Single Post
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!