View Single Post
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#786
Originally Posted by zurrain101 View Post
hey dr frost. there is this new widget available in the repos.it shows time remaining, charging, voltage. battery percentage etc. its called qtbatteryewidget. but it is based on the normal battery data in sthe status bar. can u please change it to reading the original data like in your battery meter pelase?
If anybody want to take the touch on this here is my script explained as best as i can.

The script is divided in to 6 segments, this is to simulate the dual LOG scale of the battery voltage vs capacity.
Download the zip in post #3 if it is easier to follow.

1 segment:
if voltage is greater then 4050mV then battery % = 85 + (mV - 4050) / 12

2 segment:
if voltage is greater then 3900mV and less then 4050mV then battery % = 70 + (mV - 3900) / 10

3 segment:
if voltage is greater then 3800mV and less then 3900mV then battery % = 50 + (mV - 3800) / 5

4 segment:
if voltage is greater then 3660mV and less then 3800mV then battery % = 15 + (mV - 3660) / 4

5 segment:
if voltage is greater then 3600mV and less then 3660mV then battery % = 5 + (mV - 3600) / 6

6 segment:
if voltage is less then 3600mV then battery % = (mV - 3300) / 60


INFO: 4050mV = 4.050V

I'm a bit strapped for time lately, so if anybody want to upgrade the battery widget in question here's the recipe.

Last edited by dr_frost_dk; 2011-06-23 at 12:48.