mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-19 12:06:37 -04:00
Add QMK OpenRGB Protocol Revision B Controller
* Updates for direct mode initialization to work with the new QMK Update
* Merge each 8 GetLEDInfo HID calls into one single call
* Merge all IsEnabledMode HID calls into one single call
* Update protocol version
Commits squashed and amended by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
@@ -12,14 +12,17 @@
|
||||
|
||||
#include "Detector.h"
|
||||
#include "QMKOpenRGBRev9Controller.h"
|
||||
#include "QMKOpenRGBRevBController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_QMKOpenRGBRev9.h"
|
||||
#include "RGBController_QMKOpenRGBRevB.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Protocol version |
|
||||
\*-----------------------------------------------------*/
|
||||
#define QMK_OPENRGB_PROTOCOL_VERSION_9 0x09
|
||||
#define QMK_OPENRGB_PROTOCOL_VERSION_B 0x0B
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Usage and Usage Page |
|
||||
@@ -73,6 +76,15 @@ void DetectQMKOpenRGBControllers(hid_device_info *info, const std::string&)
|
||||
RGBController_QMKOpenRGBRev9* rgb_controller = new RGBController_QMKOpenRGBRev9(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
break;
|
||||
|
||||
case QMK_OPENRGB_PROTOCOL_VERSION_B:
|
||||
{
|
||||
QMKOpenRGBRevBController* controller = new QMKOpenRGBRevBController(dev, info->path);
|
||||
RGBController_QMKOpenRGBRevB* rgb_controller = new RGBController_QMKOpenRGBRevB(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user