Hue 2 channel is a bitfield rather than a value

This commit is contained in:
Adam Honse 2020-01-06 23:01:51 -06:00
parent c7030ad47d
commit 7226a4164f
2 changed files with 5 additions and 5 deletions

View file

@ -104,7 +104,7 @@ void Hue2Controller::SetChannelEffect(unsigned int channel, unsigned int mode, s
/*-----------------------------------------------------*\
| Set channel in USB packet |
\*-----------------------------------------------------*/
usb_buf[0x02] = channel;
usb_buf[0x02] = 1 << channel;
/*-----------------------------------------------------*\
| Set mode in USB packet |
@ -180,8 +180,8 @@ void Hue2Controller::SetChannelLEDs(unsigned int channel, std::vector<RGBColor>
/*-----------------------------------------------------*\
| Set channel in USB packets |
\*-----------------------------------------------------*/
usb_buf[0x02] = channel;
usb_apply[0x02] = channel;
usb_buf[0x02] = 1 << channel;
usb_apply[0x02] = 1 << channel;
/*-----------------------------------------------------*\
| Send first packet for first 20 LEDs |