From 1fdec464891262b06d19f53d1f152a560effa576 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Fri, 13 Oct 2023 14:29:57 -0600 Subject: rewrote emisar-d4k-3ch to use delta-sigma modulation (PWM + DSM), which gives much better resolution, especially for the 8-bit channel. Also... - set_channel_mode() aborts when going from/to the same channel, to avoid unnecessary flicker - hsv2rgb() uses 16-bit R/G/B and V now - changed default channel to All - reduced default channel modes to just A, B, C, and All - smooth ramp floor defaults to 1/150 - raised level when aux LEDs turn on high during use (for better compatibility with red main LEDs) --- spaghetti-monster/fsm-channels.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spaghetti-monster/fsm-channels.h') diff --git a/spaghetti-monster/fsm-channels.h b/spaghetti-monster/fsm-channels.h index 113a85c..218f4f5 100644 --- a/spaghetti-monster/fsm-channels.h +++ b/spaghetti-monster/fsm-channels.h @@ -96,11 +96,11 @@ void calc_2ch_blend( #ifdef USE_HSV2RGB typedef struct RGB_t { - uint8_t r; - uint8_t g; - uint8_t b; + uint16_t r; + uint16_t g; + uint16_t b; } RGB_t; -RGB_t hsv2rgb(uint8_t h, uint8_t s, uint8_t v); +RGB_t hsv2rgb(uint8_t h, uint8_t s, uint16_t v); #endif // ifdef USE_HSV2RGB -- cgit v1.2.3