diff options
| author | DavePutz <dwputz@gmail.com> | 2021-01-21 16:07:24 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-21 16:07:24 -0600 |
| commit | 6043fdf94085bf2ec00e9f95149a74fb7eb0c7c4 (patch) | |
| tree | 49fb85346b3ce60a08ad7780b8aec7fd0f72366f /main.c | |
| parent | e424c8424936ded83803b098229d0787903f9f92 (diff) | |
| parent | 2249a33203339803c8a0b23e80eec15d77b7f23e (diff) | |
Merge pull request #39 from adafruit/main
Merge from adafruit main for RP2040
Diffstat (limited to 'main.c')
| -rwxr-xr-x | main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -317,7 +317,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { // Program has finished running. - bool serial_connected_before_animation = serial_connected(); + bool printed_press_any_key = false; #if CIRCUITPY_DISPLAYIO bool refreshed_epaper_display = false; #endif @@ -364,7 +364,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { } #endif - if (!serial_connected_before_animation && serial_connected()) { + if (!printed_press_any_key && serial_connected()) { if (!serial_connected_at_start) { print_code_py_status_message(safe_mode); } @@ -372,11 +372,12 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { print_safe_mode_message(safe_mode); serial_write("\n"); serial_write_compressed(translate("Press any key to enter the REPL. Use CTRL-D to reload.\n")); + printed_press_any_key = true; } - if (serial_connected_before_animation && !serial_connected()) { + if (!serial_connected()) { serial_connected_at_start = false; + printed_press_any_key = false; } - serial_connected_before_animation = serial_connected(); // Refresh the ePaper display if we have one. That way it'll show an error message. #if CIRCUITPY_DISPLAYIO |
