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