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
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
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
 « Next Oldest | Next Newest »

 Messages In This Thread I have a way to measure battery power - webmasterpdx - 06-25-2017, 05:03 AM RE: I have a way to measure battery power - cyrille de brébisson - 06-26-2017, 05:30 AM RE: I have a way to measure battery power - webmasterpdx - 06-27-2017, 10:43 AM RE: I have a way to measure battery power - toml_12953 - 06-28-2017, 12:05 PM RE: I have a way to measure battery power - Tim Wessman - 06-28-2017, 02:59 PM RE: I have a way to measure battery power - toml_12953 - 06-28-2017, 05:38 PM RE: I have a way to measure battery power - DrD - 06-27-2017, 11:21 AM RE: I have a way to measure battery power - TravisE - 06-27-2017, 09:13 PM RE: I have a way to measure battery power - webmasterpdx - 06-28-2017, 01:14 AM RE: I have a way to measure battery power - DrD - 06-28-2017, 10:50 AM RE: I have a way to measure battery power - webmasterpdx - 06-28-2017, 11:02 AM RE: I have a way to measure battery power - DrD - 06-28-2017, 11:20 AM RE: I have a way to measure battery power - webmasterpdx - 06-28-2017, 01:28 PM RE: I have a way to measure battery power - webmasterpdx - 06-28-2017, 01:25 PM RE: I have a way to measure battery power - StephenG1CMZ - 06-28-2017, 04:45 PM RE: I have a way to measure battery power - StephenG1CMZ - 10-28-2017, 02:57 PM RE: I have a way to measure battery power - webmasterpdx - 06-29-2017, 01:54 AM RE: I have a way to measure battery power - toml_12953 - 06-29-2017, 02:46 AM RE: I have a way to measure battery power - StephenG1CMZ - 06-29-2017, 05:35 AM RE: I have a way to measure battery power - webmasterpdx - 06-29-2017, 06:34 AM RE: I have a way to measure battery power - webmasterpdx - 07-01-2017, 09:03 AM RE: I have a way to measure battery power - Dieter - 07-01-2017 09:57 AM RE: I have a way to measure battery power - webmasterpdx - 07-01-2017, 10:37 AM RE: I have a way to measure battery power - webmasterpdx - 07-01-2017, 06:37 PM RE: I have a way to measure battery power - webmasterpdx - 07-01-2017, 07:13 PM

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