Skip to content

Commit 4c9044a

Browse files
committed
Fix it with simulate_reset instead
1 parent 5bca86b commit 4c9044a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,17 +1078,16 @@ int __attribute__((used)) main(void) {
10781078
int exit_code = PYEXEC_FORCED_EXIT;
10791079
bool skip_repl = true;
10801080
bool simulate_reset = true;
1081-
bool first_run = true;
10821081
for (;;) {
10831082
if (!skip_repl) {
10841083
exit_code = run_repl(get_safe_mode());
10851084
supervisor_set_run_reason(RUN_REASON_REPL_RELOAD);
10861085
}
10871086
if (exit_code == PYEXEC_FORCED_EXIT) {
1088-
if (!first_run) {
1087+
if (!simulate_reset) {
10891088
serial_write_compressed(translate("soft reboot\n"));
10901089
}
1091-
first_run = false;
1090+
simulate_reset = false;
10921091
if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
10931092
// If code.py did a fake deep sleep, pretend that we
10941093
// are running code.py for the first time after a hard

0 commit comments

Comments
 (0)