File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,13 @@ static pbio_error_t pbsys_hmi_monitor_bluetooth_state(pbio_os_state_t *state) {
247247 * ::PBIO_ERROR_TIMEDOUT when there was no user interaction for a long time.
248248 */
249249pbio_error_t pbsys_hmi_await_program_selection (void ) {
250+
251+ #if PBSYS_CONFIG_USER_PROGRAM_AUTO_START
252+ // Skip any UI, always just start the REPL.
253+ pbsys_main_program_request_start (PBIO_PYBRICKS_USER_PROGRAM_ID_REPL , PBSYS_MAIN_PROGRAM_START_REQUEST_TYPE_BOOT );
254+ return PBIO_SUCCESS ;
255+ #endif
256+
250257 pbio_os_state_t btn_state = 0 ;
251258 pbio_os_state_t ble_state = 0 ;
252259
Original file line number Diff line number Diff line change @@ -88,10 +88,6 @@ int main(int argc, char **argv) {
8888 // Keep loading and running user programs until shutdown is requested.
8989 for (;;) {
9090
91- #if PBSYS_CONFIG_USER_PROGRAM_AUTO_START
92- pbsys_main_program_request_start (PBIO_PYBRICKS_USER_PROGRAM_ID_REPL , PBSYS_MAIN_PROGRAM_START_REQUEST_TYPE_BOOT );
93- #endif
94-
9591 // Drives all processes while waiting for user input. This completes
9692 // when a user program request is made using the buttons or by a
9793 // connected host. It is cancelled on shutdown request or idle timeout.
You can’t perform that action at this time.
0 commit comments