diff --git a/Controllers/AsusAuraUSBController/AsusAuraUSBController.cpp b/Controllers/AsusAuraUSBController/AsusAuraUSBController.cpp index 152af08a..0bd38ff8 100644 --- a/Controllers/AsusAuraUSBController/AsusAuraUSBController.cpp +++ b/Controllers/AsusAuraUSBController/AsusAuraUSBController.cpp @@ -26,6 +26,7 @@ AuraUSBController::~AuraUSBController() { hid_close(dev); } + unsigned int AuraUSBController::GetChannelCount() { return(device_info.size()); @@ -104,7 +105,7 @@ void AuraUSBController::GetConfigTable() } } else - { + { LOG_INFO("[%s] Could not read config table, can not add device", device_name); delete this; } diff --git a/Controllers/CorsairVengeanceProController/CorsairVengeanceProControllerDetect.cpp b/Controllers/CorsairVengeanceProController/CorsairVengeanceProControllerDetect.cpp index 5eb1e3c5..b7a37ef1 100644 --- a/Controllers/CorsairVengeanceProController/CorsairVengeanceProControllerDetect.cpp +++ b/Controllers/CorsairVengeanceProController/CorsairVengeanceProControllerDetect.cpp @@ -27,7 +27,7 @@ bool TestForCorsairVengeanceProController(i2c_smbus_interface* bus, unsigned cha LOG_DEBUG("[%s] Trying address %02X", CORSAIR_VENGEANCE_RGB_PRO_NAME, address); - if (res >= 0) + if(res >= 0) { pass = true; @@ -41,7 +41,7 @@ bool TestForCorsairVengeanceProController(i2c_smbus_interface* bus, unsigned cha res = bus->i2c_smbus_read_byte_data(address, 0x44); - if (!((res == 0x03) || (res == 0x04))) + if(!((res == 0x03) || (res == 0x04))) { pass = false; LOG_DEBUG("[%s] Failed: was expecting 0x03 or 0x04 got %02X", CORSAIR_VENGEANCE_RGB_PRO_NAME, res); @@ -53,7 +53,7 @@ bool TestForCorsairVengeanceProController(i2c_smbus_interface* bus, unsigned cha } std::this_thread::sleep_for(10ms); - + return(pass); } /* TestForCorsairVengeanceProController() */ @@ -71,9 +71,6 @@ bool TestForCorsairVengeanceProController(i2c_smbus_interface* bus, unsigned cha void DetectCorsairVengeanceProControllers(std::vector &busses) { - CorsairVengeanceProController* new_corsair_pro; - RGBController_CorsairVengeancePro* new_controller; - for(unsigned int bus = 0; bus < busses.size(); bus++) { LOG_DEBUG("[%s] Testing bus %d", CORSAIR_VENGEANCE_RGB_PRO_NAME, bus); @@ -86,7 +83,7 @@ void DetectCorsairVengeanceProControllers(std::vector &bus { CorsairVengeanceProController* new_controller = new CorsairVengeanceProController(busses[bus], addr); RGBController_CorsairVengeancePro* new_rgbcontroller = new RGBController_CorsairVengeancePro(new_controller); - + ResourceManager::get()->RegisterRGBController(new_rgbcontroller); } } diff --git a/Controllers/CorsairWirelessController/CorsairWirelessController.cpp b/Controllers/CorsairWirelessController/CorsairWirelessController.cpp index a7b9d7d4..0173e317 100644 --- a/Controllers/CorsairWirelessController/CorsairWirelessController.cpp +++ b/Controllers/CorsairWirelessController/CorsairWirelessController.cpp @@ -86,10 +86,6 @@ void CorsairWirelessController::SetLEDs(std::vectorcolors) SendDirectFrame(false, &buf[362]); } -void CorsairWirelessController::SetLEDsKeyboardFull(std::vector colors) -{ -} - void CorsairWirelessController::SetName(std::string device_name) { name = device_name; diff --git a/Controllers/CorsairWirelessController/CorsairWirelessController.h b/Controllers/CorsairWirelessController/CorsairWirelessController.h index f5b73132..f60a8b72 100644 --- a/Controllers/CorsairWirelessController/CorsairWirelessController.h +++ b/Controllers/CorsairWirelessController/CorsairWirelessController.h @@ -27,7 +27,6 @@ public: std::string GetSerialString(); void SetLEDs(std::vector colors); - void SetLEDsKeyboardFull(std::vector colors); void SetName(std::string device_name); private: diff --git a/Controllers/CrucialController/CrucialControllerDetect.cpp b/Controllers/CrucialController/CrucialControllerDetect.cpp index 42888b92..51b97431 100644 --- a/Controllers/CrucialController/CrucialControllerDetect.cpp +++ b/Controllers/CrucialController/CrucialControllerDetect.cpp @@ -121,7 +121,7 @@ bool TestForCrucialController(i2c_smbus_interface* bus, unsigned char address) { buf[i] = CrucialRegisterRead(bus, address, CRUCIAL_REG_MICRON_CHECK_2 + i); } - + if(strcmp(buf, "Micron") == 0) { LOG_DEBUG("[%s] Device %02X is a Micron device, continuing", CRUCIAL_CONTROLLER_NAME, address); @@ -161,18 +161,17 @@ void CrucialRegisterWrite(i2c_smbus_interface* bus, unsigned char dev, unsigned void DetectCrucialControllers(std::vector &busses) { - for (unsigned int bus = 0; bus < busses.size(); bus++) + for(unsigned int bus = 0; bus < busses.size(); bus++) { int address_list_idx = -1; IF_DRAM_SMBUS(busses[bus]->pci_vendor, busses[bus]->pci_device) { - - for (unsigned int slot = 0; slot < 4; slot++) + for(unsigned int slot = 0; slot < 4; slot++) { int res = busses[bus]->i2c_smbus_write_quick(0x27, I2C_SMBUS_WRITE); - if (res < 0) + if(res < 0) { break; } @@ -188,10 +187,9 @@ void DetectCrucialControllers(std::vector &busses) } else { - LOG_DEBUG("[%s] Testing address %02X to see if there is a device there", CRUCIAL_CONTROLLER_NAME, crucial_addresses[address_list_idx]); break; } - } while (res >= 0); + } while(res >= 0); if(address_list_idx < CRUCIAL_ADDRESS_COUNT) { @@ -207,9 +205,11 @@ void DetectCrucialControllers(std::vector &busses) LOG_DEBUG("[%s] In bus: %02X:%02X looking for devices at [%s]", CRUCIAL_CONTROLLER_NAME, busses[bus]->pci_vendor, busses[bus]->pci_device, TESTING_ADDRESSES); // Add Crucial controllers - for (unsigned int address_list_idx = 0; address_list_idx < CRUCIAL_ADDRESS_COUNT; address_list_idx++) + for(unsigned int address_list_idx = 0; address_list_idx < CRUCIAL_ADDRESS_COUNT; address_list_idx++) { - if (TestForCrucialController(busses[bus], crucial_addresses[address_list_idx])) + LOG_DEBUG("[%s] Testing address %02X to see if there is a device there", CRUCIAL_CONTROLLER_NAME, crucial_addresses[address_list_idx]); + + if(TestForCrucialController(busses[bus], crucial_addresses[address_list_idx])) { CrucialController* controller = new CrucialController(busses[bus], crucial_addresses[address_list_idx]); RGBController_Crucial* rgb_controller = new RGBController_Crucial(controller); diff --git a/Controllers/ENESMBusController/ENESMBusController.cpp b/Controllers/ENESMBusController/ENESMBusController.cpp index 6fed660a..026c79ac 100644 --- a/Controllers/ENESMBusController/ENESMBusController.cpp +++ b/Controllers/ENESMBusController/ENESMBusController.cpp @@ -196,7 +196,7 @@ const char * ENESMBusController::GetChannelName(unsigned int led) case (unsigned char)ENE_LED_CHANNEL_DRAM_2: return(ene_channels[5]); break; - + case (unsigned char)ENE_LED_CHANNEL_PCIE: return(ene_channels[6]); break; @@ -273,7 +273,7 @@ void ENESMBusController::SetAllColorsDirect(RGBColor* colors) while(bytes_sent < (led_count * 3)) { - unsigned int bytes_to_send = (led_count * 3) - bytes_sent; + int bytes_to_send = (led_count * 3) - bytes_sent; if(bytes_to_send > interface->GetMaxBlock()) { @@ -302,7 +302,7 @@ void ENESMBusController::SetAllColorsEffect(RGBColor* colors) while(bytes_sent < (led_count * 3)) { - unsigned int bytes_to_send = (led_count * 3) - bytes_sent; + int bytes_to_send = (led_count * 3) - bytes_sent; if(bytes_to_send > interface->GetMaxBlock()) { @@ -315,7 +315,7 @@ void ENESMBusController::SetAllColorsEffect(RGBColor* colors) } ENERegisterWrite(ENE_REG_APPLY, ENE_APPLY_VAL); - + delete[] color_buf; } diff --git a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface.h b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface.h index f3b18b18..7a2062d6 100644 --- a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface.h +++ b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface.h @@ -16,9 +16,11 @@ typedef unsigned char ene_dev_id; class ENESMBusInterface { public: + virtual ~ENESMBusInterface() = default; + virtual std::string GetLocation() = 0; virtual int GetMaxBlock() = 0; virtual unsigned char ENERegisterRead(ene_dev_id dev, ene_register reg) = 0; virtual void ENERegisterWrite(ene_dev_id dev, ene_register reg, unsigned char val) = 0; virtual void ENERegisterWriteBlock(ene_dev_id dev, ene_register reg, unsigned char * data, unsigned char sz) = 0; -}; \ No newline at end of file +}; diff --git a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G.cpp b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G.cpp index 3e3662d8..2bdc37ad 100644 --- a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G.cpp +++ b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G.cpp @@ -75,6 +75,7 @@ static int nvme_passthru(int fd, unsigned long ioctl_cmd, uint8_t opcode, .cdw14 = cdw14, .cdw15 = cdw15, .timeout_ms = timeout_ms, + .result = 0, }; return nvme_submit_passthru(fd, ioctl_cmd, &cmd, result); @@ -103,6 +104,11 @@ ENESMBusInterface_SpectrixS40G::ENESMBusInterface_SpectrixS40G(int fd, char* pat this->path = path; } +ENESMBusInterface_SpectrixS40G::~ENESMBusInterface_SpectrixS40G() +{ + +} + std::string ENESMBusInterface_SpectrixS40G::GetLocation() { return("NVMe: " + path); @@ -198,4 +204,4 @@ void ENESMBusInterface_SpectrixS40G::ENERegisterWriteBlock(ene_dev_id dev, ene_r cfg.cdw15, cfg.data_len, data, cfg.metadata_len, metadata, cfg.timeout_ms, &result); -} \ No newline at end of file +} diff --git a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G.h b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G.h index 410b109b..e0f6d067 100644 --- a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G.h +++ b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G.h @@ -15,6 +15,7 @@ class ENESMBusInterface_SpectrixS40G : public ENESMBusInterface { public: ENESMBusInterface_SpectrixS40G(int fd, char* path); + ~ENESMBusInterface_SpectrixS40G(); std::string GetLocation(); int GetMaxBlock(); @@ -25,4 +26,4 @@ public: private: int nvme_fd; std::string path; -}; \ No newline at end of file +}; diff --git a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G_Windows.cpp b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G_Windows.cpp index 4f319931..0b8fe83e 100644 --- a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G_Windows.cpp +++ b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G_Windows.cpp @@ -20,6 +20,11 @@ ENESMBusInterface_SpectrixS40G::ENESMBusInterface_SpectrixS40G(HANDLE fd, wchar_ this->path = path; } +ENESMBusInterface_SpectrixS40G::~ENESMBusInterface_SpectrixS40G() +{ + +} + std::string ENESMBusInterface_SpectrixS40G::GetLocation() { std::string str(path.begin(), path.end()); @@ -92,7 +97,7 @@ unsigned char ENESMBusInterface_SpectrixS40G::ENERegisterRead(ene_dev_id dev, en \*-----------------------------------------------------------------------------*/ DWORD bytesreturned = 0; while(bytesreturned != sizeof(buffer)) - { + { bool result = DeviceIoControl(nvme_fd, IOCTL_STORAGE_PROTOCOL_COMMAND, buffer, sizeof(buffer), buffer, sizeof(buffer), &bytesreturned, (LPOVERLAPPED)0x0); } @@ -248,4 +253,4 @@ void ENESMBusInterface_SpectrixS40G::ENERegisterWriteBlock(ene_dev_id dev, ene_r \*-----------------------------------------------------------------------------*/ DeviceIoControl(nvme_fd, IOCTL_STORAGE_PROTOCOL_COMMAND, buffer, sizeof(buffer), buffer, sizeof(buffer), 0x0, (LPOVERLAPPED)0x0); } -} \ No newline at end of file +} diff --git a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G_Windows.h b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G_Windows.h index 4fbe1926..d6eeec4d 100644 --- a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G_Windows.h +++ b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_SpectrixS40G_Windows.h @@ -17,6 +17,7 @@ class ENESMBusInterface_SpectrixS40G : public ENESMBusInterface { public: ENESMBusInterface_SpectrixS40G(HANDLE fd, wchar_t* path); + ~ENESMBusInterface_SpectrixS40G(); std::string GetLocation(); int GetMaxBlock(); @@ -27,4 +28,4 @@ public: private: HANDLE nvme_fd; std::wstring path; -}; \ No newline at end of file +}; diff --git a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_i2c_smbus.cpp b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_i2c_smbus.cpp index 77989518..0bbdb807 100644 --- a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_i2c_smbus.cpp +++ b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_i2c_smbus.cpp @@ -13,6 +13,11 @@ ENESMBusInterface_i2c_smbus::ENESMBusInterface_i2c_smbus(i2c_smbus_interface* bu this->bus = bus; } +ENESMBusInterface_i2c_smbus::~ENESMBusInterface_i2c_smbus() +{ + +} + std::string ENESMBusInterface_i2c_smbus::GetLocation() { std::string return_string(bus->device_name); @@ -49,4 +54,4 @@ void ENESMBusInterface_i2c_smbus::ENERegisterWriteBlock(ene_dev_id dev, ene_regi //Write ENE block data bus->i2c_smbus_write_block_data(dev, 0x03, sz, data); -} \ No newline at end of file +} diff --git a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_i2c_smbus.h b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_i2c_smbus.h index f34c2982..48275f37 100644 --- a/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_i2c_smbus.h +++ b/Controllers/ENESMBusController/ENESMBusInterface/ENESMBusInterface_i2c_smbus.h @@ -16,6 +16,7 @@ class ENESMBusInterface_i2c_smbus : public ENESMBusInterface { public: ENESMBusInterface_i2c_smbus(i2c_smbus_interface* bus); + ~ENESMBusInterface_i2c_smbus(); std::string GetLocation(); int GetMaxBlock(); @@ -25,4 +26,4 @@ public: private: i2c_smbus_interface * bus; -}; \ No newline at end of file +}; diff --git a/Controllers/EVGAUSBController/EVGAUSBControllerDetect.cpp b/Controllers/EVGAUSBController/EVGAUSBControllerDetect.cpp index abae564c..c2779dd1 100644 --- a/Controllers/EVGAUSBController/EVGAUSBControllerDetect.cpp +++ b/Controllers/EVGAUSBController/EVGAUSBControllerDetect.cpp @@ -25,13 +25,11 @@ void DetectEVGAKeyboardControllers(hid_device_info* info, const std::string& name) { - static const char* controller_name = "EVGA Keyboard Controller"; - hid_device* dev = hid_open_path(info->path); if(dev) { - EVGAKeyboardController* controller = new EVGAKeyboardController(dev, info->path, info->product_id); + EVGAKeyboardController* controller = new EVGAKeyboardController(dev, info->path, info->product_id); RGBController_EVGAKeyboard* rgb_controller = new RGBController_EVGAKeyboard(controller); rgb_controller->name = name; @@ -44,8 +42,8 @@ void DetectEVGAMouse(hid_device_info* info, const std::string &, int connection_ hid_device* dev = hid_open_path(info->path); if (dev) { - EVGAMouseController* controller = new EVGAMouseController(dev, info->path, connection_type); - RGBController_EVGAMouse *rgb_controller = new RGBController_EVGAMouse(controller); + EVGAMouseController* controller = new EVGAMouseController(dev, info->path, connection_type); + RGBController_EVGAMouse* rgb_controller = new RGBController_EVGAMouse(controller); /*-------------------------*\ | Constructor sets the name | \*-------------------------*/ diff --git a/Controllers/EVGAUSBController/RGBController_EVGAKeyboard.cpp b/Controllers/EVGAUSBController/RGBController_EVGAKeyboard.cpp index 155bd3ef..32d0b61c 100644 --- a/Controllers/EVGAUSBController/RGBController_EVGAKeyboard.cpp +++ b/Controllers/EVGAUSBController/RGBController_EVGAKeyboard.cpp @@ -381,7 +381,7 @@ RGBController_EVGAKeyboard::RGBController_EVGAKeyboard(EVGAKeyboardController* c ThreeBy3.speed = EVGA_KEYBOARD_CONTROLLER_SPEED_NORMAL; modes.push_back(ThreeBy3); - uint8_t set_mode = controller->GetMode(); + //uint8_t set_mode = controller->GetMode(); //active_mode = set_mode; SetupZones(); } @@ -532,7 +532,7 @@ void RGBController_EVGAKeyboard::DeviceUpdateMode() if(set_mode.color_mode == MODE_COLORS_RANDOM) { - for(int i = 0; i < colours.size(); i++) + for(unsigned int i = 0; i < colours.size(); i++) { colours[i] = GetRandomColor(); } diff --git a/Controllers/HPOmen30LController/HPOmen30LController.cpp b/Controllers/HPOmen30LController/HPOmen30LController.cpp index cf342823..b3b088b8 100644 --- a/Controllers/HPOmen30LController/HPOmen30LController.cpp +++ b/Controllers/HPOmen30LController/HPOmen30LController.cpp @@ -16,7 +16,7 @@ HPOmen30LController::HPOmen30LController(hid_device* dev_handle, const char* pat location = path; strcpy(device_name, "HP Omen 30L"); - + hp_zone logo; logo.value = HP_OMEN_30L_LOGO_ZONE; logo.mode = HP_OMEN_30L_DIRECT; @@ -43,7 +43,7 @@ HPOmen30LController::HPOmen30LController(hid_device* dev_handle, const char* pat cpu.mode = HP_OMEN_30L_DIRECT; cpu.speed = HP_OMEN_30L_SPEED_MED; cpu.brightness = 0x64; - hp_zones.push_back(cpu); + hp_zones.push_back(cpu); } @@ -68,7 +68,7 @@ std::string HPOmen30LController::GetSerialString() return(ret_string); } -std::string HPOmen30LController::GetEffectChannelString(unsigned char channel) +std::string HPOmen30LController::GetEffectChannelString(unsigned char /*channel*/) { std::string ret_string = ""; return(ret_string); @@ -81,7 +81,7 @@ std::string HPOmen30LController::GetFirmwareVersionString() } void HPOmen30LController::SetZoneMode(int zone,unsigned char mode, unsigned char speed,unsigned char brightness) -{ +{ hp_zones[zone].mode = mode; hp_zones[zone].speed = speed; hp_zones[zone].brightness = brightness; @@ -115,7 +115,7 @@ void HPOmen30LController::SendZoneUpdate(int zone, std::vector colors) }; usb_buf[0x36] = hp_zones[zone].value; - + if(hp_zones[zone].mode != HP_OMEN_30L_DIRECT) { hid_write(dev, usb_buf, 58); @@ -136,7 +136,7 @@ void HPOmen30LController::SendZoneUpdate(int zone, std::vector colors) usb_buf[0x31] = 0x0A; } - if(hp_zones[zone].mode == HP_OMEN_30L_DIRECT) + if(hp_zones[zone].mode == HP_OMEN_30L_DIRECT) { usb_buf[0x08] = usb_buf[0x0C] = usb_buf[0x10] = usb_buf[0x14] = 0x64; usb_buf[0x09] = usb_buf[0x0D] = usb_buf[0x11] = usb_buf[0x15] = RGBGetRValue(colors[zone]); @@ -157,10 +157,10 @@ void HPOmen30LController::SendZoneUpdate(int zone, std::vector colors) { usb_buf[0x04] = colors.size(); - for(int i = 0; i < colors.size(); i++) + for(unsigned int i = 0; i < colors.size(); i++) { usb_buf[0x05] = i + 1; - + usb_buf[0x08] = usb_buf[0x0B] = usb_buf[0x0E] = usb_buf[0x11] = RGBGetRValue(colors[i]); usb_buf[0x09] = usb_buf[0x0C] = usb_buf[0x0F] = usb_buf[0x12] = RGBGetGValue(colors[i]); usb_buf[0x0A] = usb_buf[0x0D] = usb_buf[0x10] = usb_buf[0x13] = RGBGetBValue(colors[i]); @@ -168,4 +168,4 @@ void HPOmen30LController::SendZoneUpdate(int zone, std::vector colors) hid_write(dev, usb_buf, 58); } } -} \ No newline at end of file +} diff --git a/Controllers/HPOmen30LController/RGBController_HPOmen30L.cpp b/Controllers/HPOmen30LController/RGBController_HPOmen30L.cpp index 519ddad9..5a5f8e0c 100644 --- a/Controllers/HPOmen30LController/RGBController_HPOmen30L.cpp +++ b/Controllers/HPOmen30LController/RGBController_HPOmen30L.cpp @@ -175,7 +175,7 @@ void RGBController_HPOmen30L::ResizeZone(int /*zone*/, int /*new_size*/) void RGBController_HPOmen30L::DeviceUpdateLEDs() { - for(int i = 0; i < zones.size(); i++) + for(unsigned int i = 0; i < zones.size(); i++) { if(modes[active_mode].value == HP_OMEN_30L_STATIC || modes[active_mode].value == HP_OMEN_30L_DIRECT) { @@ -205,7 +205,7 @@ void RGBController_HPOmen30L::SetCustomMode() void RGBController_HPOmen30L::DeviceUpdateMode() { - for(int i = 0; i < zones.size(); i++) + for(unsigned int i = 0; i < zones.size(); i++) { controller->SetZoneMode(i, modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness); } diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp index 9c8fa99f..3edb5597 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp @@ -60,7 +60,6 @@ void HyperXAlloyFPSController::SetLEDsDirect(std::vector colors) unsigned char red_color_data[106]; unsigned char grn_color_data[106]; unsigned char blu_color_data[106]; - unsigned char ext_color_data[150]; for(std::size_t i = 0; i < 106; i++) { @@ -129,4 +128,4 @@ void HyperXAlloyFPSController::SendDirect | Send packet | \*-----------------------------------------------------*/ hid_send_feature_report(dev, buf, 264); -} \ No newline at end of file +} diff --git a/Controllers/LenovoControllers/LenovoUSBDetect.cpp b/Controllers/LenovoControllers/LenovoUSBDetect.cpp index e50f40cf..d772496c 100644 --- a/Controllers/LenovoControllers/LenovoUSBDetect.cpp +++ b/Controllers/LenovoControllers/LenovoUSBDetect.cpp @@ -31,13 +31,11 @@ enum void DetectLenovoLegionUSBControllers(hid_device_info* info, const std::string& name) { - static const char* controller_name = "Lenovo Legion Laptop"; - hid_device* dev = hid_open_path(info->path); if(dev) { - LenovoUSBController* controller = new LenovoUSBController(dev, info->path, info->product_id); + LenovoUSBController* controller = new LenovoUSBController(dev, info->path, info->product_id); RGBController_LenovoUSB* rgb_controller = new RGBController_LenovoUSB(controller); rgb_controller->name = name; diff --git a/Controllers/LenovoControllers/RGBController_LenovoUSB.cpp b/Controllers/LenovoControllers/RGBController_LenovoUSB.cpp index c47d4e3b..c4f4f4e2 100644 --- a/Controllers/LenovoControllers/RGBController_LenovoUSB.cpp +++ b/Controllers/LenovoControllers/RGBController_LenovoUSB.cpp @@ -194,7 +194,7 @@ void RGBController_LenovoUSB::SetupZones() break; } - for(int i = 0; i < lenovo_zones.size(); i++) + for(unsigned int i = 0; i < lenovo_zones.size(); i++) { zone new_zone; new_zone.name = lenovo_zones[i].name; @@ -264,7 +264,7 @@ void RGBController_LenovoUSB::ResizeZone(int /*zone*/, int /*new_size*/) void RGBController_LenovoUSB::UpdateSingleLED(int led) { - if(led != NA) + if(led != (int)NA) { controller->setSingleLED(lenovo_leds[led].zone_num, lenovo_leds[led].led_num, colors[led]); } @@ -275,7 +275,7 @@ void RGBController_LenovoUSB::UpdateZoneLEDs(int zone) uint8_t device_zone = lenovo_leds[zones[zone].start_idx].zone_num; vector> color_map; - for(int i = 0; i < zones[zone].leds_count; i++) + for(unsigned int i = 0; i < zones[zone].leds_count; i++) { int index = zones[zone].start_idx+i; diff --git a/Controllers/LogitechController/LogitechProtocolCommon.cpp b/Controllers/LogitechController/LogitechProtocolCommon.cpp index 4e5adc24..58bc6238 100644 --- a/Controllers/LogitechController/LogitechProtocolCommon.cpp +++ b/Controllers/LogitechController/LogitechProtocolCommon.cpp @@ -307,7 +307,7 @@ hid_device* logitech_device::getDevice(uint8_t usage_index) else { return find_usage->second; - } + } } uint8_t logitech_device::getFeatureIndex(uint16_t feature_page) diff --git a/Controllers/N5312AController/N5312AControllerDetect.cpp b/Controllers/N5312AController/N5312AControllerDetect.cpp index e64f80ff..9a48b0ff 100644 --- a/Controllers/N5312AController/N5312AControllerDetect.cpp +++ b/Controllers/N5312AController/N5312AControllerDetect.cpp @@ -21,7 +21,7 @@ void DetectN5312AControllers(hid_device_info* info, const std::string& name) { N5312AController* controller = new N5312AController(dev, *info); RGBController_N5312A* rgb_controller = new RGBController_N5312A(controller); - rgb_controller->name = rgb_controller->name; + rgb_controller->name = name; ResourceManager::get()->RegisterRGBController(rgb_controller); } diff --git a/Controllers/PatriotViperController/PatriotViperController.cpp b/Controllers/PatriotViperController/PatriotViperController.cpp index 3c9e6b87..5eff69fc 100644 --- a/Controllers/PatriotViperController/PatriotViperController.cpp +++ b/Controllers/PatriotViperController/PatriotViperController.cpp @@ -267,7 +267,7 @@ void PatriotViperController::StopKeepaliveThread() } } -unsigned int PatriotViperController::GetDelay(unsigned char mode, unsigned int step, unsigned int sub_step, bool loop_end) +unsigned int PatriotViperController::GetDelay(unsigned char mode, unsigned int /*step*/, unsigned int sub_step, bool loop_end) { if(loop_end) { @@ -335,4 +335,4 @@ unsigned int PatriotViperController::GetDelay(unsigned char mode, unsigned int s return 0; } } -} \ No newline at end of file +} diff --git a/Controllers/PatriotViperSteelController/PatriotViperSteelControllerDetect.cpp b/Controllers/PatriotViperSteelController/PatriotViperSteelControllerDetect.cpp index 457d6dc1..1509fada 100644 --- a/Controllers/PatriotViperSteelController/PatriotViperSteelControllerDetect.cpp +++ b/Controllers/PatriotViperSteelController/PatriotViperSteelControllerDetect.cpp @@ -25,26 +25,21 @@ using namespace std::chrono_literals; void DetectPatriotViperSteelControllers(std::vector &busses) { - PatriotViperSteelController *new_viper; - RGBController_PatriotViperSteel *new_controller; - for(unsigned int bus = 0; bus < busses.size(); bus++) { - IF_DRAM_SMBUS(busses[bus]->pci_vendor, busses[bus]->pci_device) { - int res = busses[bus]->i2c_smbus_read_byte_data(0x20, 0x1D); - std::this_thread::sleep_for(1ms); - if((busses[bus]->i2c_smbus_read_byte_data(0x20, 0x1D) == 0x0F) + if((busses[bus]->i2c_smbus_read_byte_data(0x20, 0x1D) == 0x0F) &&(busses[bus]->i2c_smbus_read_byte_data(0x20, 0x1E) == 0x0C) &&(busses[bus]->i2c_smbus_read_byte_data(0x20, 0x39) == 0x0F) &&(busses[bus]->i2c_smbus_read_byte_data(0x20, 0x3A) == 0x0C)) { - new_viper = new PatriotViperSteelController(busses[bus], 0x77); - new_controller = new RGBController_PatriotViperSteel(new_viper); - ResourceManager::get()->RegisterRGBController(new_controller); + PatriotViperSteelController* controller = new PatriotViperSteelController(busses[bus], 0x77); + RGBController_PatriotViperSteel* rgb_controller = new RGBController_PatriotViperSteel(controller); + + ResourceManager::get()->RegisterRGBController(rgb_controller); } } } diff --git a/Controllers/SinowealthController/RGBController_SinowealthKeyboard.cpp b/Controllers/SinowealthController/RGBController_SinowealthKeyboard.cpp index fce8b9b4..52f913c0 100644 --- a/Controllers/SinowealthController/RGBController_SinowealthKeyboard.cpp +++ b/Controllers/SinowealthController/RGBController_SinowealthKeyboard.cpp @@ -479,6 +479,6 @@ void RGBController_SinowealthKeyboard::DeviceUpdateMode() } else { - sinowealth->SetMode(modes[active_mode].value, brightness, modes[active_mode].speed, modes[active_mode].color_mode, selected_color); + sinowealth->SetMode(modes[active_mode].value, brightness, modes[active_mode].speed, modes[active_mode].color_mode); } } diff --git a/Controllers/SinowealthController/SinowealthKeyboardController.cpp b/Controllers/SinowealthController/SinowealthKeyboardController.cpp index 5b70ae80..2fe6a865 100644 --- a/Controllers/SinowealthController/SinowealthKeyboardController.cpp +++ b/Controllers/SinowealthController/SinowealthKeyboardController.cpp @@ -11,8 +11,6 @@ #include "SinowealthKeyboardController.h" #include -static unsigned char handshake_packet[] = { 0x06, 0x03, 0x01, 0x00, 0x08, 0x04 }; - static unsigned char send_per_key_part_of_command_packet[] = { 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, @@ -198,7 +196,7 @@ void SinowealthKeyboardController::SetStaticColor(RGBColor* color_buf) hid_send_feature_report(dev_data, usb_buf, sizeof(usb_buf)); } -void SinowealthKeyboardController::SetMode(unsigned char mode, unsigned char brightness, unsigned char speed, unsigned char color_mode, RGBColor* color_buf) +void SinowealthKeyboardController::SetMode(unsigned char mode, unsigned char brightness, unsigned char speed, unsigned char color_mode) { const int buffer_size = 1032; diff --git a/Controllers/SinowealthController/SinowealthKeyboardController.h b/Controllers/SinowealthController/SinowealthKeyboardController.h index e76a1ec9..52a5bc6e 100644 --- a/Controllers/SinowealthController/SinowealthKeyboardController.h +++ b/Controllers/SinowealthController/SinowealthKeyboardController.h @@ -71,8 +71,7 @@ public: void SetLEDColor(RGBColor* color_buf); void SetStaticColor(RGBColor* color_buf); - void SetMode(unsigned char mode, unsigned char brightness, unsigned char speed, RGBColor* color_buf); - void SetMode(unsigned char mode, unsigned char brightness, unsigned char speed, unsigned char color_mode, RGBColor *color_buf); + void SetMode(unsigned char mode, unsigned char brightness, unsigned char speed, unsigned char color_mode); void GetProfile(); void ReadFirmwareInfo(); void SetLEDsDirect(std::vector colors); diff --git a/Controllers/SteelSeriesController/RGBController_SteelSeriesApexTZone.cpp b/Controllers/SteelSeriesController/RGBController_SteelSeriesApexTZone.cpp index 119b66d6..64edf5b3 100644 --- a/Controllers/SteelSeriesController/RGBController_SteelSeriesApexTZone.cpp +++ b/Controllers/SteelSeriesController/RGBController_SteelSeriesApexTZone.cpp @@ -63,7 +63,7 @@ void RGBController_SteelSeriesApexTZone::SetupZones() curr_zone.matrix_map = NULL; zones.push_back(curr_zone); - for (int i = 1; i <= curr_zone.leds_count; i++) + for(unsigned int i = 1; i <= curr_zone.leds_count; i++) { led zone_led; zone_led.name = "LED " + std::to_string(i); diff --git a/Controllers/SteelSeriesController/RGBController_SteelSeriesRival.cpp b/Controllers/SteelSeriesController/RGBController_SteelSeriesRival.cpp index 45c5ca3a..ac18ad73 100644 --- a/Controllers/SteelSeriesController/RGBController_SteelSeriesRival.cpp +++ b/Controllers/SteelSeriesController/RGBController_SteelSeriesRival.cpp @@ -75,8 +75,6 @@ RGBController_SteelSeriesRival::RGBController_SteelSeriesRival(SteelSeriesRivalC Pulsate.speed = STEELSERIES_RIVAL_EFFECT_PULSATE_MID; modes.push_back(Pulsate); - - SetupZones(); } diff --git a/Controllers/SteelSeriesController/SteelSeriesAerox3Controller.cpp b/Controllers/SteelSeriesController/SteelSeriesAerox3Controller.cpp index 0a40a96a..95a22c9f 100644 --- a/Controllers/SteelSeriesController/SteelSeriesAerox3Controller.cpp +++ b/Controllers/SteelSeriesController/SteelSeriesAerox3Controller.cpp @@ -72,7 +72,7 @@ steelseries_mouse SteelSeriesAerox3Controller::GetMouse() return aerox_3; } -void SteelSeriesAerox3Controller::SetLightEffectAll(uint8_t effect) +void SteelSeriesAerox3Controller::SetLightEffectAll(uint8_t /*effect*/) { /*-----------------------------------------------------------------*\ | Not used by this device | diff --git a/Controllers/SteelSeriesController/SteelSeriesApexTZoneController.cpp b/Controllers/SteelSeriesController/SteelSeriesApexTZoneController.cpp index 3776862d..d30063d5 100644 --- a/Controllers/SteelSeriesController/SteelSeriesApexTZoneController.cpp +++ b/Controllers/SteelSeriesController/SteelSeriesApexTZoneController.cpp @@ -39,7 +39,7 @@ std::string SteelSeriesApexTZoneController::GetSerialString() { wchar_t serial_string[128]; int ret = hid_get_serial_number_string(dev, serial_string, 128); - + if (ret != 0) { return(""); @@ -81,7 +81,8 @@ void SteelSeriesApexTZoneController::SetColor(std::vector colors, unsi hid_write(dev, buf, STEELSERIES_TZ_WRITE_PACKET_SIZE); buf[0x01] = 0x0B; - for(int i = 0; i < colors.size(); i++) + + for(unsigned int i = 0; i < colors.size(); i++) { uint8_t index = i * 3; diff --git a/Controllers/SteelSeriesController/SteelSeriesMouseController.h b/Controllers/SteelSeriesController/SteelSeriesMouseController.h index 715dd959..64df7a1c 100644 --- a/Controllers/SteelSeriesController/SteelSeriesMouseController.h +++ b/Controllers/SteelSeriesController/SteelSeriesMouseController.h @@ -45,7 +45,7 @@ class SteelSeriesMouseController { public: SteelSeriesMouseController(hid_device* dev_handle, steelseries_type proto_type, const char* path); - ~SteelSeriesMouseController(); + virtual ~SteelSeriesMouseController(); std::string GetDeviceLocation(); char* GetDeviceName(); diff --git a/Controllers/SteelSeriesController/SteelSeriesSenseiController.cpp b/Controllers/SteelSeriesController/SteelSeriesSenseiController.cpp index 940afab0..eb243a20 100644 --- a/Controllers/SteelSeriesController/SteelSeriesSenseiController.cpp +++ b/Controllers/SteelSeriesController/SteelSeriesSenseiController.cpp @@ -15,15 +15,15 @@ static void send_usb_msg(hid_device* dev, char * data_pkt, unsigned int size) { char* usb_pkt = new char[size + 1]; - + usb_pkt[0] = 0x00; for(unsigned int i = 1; i < size + 1; i++) { usb_pkt[i] = data_pkt[i-1]; } - + hid_write(dev, (unsigned char *)usb_pkt, size + 1); - + delete usb_pkt; } @@ -119,8 +119,8 @@ void SteelSeriesSenseiController::SetLightEffect /*-----------------------------------------------------*\ | Set up Light Effect packet | \*-----------------------------------------------------*/ - char dur1; - char dur2; + char dur1 = 0x27; + char dur2 = 0x10; //10 sec cycle switch(effect) { diff --git a/Controllers/ViewSonicController/RGBController_XG270QG.cpp b/Controllers/ViewSonicController/RGBController_XG270QG.cpp index 68295196..ff069c39 100644 --- a/Controllers/ViewSonicController/RGBController_XG270QG.cpp +++ b/Controllers/ViewSonicController/RGBController_XG270QG.cpp @@ -120,24 +120,28 @@ void RGBController_XG270QG::SetupZones() SetupColors(); } -void RGBController_XG270QG::ResizeZone(int zone, int new_size) +void RGBController_XG270QG::ResizeZone(int /*zone*/, int /*new_size*/) { - // Not applicable + /*---------------------------------------------------------*\ + | This device does not support resizing zones | + \*---------------------------------------------------------*/ } void RGBController_XG270QG::DeviceUpdateLEDs() { - // + /*---------------------------------------------------------*\ + | This device does not include any per-LED modes | + \*---------------------------------------------------------*/ } -void RGBController_XG270QG::UpdateZoneLEDs(int zone) +void RGBController_XG270QG::UpdateZoneLEDs(int /*zone*/) { - // + DeviceUpdateLEDs(); } -void RGBController_XG270QG::UpdateSingleLED(int led) +void RGBController_XG270QG::UpdateSingleLED(int /*led*/) { - // + DeviceUpdateLEDs(); } void RGBController_XG270QG::DeviceUpdateMode() diff --git a/Controllers/ViewSonicController/VS_XG270QG_Controller.cpp b/Controllers/ViewSonicController/VS_XG270QG_Controller.cpp index 63b21b0e..37ddd761 100644 --- a/Controllers/ViewSonicController/VS_XG270QG_Controller.cpp +++ b/Controllers/ViewSonicController/VS_XG270QG_Controller.cpp @@ -86,10 +86,10 @@ void VS_XG270QG_Controller::SendModeComplete data[0x0D] = 0x0A; // Might be speed related // original data packets are 0x40=64 long - SendCommand(0, data, 0x20); + SendCommand(data, 0x20); } -void VS_XG270QG_Controller::SendCommand(uint16_t wIndex, uint8_t *data, size_t length) +void VS_XG270QG_Controller::SendCommand(uint8_t *data, size_t length) { hid_send_feature_report(dev, data, length); } diff --git a/Controllers/ViewSonicController/VS_XG270QG_Controller.h b/Controllers/ViewSonicController/VS_XG270QG_Controller.h index 9003ad91..c7f78d41 100644 --- a/Controllers/ViewSonicController/VS_XG270QG_Controller.h +++ b/Controllers/ViewSonicController/VS_XG270QG_Controller.h @@ -54,5 +54,5 @@ private: uint8_t mode1, uint8_t r1, uint8_t g1, uint8_t b1, uint8_t mode2, uint8_t r2, uint8_t g2, uint8_t b2 ); - void SendCommand(uint16_t wIndex, uint8_t *config, size_t length); + void SendCommand(uint8_t *config, size_t length); }; diff --git a/Controllers/WootingKeyboardController/WootingTwoKeyboardController.cpp b/Controllers/WootingKeyboardController/WootingTwoKeyboardController.cpp index 82d2f786..16cab360 100644 --- a/Controllers/WootingKeyboardController/WootingTwoKeyboardController.cpp +++ b/Controllers/WootingKeyboardController/WootingTwoKeyboardController.cpp @@ -77,7 +77,7 @@ void WootingTwoKeyboardController::SendDirect(RGBColor* colors, uint8_t color_co rgb_buffer[buffer_index+1] = color16 >> 8; } - uint8_t result = wooting_usb_send_buffer(RGB_PARTS::PART0, rgb_buffer); + wooting_usb_send_buffer(RGB_PARTS::PART0, rgb_buffer); } void WootingTwoKeyboardController::SendInitialize() diff --git a/Controllers/ZETKeyboardController/RGBController_ZETBladeOptical.cpp b/Controllers/ZETKeyboardController/RGBController_ZETBladeOptical.cpp index 0bd0a4c1..284716a3 100644 --- a/Controllers/ZETKeyboardController/RGBController_ZETBladeOptical.cpp +++ b/Controllers/ZETKeyboardController/RGBController_ZETBladeOptical.cpp @@ -495,22 +495,22 @@ void RGBController_ZETBladeOptical::ResizeZone(int /*zone*/, int /*new_size*/) void RGBController_ZETBladeOptical::DeviceUpdateLEDs() { - UpdateSingleLED(-1); + last_update_time = std::chrono::steady_clock::now(); + + if(active_mode == 0) + { + controller->SetLEDDirect(colors, modes[active_mode].brightness); + } } void RGBController_ZETBladeOptical::UpdateZoneLEDs(int /*zone*/) { - UpdateSingleLED(-1); + DeviceUpdateLEDs(); } -void RGBController_ZETBladeOptical::UpdateSingleLED(int led) +void RGBController_ZETBladeOptical::UpdateSingleLED(int /*led*/) { - last_update_time = std::chrono::steady_clock::now(); - - if (active_mode == 0) - { - controller->SetLEDDirect(colors, modes[active_mode].brightness, led); - } + DeviceUpdateLEDs(); } void RGBController_ZETBladeOptical::SetCustomMode() diff --git a/Controllers/ZETKeyboardController/ZETBladeOpticalController.cpp b/Controllers/ZETKeyboardController/ZETBladeOpticalController.cpp index 4262d695..c8620386 100644 --- a/Controllers/ZETKeyboardController/ZETBladeOpticalController.cpp +++ b/Controllers/ZETKeyboardController/ZETBladeOpticalController.cpp @@ -78,7 +78,7 @@ void ZETBladeOpticalController::PrepareHeader(unsigned char* packet, unsigned ch packet[0x08] = color; // Separator FF or Color, 0-7 (0-6 in static color mode) (Rainbow,) R, G, B, Y, M, C, W } -void ZETBladeOpticalController::SetLEDDirect(const std::vector& colors, unsigned char brightness, int led) +void ZETBladeOpticalController::SetLEDDirect(const std::vector& colors, unsigned char brightness) { unsigned char buf[65]; @@ -103,17 +103,17 @@ void ZETBladeOpticalController::SetLEDDirect(const std::vector& colors | Continue filling and sending packets while color data | | remains | \*-----------------------------------------------------*/ - while (color_idx < colors.size()) + while(color_idx < colors.size()) { /*-------------------------------------------------*\ | If at a skipped index, increment skipped count | | and index | \*-------------------------------------------------*/ - if (*skip_idx == color_idx + skipped) + if(*skip_idx == color_idx + skipped) { skip_idx++; - if (skip_idx >= SKIP_INDICES + sizeof(SKIP_INDICES) / sizeof(unsigned int)) + if(skip_idx >= SKIP_INDICES + sizeof(SKIP_INDICES) / sizeof(unsigned int)) { skip_idx = SKIP_INDICES; } @@ -145,13 +145,13 @@ void ZETBladeOpticalController::SetLEDDirect(const std::vector& colors | If all colors have been filled into the buffer, | | send the packet | \*-------------------------------------------------*/ - if ((buf_idx + ZET_BLADE_OPTICAL_HEADER_LEN >= sizeof(buf)) || last_color) + if((buf_idx + ZET_BLADE_OPTICAL_HEADER_LEN >= sizeof(buf)) || last_color) { /*---------------------------------------------*\ | If we still have place for an | | ending sequence - squeeze it in! | \*---------------------------------------------*/ - if (last_color && (buf_idx + ZET_BLADE_OPTICAL_COLOR_LEN < sizeof(buf))) + if(last_color && (buf_idx + ZET_BLADE_OPTICAL_COLOR_LEN < sizeof(buf))) { buf[buf_idx] = 0xFF; ending_flag = true; @@ -166,7 +166,7 @@ void ZETBladeOpticalController::SetLEDDirect(const std::vector& colors | Wait for the poor slowpoke to process packet | \*---------------------------------------------*/ std::this_thread::sleep_for(ZET_BLADE_OPTICAL_DELAY); - + /*---------------------------------------------*\ | Zero out buffer, reset index, prepare header | \*---------------------------------------------*/ @@ -184,7 +184,7 @@ void ZETBladeOpticalController::SetLEDDirect(const std::vector& colors /*---------------------------------------------*\ | If there's anything left to send - send it | \*---------------------------------------------*/ - if (!ending_flag) + if(!ending_flag) { buf[buf_idx] = 0xFF; hid_write(dev, buf, sizeof(buf)); @@ -208,7 +208,7 @@ unsigned char ZETBladeOpticalController::RGBToPalette(unsigned char red, \*------------------------*/ unsigned char color_mask = ((blu > 127) << 2 & 4) | ((grn > 127) << 1 & 2) | ((red > 127) & 1); - switch (color_mask) // (Rainbow/Off,) R, G, B, Y, M, C, W + switch(color_mask) // (Rainbow/Off,) R, G, B, Y, M, C, W { case 3: return 4; @@ -235,9 +235,11 @@ void ZETBladeOpticalController::SetEffect(unsigned char mode, effect_mode = mode; custom_mode = (effect_mode == ZET_BLADE_OPTICAL_MODE_CUSTOM); - if (custom_mode) return; + if(custom_mode) + { + return; + } - unsigned char color = RGBToPalette(red, grn, blu); unsigned char buf[65]; diff --git a/Controllers/ZETKeyboardController/ZETBladeOpticalController.h b/Controllers/ZETKeyboardController/ZETBladeOpticalController.h index 32761614..c4743d9a 100644 --- a/Controllers/ZETKeyboardController/ZETBladeOpticalController.h +++ b/Controllers/ZETKeyboardController/ZETBladeOpticalController.h @@ -55,7 +55,7 @@ public: std::string GetDeviceLocation(); std::string GetSerialString(); - void SetLEDDirect(const std::vector& colors, unsigned char brightness, int led); + void SetLEDDirect(const std::vector& colors, unsigned char brightness); void SetEffect(unsigned char mode, unsigned char speed, unsigned char brightness, bool random, unsigned char red1, unsigned char grn1, unsigned char blu1); private: