Skip to content

Commit

Permalink
Don't reload or enter repl when autoreloading
Browse files Browse the repository at this point in the history
A keypress while we waited for autoreload used to enter repl. Now
it won't.

Fixes adafruit#6480
  • Loading branch information
tannewt committed Aug 11, 2022
1 parent d645e9c commit 3dc0290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re
}

// If interrupted by keyboard, return
if (serial_connected() && serial_bytes_available()) {
if (serial_connected() && serial_bytes_available() && !autoreload_pending()) {
// Skip REPL if reload was requested.
skip_repl = serial_read() == CHAR_CTRL_D;
if (skip_repl) {
Expand Down

0 comments on commit 3dc0290

Please sign in to comment.