d-rez / gbz_overlay

Gameboy Zero status icon overlay display
64 stars 20 forks source link

Charging not recognized #8

Open Dolland opened 1 year ago

Dolland commented 1 year ago

I don't understand how your script can know when battery is charging. When script is running and battery is charging, no charging icon appears.

Looking at the script i found that only the "battery history" section can be the estimation for battery charging, but still for me it doesn't work.

Am i missing something?

d-rez commented 1 year ago

The solution I used is imperfect and requires at least some basic calibration for your ADC module / device build.

The TLDR is that in my testing the highest unplugged voltage was still lower than the lowest plugged-in voltage, so I made it work around that fact.

Without monitoring at least one charge cycle and calibration and editing the source code values, there's a good chance it won't detect it properly. There's no automatic calibration and the readings get glitchy at different CPU loads due to voltage spikes during load.

You'll need to look at logs and find values that work/make sense. You can also check forks that are being more actively maintained, they may have a more streamlined calibration process, like https://github.com/bverc/retropie-status-overlay