From 016f3a9c81afd2dee7f8ef974c273768b7f73c5c Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Fri, 2 Sep 2022 14:04:34 +0200 Subject: [PATCH] bricks/stm32: Force exit on IDE stop button. --- CHANGELOG.md | 5 +++++ lib/pbio/sys/command.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56533517c..009f0fe19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,17 @@ ### Added - Added support for `PBIO_PYBRICKS_COMMAND_REBOOT_TO_UPDATE_MODE` Pybricks Profile BLE command. +### Changed +- The Pybricks Code stop button will force the program to exit even if the user + catches the `SystemExit` exception ([pybricks-micropython#117]). + ### Fixed - Fixed connecting `Remote` on BOOST move hub ([support#793]). ### Removed - Removed `hub.system.reset()` method. +[pybricks-micropython#117]: https://github.com/pybricks/pybricks-micropython/pull/117 [support#793]: https://github.com/pybricks/support/issues/793 ## [3.2.0b5] - 2022-11-11 diff --git a/lib/pbio/sys/command.c b/lib/pbio/sys/command.c index c6f44bd1a..2e58a7c6f 100644 --- a/lib/pbio/sys/command.c +++ b/lib/pbio/sys/command.c @@ -23,7 +23,7 @@ pbio_pybricks_error_t pbsys_command(const uint8_t *data, uint32_t size) { switch (cmd) { case PBIO_PYBRICKS_COMMAND_STOP_USER_PROGRAM: - pbsys_program_stop(false); + pbsys_program_stop(true); return PBIO_PYBRICKS_ERROR_OK; case PBIO_PYBRICKS_COMMAND_START_USER_PROGRAM: return pbio_pybricks_error_from_pbio_error(pbsys_program_load_start_user_program());