diff options
| author | Lucian Copeland <hierophect@gmail.com> | 2020-08-10 18:00:50 -0400 |
|---|---|---|
| committer | Lucian Copeland <hierophect@gmail.com> | 2020-08-10 18:00:50 -0400 |
| commit | 4613b58a31c8d439d92961f2034eb9f60b0d97c1 (patch) | |
| tree | 3b509d2b6b0337dea3585f0e8203bea72188d98a | |
| parent | d47bd5529c8e2944f5e18dec87ed432c742622ee (diff) | |
Add skip for rgb matrix exception handling
| -rwxr-xr-x | main.c | 2 | ||||
| -rw-r--r-- | supervisor/shared/rgb_led_status.c | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -276,7 +276,7 @@ bool run_code_py(safe_mode_t safe_mode) { } } - // Wait for connection or character. + // Display a different completion message if the user has no USB attached (cannot save files) if (!serial_connected_at_start) { serial_write_compressed(translate("\nCode done running. Waiting for reload.\n")); } diff --git a/supervisor/shared/rgb_led_status.c b/supervisor/shared/rgb_led_status.c index fe99129f8..2f23e3125 100644 --- a/supervisor/shared/rgb_led_status.c +++ b/supervisor/shared/rgb_led_status.c @@ -366,6 +366,11 @@ void prep_rgb_status_animation(const pyexec_result_t* result, status->safe_mode = safe_mode; status->found_main = found_main; status->total_exception_cycle = 0; + status->ok = result->return_code != PYEXEC_EXCEPTION; + if (status->ok) { + // If this isn't an exception, skip exception sorting and handling + return; + } status->ones = result->exception_line % 10; status->ones += status->ones > 0 ? 1 : 0; status->tens = (result->exception_line / 10) % 10; @@ -383,7 +388,6 @@ void prep_rgb_status_animation(const pyexec_result_t* result, } line /= 10; } - status->ok = result->return_code != PYEXEC_EXCEPTION; if (!status->ok) { status->total_exception_cycle = EXCEPTION_TYPE_LENGTH_MS * 3 + LINE_NUMBER_TOGGLE_LENGTH * status->digit_sum + LINE_NUMBER_TOGGLE_LENGTH * num_places; } |
