diff --git a/components/targets/muse/muse.c b/components/targets/muse/muse.c index 87cf38f0..33521d92 100644 --- a/components/targets/muse/muse.c +++ b/components/targets/muse/muse.c @@ -7,7 +7,6 @@ #include #include #include -//#include #include "driver/rmt.h" #include "monitor.h" #include "targets.h" @@ -24,14 +23,18 @@ // These values are determined by measuring pulse timing with logic analyzer and adjusting to match datasheet. #define T0H 14 // 0 bit high time -#define T1H 52 // 1 bit high time +#define T1H 52 // 1 bit high time #define TL 52 // low time for either bit -#define GREEN 0xFF0000 -#define RED 0x00FF00 -#define BLUE 0x0000FF -#define WHITE 0xFFFFFF -#define YELLOW 0xE0F060 +// sets a color based on RGB from 0..255 and a brightness in % from 0..100 +#define RGB(R,G,B,BR) (((G*BR)/100) << 16) | (((R*BR)/100) << 8) | ((B*BR)/100) + +#define RED RGB(255,0,0,10) +#define GREEN RGB(0,255,0,10) +#define BLUE RGB(0,0,255,10) +#define WHITE RGB(255,255,255,10) +#define YELLOW RGB(255,118,13,10) + struct led_state { uint32_t leds[NUM_LEDS]; }; diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild index ca4bbd2a..5d174b2c 100644 --- a/main/Kconfig.projbuild +++ b/main/Kconfig.projbuild @@ -133,7 +133,7 @@ menu "Squeezelite-ESP32" config BAT_CONFIG string default "channel=7,scale=20.24,atten=0" if SQUEEZEAMP - default "channel=5,scale=7.48,atten=3,cells=1" if MUSE + default "channel=5,scale=7.00,atten=3,cells=1" if MUSE default "" config TARGET string