mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-13 17:14:39 -04:00
Changed detector to allow for usage / usage page detection
* Small correction to packet bytes in CMARGBcontroller.h to allow packet to send 0x00 at first byte * Rearranged modes in RGBController_CMARGBController.cpp to have single colour modes first
This commit is contained in:
@@ -153,9 +153,16 @@ void CMARGBController::SendUpdate()
|
||||
buffer[CM_ARGB_FUNCTION_BYTE] = boolPassthru ? 0x02 : 0x01;
|
||||
|
||||
hid_write(dev, buffer, buffer_size);
|
||||
hid_read_timeout(dev, buffer, buffer_size, CM_ARGB_INTERRUPT_TIMEOUT);
|
||||
//hid_read_timeout(dev, buffer, buffer_size, CM_ARGB_INTERRUPT_TIMEOUT);
|
||||
|
||||
if ( boolARGB_header & !boolPassthru )
|
||||
if ( boolPassthru )
|
||||
{
|
||||
//If setting pass thru mode send the init packet again
|
||||
hid_write(dev, buffer, buffer_size);
|
||||
hid_write(dev, buffer, buffer_size);
|
||||
hid_write(dev, buffer, buffer_size);
|
||||
}
|
||||
else if ( boolARGB_header )
|
||||
{
|
||||
buffer[CM_ARGB_COMMAND_BYTE] = 0x0b; //ARGB sends 0x0b (1011) RGB sends 0x04 (0100)
|
||||
buffer[CM_ARGB_FUNCTION_BYTE] = (false) ? 0x01 : 0x02; //This controls custom mode TODO
|
||||
|
||||
Reference in New Issue
Block a user