ThinkNode M1: low battery auto shutdown #692
Merged
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.
This PR enables automatic shutdown when the ThinkNode M1 battery hits 3.3v or less.
We want to avoid writing to flash when voltage is low, as it can lead to file system corruption.
It also shows a
Low Battery. Shutting Down!message on screen before it shuts down.Since this is an eink display, it will persist after power loss. This is gated behind an
#ifdef THINKNODE_M1as I don't have other eink displays to test the aesthetics of the font size and spacing.I noticed the blue status LED was still on when powering down, so this is manually disabled as well.