mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-07-08 04:14:50 -04:00
Minor cleanups and warning fixes
This commit is contained in:
@@ -238,7 +238,6 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int led_count = 0;
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LEDs |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -268,8 +267,6 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
\*---------------------------------------------------------*/
|
||||
leds.push_back(*new_led);
|
||||
|
||||
led_count++;
|
||||
|
||||
if(zone_idx == POLYCHROME_V2_ZONE_ADDRESSABLE)
|
||||
{
|
||||
break;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
| (Castor3 USB HID controller) |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <hidapi.h>
|
||||
@@ -16,7 +16,7 @@
|
||||
#define GIGABYTE_CASTOR3_VID 0x0414
|
||||
#define GIGABYTE_CASTOR3_PID 0x7A5E
|
||||
|
||||
void DetectGigabyteCastor3Controllers(hid_device_info* info, const std::string& name)
|
||||
void DetectGigabyteCastor3Controllers(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
@@ -24,16 +24,9 @@ void DetectGigabyteCastor3Controllers(hid_device_info* info, const std::string&
|
||||
{
|
||||
GigabyteCastor3Controller* controller = new GigabyteCastor3Controller(dev, info->path);
|
||||
RGBController_GigabyteCastor3* rgb_controller = new RGBController_GigabyteCastor3(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Gigabyte Aorus Waterforce X II 360",
|
||||
DetectGigabyteCastor3Controllers,
|
||||
GIGABYTE_CASTOR3_VID,
|
||||
GIGABYTE_CASTOR3_PID,
|
||||
0, /* interface 0 */
|
||||
0x0000, /* usage_page */
|
||||
0x0002); /* usage */
|
||||
REGISTER_HID_DETECTOR_IPU("Gigabyte Aorus Waterforce X II 360", DetectGigabyteCastor3Controllers, GIGABYTE_CASTOR3_VID, GIGABYTE_CASTOR3_PID, 0, 0x0000, 0x0002);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "QMKKeychronController.h"
|
||||
#include "RGBController_QMKKeychron.h"
|
||||
|
||||
void DetectQMKKeychronControllers(hid_device_info *info, const std::string&)
|
||||
void DetectQMKKeychronControllers(hid_device_info *info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device *dev = hid_open_path(info->path);
|
||||
|
||||
|
||||
@@ -261,7 +261,6 @@ void RGBController_RealtekBridge::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_RealtekBridge::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
unsigned char speed = REALTEK_BRIDGE_SPEED_NORMAL;
|
||||
unsigned char dir = 0;
|
||||
unsigned short brightness = 0xFF;
|
||||
mode& curr_mode = modes[active_mode];
|
||||
std::vector<RGBColor> rtk_colors = curr_mode.colors;
|
||||
@@ -274,13 +273,6 @@ void RGBController_RealtekBridge::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
brightness = curr_mode.brightness;
|
||||
}
|
||||
if(curr_mode.flags & MODE_FLAG_HAS_DIRECTION_LR)
|
||||
{
|
||||
if(curr_mode.direction == MODE_DIRECTION_RIGHT)
|
||||
{
|
||||
dir = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(curr_mode.color_mode == MODE_COLORS_PER_LED)
|
||||
{
|
||||
|
||||
@@ -98,7 +98,6 @@ void ZETBladeOpticalController::SetLEDDirect(const std::vector<RGBColor>& colors
|
||||
\*-----------------------------------------------------*/
|
||||
size_t buf_idx = ZET_BLADE_OPTICAL_HEADER_LEN;
|
||||
size_t color_idx = 0;
|
||||
size_t packets_sent = 0;
|
||||
size_t skipped = 0;
|
||||
const unsigned int* skip_idx = &SKIP_INDICES[0];
|
||||
bool last_color = false;
|
||||
@@ -178,11 +177,6 @@ void ZETBladeOpticalController::SetLEDDirect(const std::vector<RGBColor>& colors
|
||||
memset(buf, 0x00, sizeof(buf));
|
||||
buf_idx = ZET_BLADE_OPTICAL_HEADER_LEN;
|
||||
PrepareHeader(buf, brightness);
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Increment packet counter |
|
||||
\*---------------------------------------------*/
|
||||
packets_sent++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user