some minor fixes

This commit is contained in:
interfisch 2016-12-23 02:14:13 +01:00
parent 0da6f7a29d
commit c417625666
1 changed files with 4 additions and 3 deletions

View File

@ -263,9 +263,10 @@ void led_randomfade()
void set_randomBuffer() void set_randomBuffer()
{ {
for (int i=0; i < strip.numPixels(); i++) { for (int i=0; i < strip.numPixels(); i++) {
pixelR_buffer[i]=random(0,256); uint32_t c=wheel(random(0,256));
pixelG_buffer[i]=random(0,256); pixelR_buffer[i]=(uint8_t)(c >> 16);
pixelB_buffer[i]=random(0,256); pixelG_buffer[i]=(uint8_t)(c >> 8);
pixelB_buffer[i]=(uint8_t)c;
} }
} }