Battery status display

Previous topic - Next topic

Kitty Hello

Make a font that has the first 4 characters:
Code (glbasic) Select

[.] [0] [1] [2] [3] [.] [.]
[.] [.] [.] [.] [.]
...

(character chr$(0) is nothing, 1=empty, 3=full)

Then use this to display the battery:
Code (glbasic) Select

batt% = PLATFORMINFO$("BATTERY")
batt% =MIN(4, MAX(1, (batt+10)/30 + 1 ))
ENDIF
PRINT CHR$(batt%), 300,2

Ian Price

Would this work on all handheld formats (Wiz, iXXX, GP2X etc.)?
I came. I saw. I played.

Kitty Hello

yes. I'm not sure if the Wiz battery is properly implemented, though. The rest I am certain about. iPhone had a bug, returning 0...1 instead of 0...100.