View Single Post
Posts: 805 | Thanked: 1,605 times | Joined on Feb 2010 @ Gdynia, Poland
#138
Originally Posted by Creamy Goodness View Post
I didn't know that, I haven't tried the new kernel yet.
You should check if the voltage is > 1000 or the temp is > 100 before trying to divide it.
I know, this way it would be compatible with every kernel existing nowe for N900. But I just wanted to publish a quick fix for people, as I am not a maintainer of this package. It's his decision what to do now
Of course
if(voltage>10000)
last_battery_volts[idx] = voltage/1000;
else
last_battery_volts[idx] = voltage;
if(temp>100)
last_battery_temp[idx] = temp/10;
else
last_battery_temp[idx] = temp;
Would be better. But it's not my decision :P Anyway, I will recompile package as you suggested now, it's good idea to have compability with both kernels (stock and new power kernel), I was just to sleepy to think about that at 4A.M. :P