From 91dc5a53e78a1226aadd48ff5f2cbf0cc5c31692 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Tue, 17 Sep 2024 11:39:03 +0200 Subject: [PATCH] Change overvoltage signaling to static yellow Fix "yellow" color for forced mode command. --- v10/interface.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/v10/interface.c b/v10/interface.c index 1cf9ff7..15cc293 100644 --- a/v10/interface.c +++ b/v10/interface.c @@ -299,20 +299,18 @@ void interface_update(char heat_mode) blink = 0; } else { switch (heat_mode) { - case mode_water_critical: /* Both Leds to Full RED */ + case mode_water_critical: /* Both Leds Full RED Blinking */ if (blink == 0) { ws2812_set_pixel(&ws2812_leds, 0, 255, 0, 0); ws2812_set_pixel(&ws2812_leds, 1, 255, 0, 0); blink = 1; } break; - case mode_overvoltage: /* First Led Red blinking */ - if (blink == 0) { - ws2812_set_pixel(&ws2812_leds, 0, 255, 0, 0); - blink = 1; - } + case mode_overvoltage: /* Both Leds yellow */ + ws2812_set_pixel(&ws2812_leds, 0, 100, 100, 0); + ws2812_set_pixel(&ws2812_leds, 1, 100, 100, 0); break; - case mode_overtemp: /* Second Led Red blinking */ + case mode_overtemp: /* Second Led (RGB1) Red blinking */ if (blink == 0) { ws2812_set_pixel(&ws2812_leds, 1, 255, 0, 0); blink = 1; @@ -323,11 +321,13 @@ void interface_update(char heat_mode) green = command_val; } else if (heat_mode == mode_forced) { /* -> Yellow */ green = command_val; - blue = command_val; + red = command_val; } else { /* -> Blue */ blue = command_val; } + /* RGB2 : Home power used and Solar production */ ws2812_set_pixel(&ws2812_leds, 0, (home_conso_value / 2000), (solar_prod_value / 2000), 0); + /* RGB1 : Command value */ ws2812_set_pixel(&ws2812_leds, 1, red, green, blue); break; } -- 2.43.0