Add direction support for NZXT Hue+
This commit is contained in:
parent
7999620db2
commit
a76bd7b974
4 changed files with 29 additions and 10 deletions
|
|
@ -84,10 +84,11 @@ unsigned int HuePlusController::GetLEDsOnChannel(unsigned int channel)
|
|||
return(ret_val);
|
||||
}
|
||||
|
||||
void HuePlusController::SetMode(unsigned char mode, unsigned char speed)
|
||||
void HuePlusController::SetMode(unsigned char mode, unsigned char speed, bool direction)
|
||||
{
|
||||
current_mode = mode;
|
||||
current_speed = speed;
|
||||
current_mode = mode;
|
||||
current_speed = speed;
|
||||
current_direction = direction;
|
||||
}
|
||||
|
||||
void HuePlusController::SetChannelLEDs(unsigned char channel, std::vector<RGBColor> colors)
|
||||
|
|
@ -138,6 +139,12 @@ void HuePlusController::SetChannelLEDs(unsigned char channel, std::vector<RGBCol
|
|||
\*-----------------------------------------------------*/
|
||||
serial_buf[0x02] = current_mode;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Set options bitfield in serial packet |
|
||||
\*-----------------------------------------------------*/
|
||||
serial_buf[0x03] = 0;
|
||||
serial_buf[0x03] |= current_direction ? ( 1 << 4 ) : 0;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Set speed in serial packet |
|
||||
\*-----------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue