Fix warnings
This commit is contained in:
parent
755ce20794
commit
be90537d10
12 changed files with 44 additions and 44 deletions
|
|
@ -262,12 +262,12 @@ void RGBController_AMDWraithPrism::DeviceUpdateLEDs()
|
|||
}
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AMDWraithPrism::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::UpdateSingleLED(int led)
|
||||
void RGBController_AMDWraithPrism::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ std::string AuraTUFKeyboardController::GetVersion()
|
|||
{
|
||||
snprintf(version, 9, "%02X.%02X.%02X", usb_buf_out[5], usb_buf_out[6], usb_buf_out[7]);
|
||||
}
|
||||
|
||||
|
||||
return std::string(version);
|
||||
}
|
||||
else
|
||||
|
|
@ -111,7 +111,7 @@ std::string AuraTUFKeyboardController::GetVersion()
|
|||
|
||||
char version[9];
|
||||
snprintf(version, 9, "%02X.%02X.%02X", usb_buf_out[8], usb_buf_out[9], usb_buf_out[10]);
|
||||
|
||||
|
||||
return std::string(version);
|
||||
}
|
||||
}
|
||||
|
|
@ -137,12 +137,12 @@ int AuraTUFKeyboardController::GetLayout()
|
|||
}
|
||||
else
|
||||
{
|
||||
char layout[] = "";
|
||||
|
||||
char layout[4];
|
||||
|
||||
sprintf(layout, "%X", version);
|
||||
|
||||
int layoutnum = std::stoi(std::string(layout, 1));
|
||||
|
||||
|
||||
switch(layoutnum)
|
||||
{
|
||||
case 1:
|
||||
|
|
@ -276,14 +276,14 @@ void AuraTUFKeyboardController::UpdateLeds
|
|||
usb_buf[3] = leds;
|
||||
usb_buf[4] = 0x00;
|
||||
|
||||
for(unsigned int j = 0; j < leds; j++)
|
||||
for(int j = 0; j < leds; j++)
|
||||
{
|
||||
usb_buf[j * 4 + 5] = colors[i * 15 + j].value;
|
||||
usb_buf[j * 4 + 6] = RGBGetRValue(colors[i * 15 + j].color);
|
||||
usb_buf[j * 4 + 7] = RGBGetGValue(colors[i * 15 + j].color);
|
||||
usb_buf[j * 4 + 8] = RGBGetBValue(colors[i * 15 + j].color);
|
||||
}
|
||||
|
||||
|
||||
ClearResponses();
|
||||
|
||||
hid_write(dev, usb_buf, 65);
|
||||
|
|
@ -352,7 +352,7 @@ void AuraTUFKeyboardController::UpdateDevice
|
|||
usb_buf[12 + i * 3] = RGBGetBValue(colors[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ RGBController_AuraTUFKeyboard::RGBController_AuraTUFKeyboard(AuraTUFKeyboardCont
|
|||
|
||||
pid = controller->device_pid;
|
||||
|
||||
if(pid != AURA_ROG_CLAYMORE_PID)
|
||||
if(pid != AURA_ROG_CLAYMORE_PID)
|
||||
{
|
||||
name = "ASUS Aura Keyboard";
|
||||
vendor = "ASUS";
|
||||
|
|
@ -398,7 +398,7 @@ void RGBController_AuraTUFKeyboard::SetupZones()
|
|||
keyboard_zone.matrix_map->map = keyboard[layout].matrix_map;
|
||||
zones.push_back(keyboard_zone);
|
||||
|
||||
for(unsigned int led_id = 0; led_id < keyboard[layout].size; led_id++)
|
||||
for(int led_id = 0; led_id < keyboard[layout].size; led_id++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = keyboard[layout].led_names[led_id].name;
|
||||
|
|
@ -423,7 +423,7 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateLEDs()
|
|||
{
|
||||
std::vector<led_color> led_color_list = {};
|
||||
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
for(unsigned int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
led_color_list.push_back({ leds[i].value, colors[i] });
|
||||
}
|
||||
|
|
@ -448,13 +448,13 @@ void RGBController_AuraTUFKeyboard::UpdateSingleLED(int led)
|
|||
|
||||
static const uint8_t direction_map[2][6] =
|
||||
{
|
||||
{ 4, 0, 6, 2, 8, 1 }, // Default directions Left, Right, Up, Down, Horizontal, Vertical
|
||||
{ 4, 0, 6, 2, 8, 1 }, // Default directions Left, Right, Up, Down, Horizontal, Vertical
|
||||
{ 0, 4, 6, 2, 0xFF, 0xFF }, // AURA_ROG_CLAYMORE directions Left, Right, Up, Down
|
||||
};
|
||||
|
||||
void RGBController_AuraTUFKeyboard::DeviceUpdateMode()
|
||||
{
|
||||
if(pid == AURA_ROG_CLAYMORE_PID)
|
||||
if(pid == AURA_ROG_CLAYMORE_PID)
|
||||
{
|
||||
controller->AllowRemoteControl(1);
|
||||
}
|
||||
|
|
@ -468,7 +468,7 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateMode()
|
|||
if(pid == AURA_ROG_CLAYMORE_PID) controller->AllowRemoteControl(3);
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
if(pid != AURA_ROG_CLAYMORE_PID)
|
||||
{
|
||||
brightness = modes[active_mode].brightness * 25;
|
||||
|
|
@ -521,7 +521,7 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateMode()
|
|||
|
||||
controller->UpdateDevice(modes[active_mode].value, std::vector<RGBColor>(modes[active_mode].colors), direction, color_mode, modes[active_mode].speed, brightness);
|
||||
|
||||
if(pid == AURA_ROG_CLAYMORE_PID)
|
||||
if(pid == AURA_ROG_CLAYMORE_PID)
|
||||
{
|
||||
controller->UpdateMode(modes[active_mode].value);
|
||||
controller->SaveMode();
|
||||
|
|
@ -534,7 +534,7 @@ void RGBController_AuraTUFKeyboard::DeviceSaveMode()
|
|||
/*----------------------------------------------------------*\
|
||||
| not available for Claymore |
|
||||
\*----------------------------------------------------------*/
|
||||
if(pid != AURA_ROG_CLAYMORE_PID)
|
||||
if(pid != AURA_ROG_CLAYMORE_PID)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
controller->SaveMode();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ std::string AsusCerberusKeyboardController::GetSerialString()
|
|||
|
||||
std::string AsusCerberusKeyboardController::GetVersion()
|
||||
{
|
||||
char versionstr[] = "";
|
||||
char versionstr[5];
|
||||
snprintf(versionstr, 3, "%X", version);
|
||||
return(std::string(versionstr, 3));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ void RGBController_AsusCerberusKeyboard::SetupZones()
|
|||
keyboard.matrix_map->map = *matrix_map;
|
||||
zones.push_back(keyboard);
|
||||
|
||||
for(unsigned int led_id = 0; led_id < zone_size; led_id++)
|
||||
for(int led_id = 0; led_id < zone_size; led_id++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_id].name;
|
||||
|
|
@ -320,7 +320,7 @@ void RGBController_AsusCerberusKeyboard::ResizeZone(int /*zone*/, int /*new_size
|
|||
|
||||
void RGBController_AsusCerberusKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
for(unsigned int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
uint8_t red = RGBGetRValue(colors[i]);
|
||||
uint8_t green = RGBGetGValue(colors[i]);
|
||||
|
|
|
|||
|
|
@ -188,12 +188,12 @@ void RGBController_IntelArcA770LE::DeviceUpdateLEDs()
|
|||
}
|
||||
}
|
||||
|
||||
void RGBController_IntelArcA770LE::UpdateZoneLEDs(int zone)
|
||||
void RGBController_IntelArcA770LE::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_IntelArcA770LE::UpdateSingleLED(int led)
|
||||
void RGBController_IntelArcA770LE::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,13 +69,14 @@ RGBController_LenovoUSB::RGBController_LenovoUSB(LenovoUSBController* controller
|
|||
}
|
||||
|
||||
std::vector<uint8_t> response;
|
||||
|
||||
/*-----------------------*\
|
||||
|Default to ANSI keyboard |
|
||||
\*-----------------------*/
|
||||
keyboard_type = ANSI;
|
||||
|
||||
switch(controller->getPid())
|
||||
{
|
||||
/*-----------------------*\
|
||||
|Default to ANSI keyboard |
|
||||
\*-----------------------*/
|
||||
keyboard_type = ANSI;
|
||||
|
||||
case LEGION_Y740:
|
||||
response = controller->getInformation(0x01);
|
||||
if(response.size() > 4 && response[4] <= 100)
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void RGBController_RoccatVulcanAimo::SetupZones()
|
|||
keyboard_zone.matrix_map->map = RoccatVulcanLayouts[layout].matrix_map;
|
||||
zones.push_back(keyboard_zone);
|
||||
|
||||
for(unsigned int led_id = 0; led_id < RoccatVulcanLayouts[layout].size; led_id++)
|
||||
for(int led_id = 0; led_id < RoccatVulcanLayouts[layout].size; led_id++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = RoccatVulcanLayouts[layout].led_names[led_id].name;
|
||||
|
|
@ -129,7 +129,7 @@ void RGBController_RoccatVulcanAimo::DeviceUpdateLEDs()
|
|||
{
|
||||
std::vector<led_color> led_color_list = {};
|
||||
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
for(unsigned int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
led_color_list.push_back({ leds[i].value, colors[i] });
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ void RGBController_RoccatVulcanAimo::DeviceUpdateMode()
|
|||
|
||||
if(modes[active_mode].value == ROCCAT_VULCAN_MODE_STATIC)
|
||||
{
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
for(unsigned int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
led_color_list.push_back({ leds[i].value, colors[i] });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ void RoccatVulcanAimoController::SendColors(std::vector<led_color> colors)
|
|||
bufs[0][3] = 0x01;
|
||||
bufs[0][4] = 0xB4;
|
||||
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
for(unsigned int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
int coloumn = floor(colors[i].value / 12);
|
||||
int row = colors[i].value % 12;
|
||||
|
|
@ -127,7 +127,7 @@ void RoccatVulcanAimoController::SendMode(unsigned int mode, unsigned int speed,
|
|||
if(mode == ROCCAT_VULCAN_MODE_STATIC)
|
||||
{
|
||||
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
for(unsigned int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
int coloumn = floor(colors[i].value / 12);
|
||||
int row = colors[i].value % 12;
|
||||
|
|
|
|||
|
|
@ -395,15 +395,14 @@ void DetectSinowealthGenesisKeyboard(hid_device_info* info, const std::string& n
|
|||
hid_device* dev = hid_open_path(info->path);
|
||||
if(dev)
|
||||
{
|
||||
RGBController *rgb_controller;
|
||||
|
||||
if(pid == GENESIS_THOR_300_PID)
|
||||
{
|
||||
SinowealthKeyboard90Controller* controller = new SinowealthKeyboard90Controller(dev, info->path, pid);
|
||||
rgb_controller = new RGBController_SinowealthKeyboard90(controller);
|
||||
SinowealthKeyboard90Controller* controller = new SinowealthKeyboard90Controller(dev, info->path, pid);
|
||||
RGBController_SinowealthKeyboard90* rgb_controller = new RGBController_SinowealthKeyboard90(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
rgb_controller->name = name;
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ void SteelSeriesApex8ZoneController::SetColor(std::vector<RGBColor> colors, uint
|
|||
|
||||
buffer[1] += mode;
|
||||
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
for(unsigned int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
uint8_t index = i * 3;
|
||||
|
||||
|
|
|
|||
8
cli.cpp
8
cli.cpp
|
|
@ -573,7 +573,7 @@ bool OptionDevice(std::vector<DeviceOptions>* current_devices, std::string argum
|
|||
{
|
||||
if(argument.length() > 1)
|
||||
{
|
||||
for(int i = 0; i < rgb_controllers.size(); i++)
|
||||
for(unsigned int i = 0; i < rgb_controllers.size(); i++)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| If the argument is not a number then check all the |
|
||||
|
|
@ -640,7 +640,7 @@ bool OptionZone(std::vector<DeviceOptions>* current_devices, std::string argumen
|
|||
return found;
|
||||
}
|
||||
|
||||
bool OptionColor(std::vector<DeviceOptions>* current_devices, std::string argument, Options* options)
|
||||
bool OptionColor(std::vector<DeviceOptions>* current_devices, std::string argument, Options* /*options*/)
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
|
|
@ -663,7 +663,7 @@ bool OptionColor(std::vector<DeviceOptions>* current_devices, std::string argume
|
|||
return found;
|
||||
}
|
||||
|
||||
bool OptionMode(std::vector<DeviceOptions>* current_devices, std::string argument, Options* options)
|
||||
bool OptionMode(std::vector<DeviceOptions>* current_devices, std::string argument, Options* /*options*/)
|
||||
{
|
||||
if(argument.size() == 0)
|
||||
{
|
||||
|
|
@ -685,7 +685,7 @@ bool OptionMode(std::vector<DeviceOptions>* current_devices, std::string argumen
|
|||
return found;
|
||||
}
|
||||
|
||||
bool OptionBrightness(std::vector<DeviceOptions>* current_devices, std::string argument, Options* options)
|
||||
bool OptionBrightness(std::vector<DeviceOptions>* current_devices, std::string argument, Options* /*options*/)
|
||||
{
|
||||
if(argument.size() == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue