mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-16 03:46:54 -04:00
Add direction support for NZXT Hue+
This commit is contained in:
@@ -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 |
|
||||
\*-----------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user