mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-01 04:36:47 -05:00
Updated DuckyKeyboardController with 2ms delays between each packet sent
This should fix the issue where Ducky keyboards would softlock Commit amended to move delays to packet send functions by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
@@ -81,6 +81,7 @@ void DuckyKeyboardController::SendInitialize()
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, (unsigned char *)usb_buf, 65);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
||||
void DuckyKeyboardController::SendInitializeColorPacket()
|
||||
@@ -109,6 +110,7 @@ void DuckyKeyboardController::SendInitializeColorPacket()
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, (unsigned char *)usb_buf, 65);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
||||
unsigned int DuckyKeyboardController::SendColorDataPacket
|
||||
@@ -176,6 +178,7 @@ unsigned int DuckyKeyboardController::SendColorDataPacket
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, (unsigned char *)usb_buf, 65);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
|
||||
return(bytes_sent);
|
||||
}
|
||||
@@ -201,4 +204,5 @@ void DuckyKeyboardController::SendTerminateColorPacket()
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, (unsigned char *)usb_buf, 65);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user