mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 22:24:12 -04:00
Add delay in between packets to stop flickering
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#define JGINYUE_RG_DEFAULT 0x01
|
||||
#define JGINYUE_RG_SWAP 0x00
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
JGINYUEInternalUSBController::JGINYUEInternalUSBController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
@@ -151,7 +152,9 @@ void JGINYUEInternalUSBController::WriteZoneMode
|
||||
usb_buf[0x04] = device_config[Active_zone].Direction;
|
||||
usb_buf[0x05] = device_config[Active_zone].Direct_Mode_control;
|
||||
|
||||
hid_write(dev, usb_buf ,16);
|
||||
hid_write(dev, usb_buf, 16);
|
||||
|
||||
std::this_thread::sleep_for(5ms);
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
@@ -204,6 +207,8 @@ void JGINYUEInternalUSBController::DirectLEDControl
|
||||
|
||||
hid_write(dev, usb_buf, 16);
|
||||
|
||||
std::this_thread::sleep_for(5ms);
|
||||
|
||||
memset(usb_buf, 0x00, sizeof(usb_buf));
|
||||
|
||||
usb_buf[0x00] = JGINYUE_USB_PER_LED_SET_COMMAND_HEADER;
|
||||
|
||||
Reference in New Issue
Block a user