Post Reply 
I have a way to measure battery power
07-01-2017, 09:57 AM (This post was last modified: 07-01-2017 10:07 AM by Dieter.)
Post: #21
RE: I have a way to measure battery power
(07-01-2017 09:03 AM)webmasterpdx Wrote:  
Code:
V   Y  Pixels  HP   C
100 04 11     100 #008400h Bright Green
 80 06 09      75 #008400h Bright Green
 60 08 07      50 #008400h Bright Green
 30 11 05      25 #EFCE29h Yellow

If you want to return the "official" HP percentage values, why don't you simply calculate V accordingly?

V = 25 * int(6 – 0,4*Y)

Or, if the last value in the "pixels" column really is 5 and not 4:

V = 25 * int(0,38*pixels)
(If it's actually 4 pixels instead of 5, replace 0,38 with 0,4)

Edit: I see you just edited your post and changed the values in the V and "Pixels" column.
With the new values it's now...

V = 25 * int(6 – 0,4*Y)
resp.
V = 25 * int(0,4*pixels)

(07-01-2017 09:03 AM)webmasterpdx Wrote:  Ignore the word Code: above....I didn't know how to format the table.

Code boxes are fine. You can avoid the first blank line by beginning directly (!) after the "code" tag, i.e. not one line below.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: I have a way to measure battery power - Dieter - 07-01-2017 09:57 AM



User(s) browsing this thread: 2 Guest(s)