ThinkNode M6: button shutdown/wake for repeater and room server - #3066
Open
codemonkeybr wants to merge 1 commit into
Open
ThinkNode M6: button shutdown/wake for repeater and room server#3066codemonkeybr wants to merge 1 commit into
codemonkeybr wants to merge 1 commit into
Conversation
Fixes meshcore-dev#2313. Hold the Function Button ~5s to power off (matches the board's stock firmware timing); any press wakes it back up, since the chip is fully halted in SYSTEMOFF and can't measure hold duration while off. The power LED blinks 3x on both shutdown and wake/boot to confirm the action registered. ThinkNodeM6Board::powerOff() now arms the button as a GPIO wake source (pull-up + SENSE_LOW) before entering SYSTEMOFF via NRF52Board::powerOff(). Scoped to simple_repeater and simple_room_server only, since companion_radio already has an in-flight change (meshcore-dev#2837) moving its button handling into UITask. Tested on hardware: shutdown, wake, and LED feedback all verified on a physical ThinkNode M6 repeater.
Author
|
Btw i used the 5000ms from the electrow website.. i could swap to use the same as sensecap 1500ms if the team prefers. nbd for me |
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.
Problem
Fixes #2313. The ThinkNode M6's battery isn't physically accessible, so there was no way to power the device off to conserve battery when idle.
Fix
Hold the Function Button for ~5s to power off (matches the timing of Elecrow's stock firmware for this board). A single press wakes it back up — the chip is fully halted in
SYSTEMOFFwhile off, so there's no way to measure a hold duration on wake, only on the way down. The power LED (red) blinks 3 times on both shutdown and wake/boot as visual confirmation the action registered.ThinkNodeM6Board::powerOff()now arms the button pin as a GPIO wake source (pull-up +SENSE_LOW) before enteringSYSTEMOFFviaNRF52Board::powerOff().Scope
Limited to
simple_repeaterandsimple_room_server.companion_radiois intentionally left out — #2837 is already moving that build's button handling intoUITask(running headless viaNullDisplayDriver), and duplicating a second independent button-read loop there would conflict with that approach rather than complement it.Testing
Built and flashed on a physical ThinkNode M6 repeater:
ThinkNode_M6_room_serverandSenseCap_Solar_repeater(shared guard, unaffected) build clean; room_server not flash-tested on hardware