From 1a3306f8cb02207d7e806406ce27e88b89a64d8d Mon Sep 17 00:00:00 2001 From: whowechina Date: Tue, 18 Jun 2024 12:09:29 +0800 Subject: [PATCH] Turn off light when exits rainbow mode --- Production/firmware/mai_pico.uf2 | Bin 148992 -> 149504 bytes firmware/src/main.c | 23 ++++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Production/firmware/mai_pico.uf2 b/Production/firmware/mai_pico.uf2 index bd0fdd592b9f4e8f55cbac059ba134320663321a..3ef5b1b634c3b340b22baeaba049b5bbae1741a8 100644 GIT binary patch delta 15440 zcmbVT4OmrGx?XGZ|8sE5AwoRRhJ$njG(=SV$q4lbf<}&6sTmp;ni`rKmZNBngJllm zR+pMNT*om|o-P@fuNv;{OHy z<`s{1`Dj6o*e;)HawsL&QERtvu_xy~VBcz|)-(2P_WIhs6G&Vt33E(x`o%^y_&EGK ziLG}-uDy2&Ne*lv2^t~sB#x#N$Gu&FDK{EPpIm!PF?FaN+>1J?Mja>dzpvx{U%qG! zam>6;Y+p8xvS-*dSD5rKH0H)Pqv%dE$hwpEG^6A^vY!xH zZx2k@wcsN9h`u&>lvWI%MXWSRy?-e?yD~iwNhXGwa|R_Ua)emTT_6cDL~Q` z3d*n(u9Edo!u2pUScn*gZq?}S<_I!4f+P-gkRBKQu_t+3umK7dK!sT!EjRTdpFMdo zF1;$#rzIUF_SLERE?tXo)88Sc8iBx(?j960)Zh#iIQ8~OfT9jW@CroTMYM`oqKyEt z4-OhvM!l5qaKqCic}BrA+J*|{ME}_%TsK)lgxsTnu~Y!_t|i%pi4i4Q&>x%Pw+^FW z(;tj|Rp8M?p4gOLHYg0$ipPf7lqMxN3S-ozIa}-PHhq9*rt9=E+UqXCaY}e^LvT+) z@Ls#)P!uw=>DRSnU5ghA<4P}FKG`3QPh}# zToO0Z1A1-Z5EtfdG1o-&+q_YAQq@;N+nrz^c|hsriia&FQ*Pb=xO5sz5zd zZ}*EPD(~axC$-im*C*Tm;{eCu4&GO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hLn_66K8qXl#*}~xSSTS7d%37bf@(Z z*(FBY+fAF^KCGqIb2dQuC*3q`54*MWaCT*yb<%sYm7;jX&aF+uqTp|C z?Li#PDSg^Q$y5)`jWee?J+wD)ChEx1uKy*HKb4`qK}&e|Oms+(Z0%rcha{OPNRm@f zn5pGOo+&gRc6@E7=I-*$OXja%UL^WSh3zH|V+vdgDTb6m z)oHhmVCrI+dkRuv%gVuLiquwd`;oe-Kl^4_!iOf@cfE2r>^FyJJo--be*uspbXNcX diff --git a/firmware/src/main.c b/firmware/src/main.c index 140fc76..65c329c 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -37,12 +37,15 @@ #include "io.h" #include "hid.h" -static void run_lights() +static void button_lights_clear() { - if (io_is_active() || aime_is_active()) { - return; + for (int i = 0; i < 8; i++) { + rgb_set_button(i, 0, 0); } +} +static void button_lights_rainbow() +{ static uint16_t loop = 0; loop++; uint16_t buttons = button_read(); @@ -58,6 +61,20 @@ static void run_lights() } } +static void run_lights() +{ + static bool was_rainbow = true; + bool go_rainbow = !io_is_active() && !aime_is_active(); + + if (go_rainbow) { + button_lights_rainbow(); + } else if (was_rainbow) { + button_lights_clear(); + } + + was_rainbow = go_rainbow; +} + const int aime_intf = 3; static void cdc_aime_putc(uint8_t byte)