-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pbio/sys/hmi: Run hmi only while user program inactive.
The previous approach would go to the start but still run until the next yield. This meant that if the stop button was pressed while a program gracefully exists, it would already be in the "second stage" of the following PT_WAIT_UNTIL(pt, !button_pressed); PT_WAIT_UNTIL(pt, button_pressed); PT_WAIT_UNTIL(pt, !button_pressed); pbsys_main_program_request_start(selected_slot); Then on release, the program would immediately restart. PT_EXIT has the same effect of resetting the state to the start, but existing immediately after that. Fixes pybricks/support#1863
- Loading branch information
1 parent
2a45f4e
commit a047055
Showing
2 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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