diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index 03f3020..37a7fd8 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -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"<vendor_id \ <<" 0x"<product_id \ <<" "<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"<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; } } diff --git a/src/classes/Keyboard.h b/src/classes/Keyboard.h index 946382f..fdf7bbf 100644 --- a/src/classes/Keyboard.h +++ b/src/classes/Keyboard.h @@ -16,7 +16,7 @@ class LedKeyboard { private: - const std::vector> SuportedKeyboards = { + const std::vector> SupportedKeyboards = { { 0x46d, 0xc330, (u_int16_t)KeyboardModel::g410 }, { 0x46d, 0xc333, (u_int16_t)KeyboardModel::g610 }, { 0x46d, 0xc338, (u_int16_t)KeyboardModel::g610 },