Skip to content

Conversation

@jp-bennett
Copy link
Collaborator

This seems to be a potential source of unintended screen wakes.
Only tested with the Hackaday Communicator so far.

This seems to be a potential source of unintended screen wakes.
@jp-bennett jp-bennett added the bugfix Pull request that fixes bugs label Nov 27, 2025
@thebentern thebentern requested a review from Copilot November 27, 2025 21:44
@thebentern
Copy link
Contributor

This one could have some side effects. Definitely want to test with a number of other hardware variants

Copilot finished reviewing on behalf of thebentern November 27, 2025 21:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes screen activation from the powerExit() function to fix unintended screen wake behavior when the device is in the POWER state.

  • Removes redundant screen activation that was causing unwanted screen wakes
  • Ensures screen state is properly managed by the enter functions of destination states
  • Fixes an issue where transitioning from POWER to DARK state would briefly turn the screen on before immediately turning it off

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jp-bennett
Copy link
Collaborator Author

I'm actually wondering if this should be moved out of PowerFSM completely, and handled in Screen::handleInputEvent()

@jp-bennett
Copy link
Collaborator Author

This one could have some side effects. Definitely want to test with a number of other hardware variants

This is why I targeted Develop. ;)

@thebentern
Copy link
Contributor

I'm actually wondering if this should be moved out of PowerFSM completely, and handled in Screen::handleInputEvent()

That makes a lot of sense, similar to how we stop ext. notification nagging there.

@jp-bennett
Copy link
Collaborator Author

Tested with one of the few devices that has both a screen and EXT_PWR_DETECT pin, and it worked as expected. Also tried a RAK4631 with screen, and it also seems to be working as expected. I feel pretty good about this change, but let me know if you find where it breaks something.

@thebentern thebentern merged commit de26dfe into develop Nov 28, 2025
84 of 85 checks passed
@thebentern thebentern deleted the Dont-wake-the-sleeper branch November 28, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants