Numeric battery level somewhere in Settings

I'm happy with the lack of numeric battery % (during Sleep and in the system menu) when not charging. People tend to obsess over that number to no benefit, and maybe it's hard to make it precise. When charging is the time it's useful.

But for development purposes—tracking down how efficient an app is—a number while not charging can be a big help! So I render .getBatteryPercentage() to the screen or system menu manually during certain tests.

But it might be nice just to have that number always available in Settings. I can think of three ways that might be done:

  • Display the number at the top right of the System menu within Settings

  • Or an actual toggle (like on iPhone) to display the number always (in sleep and system menu)

  • Or bury the number in Device Info along with the IP address etc. (but that would be pretty buried for devs)

This could be useful.

I wonder if it's also possible to get the current draw at any moment in time? So it would be possible to compare two branches of code to see which one uses less battery.

1 Like

The problem here is we don't have a good way to measure the battery's state of charge--we can only read the voltage, which doesn't map to percentage very accurately. On my early prototypes I had a fuel gauge IC so that we could have accurate battery measurement but somewhere along the way one of the iterations dropped it and I didn't notice. :frowning:

Have you seen playdate.getStats()? The returned table has an idle key; subtracting that value from 1.0 should give you a good idea how much CPU you're using.

3 Likes

Personally, that's good enough for my use!

1 Like

Thanks. I can understand that the number is only vague and not useful to consumers. In my case—a clock—what matters is battery usage directly, not CPU usage—but CPU usage is probably just the ticket for most peoples' efficiency testing!