M4 status LED flashing with no main.py present #447 Initialized stack variable
This commit is contained in:
parent
d016bcdf82
commit
a38d8948b3
8
main.c
8
main.c
@ -131,6 +131,11 @@ bool start_mp(safe_mode_t safe_mode) {
|
||||
#endif
|
||||
|
||||
pyexec_result_t result;
|
||||
|
||||
result.return_code = 0;
|
||||
result.exception_type = NULL;
|
||||
result.exception_line = 0;
|
||||
|
||||
bool found_main = false;
|
||||
|
||||
if (safe_mode != NO_SAFE_MODE) {
|
||||
@ -166,9 +171,10 @@ bool start_mp(safe_mode_t safe_mode) {
|
||||
if (reload_next_character) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (serial_connected() && serial_bytes_available()) {
|
||||
// Skip REPL if reload was requested.
|
||||
return serial_read() == CHAR_CTRL_D;
|
||||
return (serial_read() == CHAR_CTRL_D);
|
||||
}
|
||||
|
||||
if (!serial_connected_before_animation && serial_connected()) {
|
||||
|
@ -207,6 +207,7 @@ void prep_rgb_status_animation(const pyexec_result_t* result,
|
||||
new_status_color(ALL_DONE);
|
||||
status->pattern_start = ticks_ms;
|
||||
status->safe_mode = safe_mode;
|
||||
status->found_main = found_main;
|
||||
status->total_exception_cycle = 0;
|
||||
status->ones = result->exception_line % 10;
|
||||
status->ones += status->ones > 0 ? 1 : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user