diff options
| author | Terri Oda <terri@toybox.ca> | 2019-05-08 11:54:08 -0700 |
|---|---|---|
| committer | Terri Oda <terri@toybox.ca> | 2019-05-08 11:54:08 -0700 |
| commit | a9b05d37d70ac38fea2cdceffc28ce354f204200 (patch) | |
| tree | 8ccfc7a40db00f60181901e47113244888d47453 /supervisor | |
| parent | 1a8e50c773946a683541b9954e38f69b4b346dc2 (diff) | |
Make status light flash blue for incompatible mpy (fixes #1369)
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/shared/rgb_led_colors.h | 1 | ||||
| -rw-r--r-- | supervisor/shared/rgb_led_status.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/supervisor/shared/rgb_led_colors.h b/supervisor/shared/rgb_led_colors.h index cab702981..48994ad62 100644 --- a/supervisor/shared/rgb_led_colors.h +++ b/supervisor/shared/rgb_led_colors.h @@ -31,4 +31,5 @@ #define NAME_ERROR WHITE #define OS_ERROR ORANGE #define VALUE_ERROR PURPLE +#define MPY_ERROR BLUE #define OTHER_ERROR YELLOW diff --git a/supervisor/shared/rgb_led_status.c b/supervisor/shared/rgb_led_status.c index df9fdf8d9..209eef55e 100644 --- a/supervisor/shared/rgb_led_status.c +++ b/supervisor/shared/rgb_led_status.c @@ -247,6 +247,8 @@ void prep_rgb_status_animation(const pyexec_result_t* result, status->exception_color = OS_ERROR; } else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_ValueError)) { status->exception_color = VALUE_ERROR; + } else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_MpyError)) { + status->exception_color = MPY_ERROR; } else { status->exception_color = OTHER_ERROR; } |
