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.
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.