From 4c9044a0bff1fa9660e4fecf198642ee2d418028 Mon Sep 17 00:00:00 2001 From: Patrick Van Oosterwijck Date: Sun, 26 Feb 2023 19:49:12 -0700 Subject: [PATCH] Fix it with simulate_reset instead --- main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index a44e502821..002c97c167 100644 --- a/main.c +++ b/main.c @@ -1078,17 +1078,16 @@ int __attribute__((used)) main(void) { int exit_code = PYEXEC_FORCED_EXIT; bool skip_repl = true; bool simulate_reset = true; - bool first_run = true; for (;;) { if (!skip_repl) { exit_code = run_repl(get_safe_mode()); supervisor_set_run_reason(RUN_REASON_REPL_RELOAD); } if (exit_code == PYEXEC_FORCED_EXIT) { - if (!first_run) { + if (!simulate_reset) { serial_write_compressed(translate("soft reboot\n")); } - first_run = false; + simulate_reset = false; if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) { // If code.py did a fake deep sleep, pretend that we // are running code.py for the first time after a hard