Clear battery cache in ShowBattery app#37
Merged
ThomasFarstrike merged 1 commit intoMicroPythonOS:mainfrom Feb 14, 2026
Merged
Conversation
internal_filesystem/apps/com.micropythonos.showbattery/assets/show_battery.py
Outdated
Show resolved
Hide resolved
Contributor
|
It's nice, but the only issue here is that ADC2 for battery measurement and wifi don't work at the same time, so with this change, boards that use ADC2 will lose wifi connection, plus the automatic wifi reconnect will use quite a bit more power, so it has an impact. I guess that might be okay, depending on what you're testing, but maybe it should be an option (checkbox) so that the user can choose whether they want the "live" value or the "cached" value? |
Contributor
Author
|
Yes a checkbox would be nice. Will see if i can do it... |
7ae8580 to
ce9d580
Compare
Add a "Real-time values" checkbox to ShowBattery app. If checked, then the cache will be clear on every cycle. Bugfix: Use `mpos.time.localtime()` to get the "correct" local time with timezone offset. Changes for Odroid-GO: The seen "2400" values are at startup the Odroid-GO... After a while the values are somewhere between 270 and 310... The full range is unknown, yet. But with the new calculation it looks more realistic, then before ;)
ce9d580 to
ac89237
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a "Real-time values" checkbox to ShowBattery app. If checked, then the cache will be clear on
every cycle.
Bugfix: Use
mpos.time.localtime()to get the "correct" local time with timezone offset.Changes for Odroid-GO:
The seen "2400" values are at startup the Odroid-GO... After a while the values are somewhere
between 290 and 310... The full range is unknown, yet. But with the new calculation it looks more
realistic, then before ;)
Looks like: