HP Forums
I have a way to measure battery power - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: I have a way to measure battery power (/thread-8565.html)

Pages: 1 2

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

(07-01-2017 09:03 AM)webmasterpdx Wrote:  
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)
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.


RE: I have a way to measure battery power - webmasterpdx - 07-01-2017 10:37 AM

I edited that post several times as I got some of the values wrong and I was trying to figure out how to format it....
Like I said before..no point in commenting on the code of my routine as it's just a rough test thingy I whipped out while I wait until the power goes down.....i'll rewrite it completely when i get all the info I need and the power switches it off.

RE: I have a way to measure battery power - webmasterpdx - 07-01-2017 06:37 PM

Here is the latest table of results down to shutdown....

V   Y  Pixels  HP   C
100 04 11     100 #008400h Bright Green
 80 07 08      75 #008400h Bright Green
 60 09 06      50 #008400h Bright Green
 30 12 03      25 #EFCE29h Yellow
 00 15 00      00 #D6DEDE White

I have new code....I'm charging up my battery to test it now, and then I'll post it.
It'll give results from the HP column.
Note that it stays at 0 for a while before giving a popup message: Critical Low Battery...
There is another low battery message too, depending on what you are doing when it kicks in. However, the battery stays at zero for a little bit before popping up the messages.
Then, after a little bit, the power cuts off on it's own.

RE: I have a way to measure battery power - webmasterpdx - 07-01-2017 07:13 PM

Latest results with new code is now moved to here...

RE: I have a way to measure battery power - StephenG1CMZ - 10-28-2017 02:57 PM

(06-28-2017 04:45 PM)StephenG1CMZ Wrote:  It seems that on the Android, the HP Prime battery status only updates when the screen is tapped.
Until then, it continues to display the previous status.

So it may not be possible to program a "beep" if the charging lead is accidentally disconnected, or monitor the mains supply.

Detail: plug/unplug the lead - Prime display doesnt change (Android battery status does).
Tap the screen once - display updates charging/discharging status.
Triple-tapping the screen (Android optional accessibility screen zoom): charging status doesnt update.

The no-update affects the charging/discharging indication - I don't know yet whether it also affects the charge percentage.

Android 5.0.2
LG G3 s.

As no one has commented on this, I wonder...
Is this "feature" common on Androids (and perhaps elsewhere), or something unusual about my Android/phone?