Add skip for rgb matrix exception handling
This commit is contained in:
parent
d47bd5529c
commit
4613b58a31
2
main.c
2
main.c
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue