From 05b81ce9e2efbd9e2220ca57477bb40e2415d1d2 Mon Sep 17 00:00:00 2001 From: cnlohr <lohr85@gmail.com> Date: Thu, 30 Mar 2023 13:25:41 -0700 Subject: [PATCH] Update to what looks best on-board. --- examples/ws2812bdemo/ws2812bdemo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ws2812bdemo/ws2812bdemo.c b/examples/ws2812bdemo/ws2812bdemo.c index c4a8262..577cd3b 100644 --- a/examples/ws2812bdemo/ws2812bdemo.c +++ b/examples/ws2812bdemo/ws2812bdemo.c @@ -25,8 +25,8 @@ uint32_t WS2812BLEDCallback( int ledno ) uint8_t index = (phases[ledno])>>8; uint8_t rsbase = sintable[index]; uint8_t rs = rsbase>>3; - uint32_t fire = (huetable[(rs+190)&0xff]<<16) | (huetable[(rs+30)&0xff]) | (huetable[(rs+0)]<<8); - uint32_t ice = 0xff0000 | ((rsbase)<<8) | ((rsbase)); + uint32_t fire = (huetable[(rs+190)&0xff]<<16) | (huetable[(rs+30)&0xff]) | ((huetable[(rs+0)]>>1)<<8); + uint32_t ice = 0x7f0000 | ((rsbase>>1)<<8) | ((rsbase>>1)); // Because this chip doesn't natively support multiplies, we are going to avoid tweening of 1..254. return TweenHexColors( fire, ice, ((tween + ledno)>0)?255:0 ); // Where "tween" is a value from 0 ... 255 -- GitLab