From ef474b7f2075fb885d8545f3bf0066f4b772db7c Mon Sep 17 00:00:00 2001 From: rehius <128579193+rehius@users.noreply.github.com> Date: Fri, 26 May 2023 22:45:24 +0000 Subject: [PATCH] Update misc.c --- misc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/misc.c b/misc.c index 2ed0fda..3c51b16 100644 --- a/misc.c +++ b/misc.c @@ -84,8 +84,12 @@ void halt_with_error(uint32_t err, uint32_t bits) { bool is_long = err & (1 << (bits - i - 1)); sleep_ms(is_long ? LONG_PAUSE_TIME : SHORT_PAUSE_TIME); - put_pixel(PIX_yel); - sleep_ms(is_long ? LONG_TIME : SHORT_TIME); + bool success = bits == 1 && is_long == 0; + if (success) + put_pixel(PIX_whi); + else + put_pixel(PIX_yel); + sleep_ms(is_long ? LONG_TIME : success ? SHORT_TIME * 2 : SHORT_TIME); put_pixel(0); if (i != bits - 1 || j != CODE_REPEATS - 1) sleep_ms(is_long ? LONG_PAUSE_TIME : SHORT_PAUSE_TIME);