Add Wooting LE & HE and fix Wooting initialization on Linux

Commits squashed and amended to remove commented code by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
Shayne Hartford 2021-06-26 16:39:44 -04:00 committed by Adam Honse
parent efb19ab6c6
commit 62906e7f10
2 changed files with 12 additions and 8 deletions

View file

@ -128,9 +128,8 @@ void WootingKeyboardController::SendDirect(RGBColor* colors, unsigned int num_co
void WootingKeyboardController::SendInitialize()
{
wooting_usb_send_feature(WOOTING_COLOR_INIT_COMMAND, 0,0,0,0);
unsigned char stub = 0;
hid_read(dev, &stub, 0);
hid_read_timeout(dev, &stub, 0, 50);
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
bool WootingKeyboardController::wooting_usb_send_feature(uint8_t commandId, uint8_t parameter0, uint8_t parameter1, uint8_t parameter2, uint8_t parameter3)

View file

@ -8,13 +8,16 @@
/*-----------------------------------------------------*\
| Wooting vendor ID |
\*-----------------------------------------------------*/
#define WOOTING_VID 0x03EB
#define WOOTING_OLD_VID 0x03EB
#define WOOTING_NEW_VID 0x31E3
/*-----------------------------------------------------*\
| Keyboard product IDs |
\*-----------------------------------------------------*/
#define WOOTING_ONE_PID 0xFF01
#define WOOTING_TWO_PID 0xFF02
#define WOOTING_ONE_PID 0xFF01
#define WOOTING_TWO_PID 0xFF02
#define WOOTING_TWO_LE_PID 0x1210
#define WOOTING_TWO_HE_PID 0x1220
typedef struct
{
@ -30,8 +33,10 @@ static const wooting_device device_list[] =
/*-----------------------------------------------------------------------*\
| Keyboards |
\*-----------------------------------------------------------------------*/
{ WOOTING_VID, WOOTING_ONE_PID, "Wooting One" },
// { WOOTING_VID, WOOTING_TWO_PID, "Wooting Two" },
{ WOOTING_OLD_VID, WOOTING_ONE_PID, "Wooting One" },
{ WOOTING_OLD_VID, WOOTING_TWO_PID, "Wooting Two" },
{ WOOTING_NEW_VID, WOOTING_TWO_LE_PID, "Wooting Two LE" },
{ WOOTING_NEW_VID, WOOTING_TWO_HE_PID, "Wooting Two HE" },
};
/******************************************************************************************\