Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: WPS battery levels wrong?

WPS battery levels wrong?

From: gl <gl_at_ntlworld.com>
Date: 2006-03-05

I'm confused about the number of WPS battery levels. The CustomWPS online
docs suggest there are 5 ("0-4"), and 4-segment battery bitmaps are common.

However, the code in gwps-common.c does this:

int l = battery_level();
*intval = l / 20 + 1;

Which produces 1-6, presumably:
1 = 0-19%
2 = 20-39%
3 = 40-59%
4 = 60-79%
5 = 80-99%
6 = 100% (fully charged)

You can confirm this with:
BATTERY: ?%bl<1,2,3,4,5,6>

Shouldn't the code use / 25?

--
gl 
Received on Sun Mar 5 10:40:43 2006

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa