fix: clear hasPendingWork before shutdown on multiple node types#2673
Open
NickDunklee wants to merge 2 commits into
Open
fix: clear hasPendingWork before shutdown on multiple node types#2673NickDunklee wants to merge 2 commits into
NickDunklee wants to merge 2 commits into
Conversation
Contributor
|
PR title doesn't fully reflect the changes. Also some of it is similar to #2663 |
Contributor
Author
|
That's funny. My PR fork might be reduced to a near no-op. No complaints here. Funny in my revision I remembered local meshers complaining about how EInk is rarely properly supported, so I spent a bit of time on that to hopefully fix messaging consistency better. Totally love seeing others with the same thought process. Will rebase on dev and strip out the now not needed code. Thanks @disq ! 🤜 🤛 |
- hasPendingWork() extended so simple_repeater and
companion_radio both gate sleep and shutdown for
pending contact writes
- shutdown loops using hasPendingWork instead of ShutdownHandler
idea in previous PR
- uiTask shutdown behavior - all three variants (ui-new,
ui-tiny, ui-orig) now set a _wants_shutdown flag instead of
calling powerOff() directly
- "Power off in 5 seconds…" messages added everywhere a
shutdown is announced
- "all" (hopefully) eInk displays are now tagged together
using isEInk() constant
- "all" eInk displays will send a final "Shut Down" message
so the displays show "Shut Down" after a successful shutdown
- removed display text from ui-orig as none of those paths
have displays
- changed text formatting/syntax across all strings to match
- low power, "!"
- user-chosen or otherwise, "..."
- removed mention of 5 seconds since it could be 0-5 seconds
to shutdown after contact flush
f6e2bc9 to
f16c496
Compare
Contributor
Author
|
Updated to take into account recent dev changes, removed some code that would never be executed, and cleaned up messaging. |
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.
This PR is a cleanup and is in ref to my comments in #2627
@ripplebiz had some recommendations for existing code flows, so I refactored to leverage that. It compiles against a few sensor/repeater/companion node types, but I haven't tested it yet. Figured I'd get eyes on it first before going further. Brain fried now from the file/code juggling, hah. May take a couple of days to check back.
AUTO_SHUTDOWN_MILLIVOLTS, no power checks, no power paths will still just run until the board dies - probably room for future improvements therethreetwo variants (ui-new, ui-tiny,ui-orig) now set a_wants_shutdownflag instead of callingpowerOff()directly"Power off in 5 seconds…" messages added everywhere a shutdown is announced"all" (hopefully) EInk displays are now tagged together usingAnother PR took care of this! 🎉isEInk()constant