1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-23 09:16:11 +00:00

Fix spelling of SupportedKeyboards

Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
This commit is contained in:
Kevin Pearson 2017-04-06 09:18:23 -04:00
parent a4b4cae4ef
commit d69ce2855f
2 changed files with 15 additions and 15 deletions

View File

@ -28,9 +28,9 @@ bool LedKeyboard::listKeyboards() {
devs = hid_enumerate(0x0, 0x0);
dev = devs;
while (dev) {
for (int i=0; i<(int)SuportedKeyboards.size(); i++) {
if (dev->vendor_id == SuportedKeyboards[i][0]) {
if (dev->product_id == SuportedKeyboards[i][1]) {
for (int i=0; i<(int)SupportedKeyboards.size(); i++) {
if (dev->vendor_id == SupportedKeyboards[i][0]) {
if (dev->product_id == SupportedKeyboards[i][1]) {
cout<<"0x"<<std::hex<<dev->vendor_id \
<<" 0x"<<std::hex<<dev->product_id \
<<" "<<dev->serial_number \
@ -59,9 +59,9 @@ bool LedKeyboard::listKeyboards() {
libusb_device *device = devs[i];
libusb_device_descriptor desc;
libusb_get_device_descriptor(device, &desc);
for (int i=0; i<(int)SuportedKeyboards.size(); i++) {
if (desc.idVendor == SuportedKeyboards[i][0]) {
if (desc.idProduct == SuportedKeyboards[i][1]) {
for (int i=0; i<(int)SupportedKeyboards.size(); i++) {
if (desc.idVendor == SupportedKeyboards[i][0]) {
if (desc.idProduct == SupportedKeyboards[i][1]) {
cout<<"0x"<<std::hex<<desc.idVendor \
<<" 0x"<<std::hex<<desc.idProduct<<endl;
break;
@ -95,12 +95,12 @@ bool LedKeyboard::open() {
dev = devs;
m_keyboardModel = KeyboardModel::unknown;
while (dev) {
for (int i=0; i<(int)SuportedKeyboards.size(); i++) {
if (dev->vendor_id == SuportedKeyboards[i][0]) {
if (dev->product_id == SuportedKeyboards[i][1]) {
for (int i=0; i<(int)SupportedKeyboards.size(); i++) {
if (dev->vendor_id == SupportedKeyboards[i][0]) {
if (dev->product_id == SupportedKeyboards[i][1]) {
m_vendorID = dev->vendor_id;
m_productID = dev->product_id;
m_keyboardModel = (KeyboardModel)SuportedKeyboards[i][2];
m_keyboardModel = (KeyboardModel)SupportedKeyboards[i][2];
break;
}
}
@ -139,12 +139,12 @@ bool LedKeyboard::open() {
libusb_device *device = devs[i];
libusb_device_descriptor desc;
libusb_get_device_descriptor(device, &desc);
for (int i=0; i<(int)SuportedKeyboards.size(); i++) {
if (desc.idVendor == SuportedKeyboards[i][0]) {
if (desc.idProduct == SuportedKeyboards[i][1]) {
for (int i=0; i<(int)SupportedKeyboards.size(); i++) {
if (desc.idVendor == SupportedKeyboards[i][0]) {
if (desc.idProduct == SupportedKeyboards[i][1]) {
m_vendorID = desc.idVendor;
m_productID = desc.idProduct;
m_keyboardModel = (KeyboardModel)SuportedKeyboards[i][2];
m_keyboardModel = (KeyboardModel)SupportedKeyboards[i][2];
break;
}
}

View File

@ -16,7 +16,7 @@ class LedKeyboard {
private:
const std::vector<std::vector<uint16_t>> SuportedKeyboards = {
const std::vector<std::vector<uint16_t>> SupportedKeyboards = {
{ 0x46d, 0xc330, (u_int16_t)KeyboardModel::g410 },
{ 0x46d, 0xc333, (u_int16_t)KeyboardModel::g610 },
{ 0x46d, 0xc338, (u_int16_t)KeyboardModel::g610 },