Remove SetCustomMode from all controllers beginning with the letter S
This commit is contained in:
parent
66c856f49a
commit
126e5f4341
38 changed files with 129 additions and 283 deletions
|
|
@ -146,11 +146,6 @@ void RGBController_SRGBmodsPico::UpdateSingleLED(int led)
|
|||
controller->SetChannelLEDs(channel, zones[channel].colors, zones[channel].leds_count);
|
||||
}
|
||||
|
||||
void RGBController_SRGBmodsPico::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SRGBmodsPico::DeviceUpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
|
|
|
|||
|
|
@ -21,14 +21,12 @@ public:
|
|||
~RGBController_SRGBmodsPico();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -145,11 +145,6 @@ void RGBController_SapphireNitroGlowV1::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SapphireNitroGlowV1::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SapphireNitroGlowV1::DeviceUpdateMode()
|
||||
{
|
||||
controller->SetMode((unsigned char)modes[(unsigned int)active_mode].value);
|
||||
|
|
|
|||
|
|
@ -19,14 +19,12 @@ public:
|
|||
~RGBController_SapphireNitroGlowV1();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -196,11 +196,6 @@ void RGBController_SapphireNitroGlowV3::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SapphireNitroGlowV3::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SapphireNitroGlowV3::DeviceUpdateMode()
|
||||
{
|
||||
auto mode = modes[active_mode];
|
||||
|
|
|
|||
|
|
@ -19,14 +19,12 @@ public:
|
|||
~RGBController_SapphireNitroGlowV3();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_Sinowealth::RGBController_Sinowealth(SinowealthController* sinowealth_ptr)
|
||||
RGBController_Sinowealth::RGBController_Sinowealth(SinowealthController* controller_ptr)
|
||||
{
|
||||
sinowealth = sinowealth_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Sinowealth Device";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "Sinowealth Device";
|
||||
location = sinowealth->GetLocation();
|
||||
serial = sinowealth->GetSerialString();
|
||||
version = sinowealth->GetFirmwareVersion();
|
||||
location = controller->GetLocation();
|
||||
serial = controller->GetSerialString();
|
||||
version = controller->GetFirmwareVersion();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
|
|
@ -137,7 +137,7 @@ RGBController_Sinowealth::RGBController_Sinowealth(SinowealthController* sinowea
|
|||
|
||||
RGBController_Sinowealth::~RGBController_Sinowealth()
|
||||
{
|
||||
delete sinowealth;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_Sinowealth::SetupZones()
|
||||
|
|
@ -148,9 +148,9 @@ void RGBController_Sinowealth::SetupZones()
|
|||
zone new_zone;
|
||||
new_zone.name = "Mouse";
|
||||
new_zone.type = ZONE_TYPE_SINGLE;
|
||||
new_zone.leds_min = sinowealth->GetLEDCount();
|
||||
new_zone.leds_max = sinowealth->GetLEDCount();
|
||||
new_zone.leds_count = sinowealth->GetLEDCount();
|
||||
new_zone.leds_min = controller->GetLEDCount();
|
||||
new_zone.leds_max = controller->GetLEDCount();
|
||||
new_zone.leds_count = controller->GetLEDCount();
|
||||
new_zone.matrix_map = NULL;
|
||||
zones.push_back(new_zone);
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ void RGBController_Sinowealth::ResizeZone(int /*zone*/, int /*new_size*/)
|
|||
|
||||
void RGBController_Sinowealth::DeviceUpdateLEDs()
|
||||
{
|
||||
sinowealth->SetLEDColor(&colors[0]);
|
||||
controller->SetLEDColor(&colors[0]);
|
||||
}
|
||||
|
||||
void RGBController_Sinowealth::UpdateZoneLEDs(int /*zone*/)
|
||||
|
|
@ -188,14 +188,8 @@ void RGBController_Sinowealth::UpdateSingleLED(int /*led*/)
|
|||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
void RGBController_Sinowealth::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
|
||||
void RGBController_Sinowealth::DeviceUpdateMode()
|
||||
|
||||
{
|
||||
unsigned int direction = 0;
|
||||
unsigned int speed = GLORIOUS_SPEED_NORMAL;
|
||||
|
|
@ -237,13 +231,12 @@ void RGBController_Sinowealth::DeviceUpdateMode()
|
|||
|
||||
if (modes[active_mode].color_mode == MODE_COLORS_NONE)
|
||||
{
|
||||
sinowealth->SetMode(modes[active_mode].value, speed, direction, 0);
|
||||
controller->SetMode(modes[active_mode].value, speed, direction, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
sinowealth->SetMode(modes[active_mode].value, speed, direction, &modes[active_mode].colors[0]);
|
||||
controller->SetMode(modes[active_mode].value, speed, direction, &modes[active_mode].colors[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
//wave, epilepsy, spectrum cycle, tail, glorious mode, off
|
||||
|
||||
|
|
|
|||
|
|
@ -15,22 +15,19 @@
|
|||
class RGBController_Sinowealth : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_Sinowealth(SinowealthController* sinowealth_ptr);
|
||||
RGBController_Sinowealth(SinowealthController* controller_ptr);
|
||||
~RGBController_Sinowealth();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
private:
|
||||
SinowealthController* sinowealth;
|
||||
SinowealthController* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ static const char *led_names[] =
|
|||
|
||||
RGBController_Sinowealth1007::RGBController_Sinowealth1007(SinowealthController1007* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "ZET Fury Pro Mouse Device";
|
||||
vendor = "ZET";
|
||||
|
|
@ -227,13 +227,7 @@ void RGBController_Sinowealth1007::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_Sinowealth1007::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_Sinowealth1007::DeviceUpdateMode()
|
||||
|
||||
{
|
||||
unsigned char random = (modes[active_mode].flags & MODE_FLAG_HAS_RANDOM_COLOR) ? ZET_FURY_PRO_SUBMODE_SET_COLOR : 0x00;
|
||||
random = (modes[active_mode].color_mode == MODE_COLORS_RANDOM) ? ZET_FURY_PRO_SUBMODE_RANDOM : random;
|
||||
|
|
|
|||
|
|
@ -19,15 +19,12 @@ public:
|
|||
~RGBController_Sinowealth1007();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -183,22 +183,8 @@ void RGBController_GMOW::UpdateSingleLED(int led)
|
|||
|
||||
}
|
||||
|
||||
void RGBController_GMOW::SetCustomMode()
|
||||
{
|
||||
active_mode = GMOW_MODE_STATIC;
|
||||
}
|
||||
void RGBController_GMOW::SetMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_GMOW::DeviceUpdateMode()
|
||||
{
|
||||
mode curr = modes[active_mode];
|
||||
controller->SetMode(active_mode, curr.speed,curr.brightness, curr.brightness, curr.colors.data(), curr.colors.size());
|
||||
}
|
||||
|
||||
void RGBController_GMOW::DeviceSaveMode()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -19,13 +19,12 @@ public:
|
|||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void SetCustomMode();
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void SetMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
SinowealthGMOWController* controller;
|
||||
|
|
|
|||
|
|
@ -129,15 +129,15 @@ static const char *led_names_tkl[] =
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SinowealthKeyboard::RGBController_SinowealthKeyboard(SinowealthKeyboardController* sinowealth_ptr)
|
||||
RGBController_SinowealthKeyboard::RGBController_SinowealthKeyboard(SinowealthKeyboardController* controller_ptr)
|
||||
{
|
||||
sinowealth = sinowealth_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Sinowealth Keyboard";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Sinowealth Keyboard";
|
||||
location = sinowealth->GetLocation();
|
||||
serial = sinowealth->GetSerialString();
|
||||
location = controller->GetLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
|
|
@ -406,7 +406,7 @@ RGBController_SinowealthKeyboard::RGBController_SinowealthKeyboard(SinowealthKey
|
|||
|
||||
RGBController_SinowealthKeyboard::~RGBController_SinowealthKeyboard()
|
||||
{
|
||||
delete sinowealth;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_SinowealthKeyboard::SetupZones()
|
||||
|
|
@ -450,7 +450,7 @@ void RGBController_SinowealthKeyboard::ResizeZone(int /*zone*/, int /*new_size*/
|
|||
|
||||
void RGBController_SinowealthKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
sinowealth->SetLEDsDirect(colors);
|
||||
controller->SetLEDsDirect(colors);
|
||||
}
|
||||
|
||||
void RGBController_SinowealthKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
|
|
@ -463,11 +463,6 @@ void RGBController_SinowealthKeyboard::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SinowealthKeyboard::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SinowealthKeyboard::DeviceUpdateMode()
|
||||
{
|
||||
unsigned int brightness = BRIGHTNESS_FULL;
|
||||
|
|
@ -475,10 +470,10 @@ void RGBController_SinowealthKeyboard::DeviceUpdateMode()
|
|||
|
||||
if(modes[active_mode].value == MODE_STATIC)
|
||||
{
|
||||
sinowealth->SetStaticColor(selected_color);
|
||||
controller->SetStaticColor(selected_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
sinowealth->SetMode(modes[active_mode].value, brightness, modes[active_mode].speed, modes[active_mode].color_mode);
|
||||
controller->SetMode(modes[active_mode].value, brightness, modes[active_mode].speed, modes[active_mode].color_mode);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,21 +16,18 @@
|
|||
class RGBController_SinowealthKeyboard : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SinowealthKeyboard(SinowealthKeyboardController* sinowealth_ptr);
|
||||
RGBController_SinowealthKeyboard(SinowealthKeyboardController* controller_ptr);
|
||||
~RGBController_SinowealthKeyboard();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
SinowealthKeyboardController* sinowealth;
|
||||
SinowealthKeyboardController* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -180,18 +180,18 @@ static const char *led_names_tkl[] =
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SinowealthKeyboard16::RGBController_SinowealthKeyboard16(SinowealthKeyboard16Controller* sinowealth_ptr)
|
||||
RGBController_SinowealthKeyboard16::RGBController_SinowealthKeyboard16(SinowealthKeyboard16Controller* controller_ptr)
|
||||
{
|
||||
sinowealth = sinowealth_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Sinowealth Keyboard";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "Generic Sinowealth Keyboard";
|
||||
location = sinowealth->GetLocation();
|
||||
serial = sinowealth->GetSerialString();
|
||||
location = controller->GetLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
std::vector<ModeCfg> modes_cfg = sinowealth->GetDeviceModes();
|
||||
std::vector<ModeColorCfg> color_presets = sinowealth->GetDeviceColors();
|
||||
std::vector<ModeCfg> modes_cfg = controller->GetDeviceModes();
|
||||
std::vector<ModeColorCfg> color_presets = controller->GetDeviceColors();
|
||||
|
||||
int mode_id = 0;
|
||||
|
||||
|
|
@ -250,12 +250,12 @@ RGBController_SinowealthKeyboard16::RGBController_SinowealthKeyboard16(Sinowealt
|
|||
|
||||
SetupZones();
|
||||
|
||||
int device_mode = sinowealth->GetCurrentMode();
|
||||
int device_mode = controller->GetCurrentMode();
|
||||
|
||||
if(device_mode >= MODE_PER_KEY1)
|
||||
{
|
||||
device_mode = mode_id+(device_mode & 0x0F);
|
||||
colors = sinowealth->GetPerLedColors();
|
||||
colors = controller->GetPerLedColors();
|
||||
}
|
||||
|
||||
active_mode = device_mode;
|
||||
|
|
@ -263,7 +263,7 @@ RGBController_SinowealthKeyboard16::RGBController_SinowealthKeyboard16(Sinowealt
|
|||
|
||||
RGBController_SinowealthKeyboard16::~RGBController_SinowealthKeyboard16()
|
||||
{
|
||||
delete sinowealth;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
mode RGBController_SinowealthKeyboard16::getModeItem(unsigned int mode_id)
|
||||
|
|
@ -374,7 +374,7 @@ void RGBController_SinowealthKeyboard16::SetupZones()
|
|||
|
||||
new_zone.name = ZONE_EN_KEYBOARD;
|
||||
new_zone.type = ZONE_TYPE_MATRIX;
|
||||
new_zone.leds_count = sinowealth->GetLEDCount();
|
||||
new_zone.leds_count = controller->GetLEDCount();
|
||||
new_zone.leds_min = new_zone.leds_count;
|
||||
new_zone.leds_max = new_zone.leds_count;
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
|
|
@ -406,7 +406,7 @@ void RGBController_SinowealthKeyboard16::ResizeZone(int /*zone*/, int /*new_size
|
|||
|
||||
void RGBController_SinowealthKeyboard16::DeviceUpdateLEDs()
|
||||
{
|
||||
sinowealth->SetLEDsDirect(colors);
|
||||
controller->SetLEDsDirect(colors);
|
||||
}
|
||||
|
||||
void RGBController_SinowealthKeyboard16::UpdateZoneLEDs(int /*zone*/)
|
||||
|
|
@ -419,21 +419,6 @@ void RGBController_SinowealthKeyboard16::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SinowealthKeyboard16::SetCustomMode()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Search the mode list and find Custom mode |
|
||||
\*---------------------------------------------------------*/
|
||||
for(unsigned int mode_idx = 0; mode_idx < modes.size(); mode_idx++)
|
||||
{
|
||||
if(modes[mode_idx].name == "Custom")
|
||||
{
|
||||
active_mode = mode_idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_SinowealthKeyboard16::DeviceUpdateMode()
|
||||
{
|
||||
mode ActiveMode = modes[active_mode];
|
||||
|
|
@ -449,18 +434,18 @@ void RGBController_SinowealthKeyboard16::DeviceUpdateMode()
|
|||
color_mode = COLOR_PRESET_RANDOM;
|
||||
}
|
||||
|
||||
sinowealth->ClearMode();
|
||||
controller->ClearMode();
|
||||
|
||||
if(ActiveMode.colors.size())
|
||||
{
|
||||
sinowealth->SetColorsForMode(ActiveMode.value, &ActiveMode.colors[0]);
|
||||
controller->SetColorsForMode(ActiveMode.value, &ActiveMode.colors[0]);
|
||||
}
|
||||
|
||||
sinowealth->SetMode(ActiveMode.value, ActiveMode.brightness, ActiveMode.speed, ActiveMode.direction, color_mode);
|
||||
controller->SetMode(ActiveMode.value, ActiveMode.brightness, ActiveMode.speed, ActiveMode.direction, color_mode);
|
||||
|
||||
if(ActiveMode.value >= MODE_PER_KEY1)
|
||||
{
|
||||
colors = sinowealth->GetPerLedColors();
|
||||
colors = controller->GetPerLedColors();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,23 +19,20 @@
|
|||
class RGBController_SinowealthKeyboard16 : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SinowealthKeyboard16(SinowealthKeyboard16Controller* sinowealth_ptr);
|
||||
RGBController_SinowealthKeyboard16(SinowealthKeyboard16Controller* controller_ptr);
|
||||
~RGBController_SinowealthKeyboard16();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
SinowealthKeyboard16Controller* sinowealth;
|
||||
SinowealthKeyboard16Controller* controller;
|
||||
|
||||
mode getModeItem(unsigned int mode_id);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,16 +21,16 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SonyDS4::RGBController_SonyDS4(SonyDS4Controller* dualshock)
|
||||
RGBController_SonyDS4::RGBController_SonyDS4(SonyDS4Controller* controller_ptr)
|
||||
{
|
||||
this->dualshock = dualshock;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Sony DualShock 4";
|
||||
vendor = "Sony";
|
||||
type = DEVICE_TYPE_GAMEPAD;
|
||||
description = "Sony DualShock 4 Device";
|
||||
location = dualshock->GetLocation();
|
||||
serial = dualshock->GetSerialString();
|
||||
location = controller->GetLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.value = 0;
|
||||
|
|
@ -44,7 +44,7 @@ RGBController_SonyDS4::RGBController_SonyDS4(SonyDS4Controller* dualshock)
|
|||
|
||||
RGBController_SonyDS4::~RGBController_SonyDS4()
|
||||
{
|
||||
delete dualshock;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_SonyDS4::SetupZones()
|
||||
|
|
@ -85,7 +85,7 @@ void RGBController_SonyDS4::DeviceUpdateLEDs()
|
|||
unsigned char red = char(RGBGetRValue(colors[0]));
|
||||
unsigned char green = char(RGBGetGValue(colors[0]));
|
||||
unsigned char blue = char(RGBGetBValue(colors[0]));
|
||||
dualshock->SetColors(red, green, blue);
|
||||
controller->SetColors(red, green, blue);
|
||||
}
|
||||
|
||||
void RGBController_SonyDS4::UpdateZoneLEDs(int /*zone*/)
|
||||
|
|
@ -98,10 +98,6 @@ void RGBController_SonyDS4::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SonyDS4::SetCustomMode()
|
||||
{
|
||||
}
|
||||
|
||||
void RGBController_SonyDS4::DeviceUpdateMode()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,20 +12,18 @@
|
|||
class RGBController_SonyDS4 : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SonyDS4(SonyDS4Controller* dualshock);
|
||||
RGBController_SonyDS4(SonyDS4Controller* controller_ptr);
|
||||
~RGBController_SonyDS4();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
SonyDS4Controller* dualshock;
|
||||
SonyDS4Controller* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
RGBController_SonyDualSense::RGBController_SonyDualSense(SonyDualSenseController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Sony DualSense";
|
||||
name = "Sony DualSense";
|
||||
|
||||
if(controller->IsBluetooth())
|
||||
{
|
||||
|
|
@ -133,11 +133,6 @@ void RGBController_SonyDualSense::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SonyDualSense::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SonyDualSense::DeviceUpdateMode()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,10 +18,11 @@ public:
|
|||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void SetCustomMode();
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -172,18 +172,18 @@ static const char *led_names[] =
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SteelSeriesApex::RGBController_SteelSeriesApex(SteelSeriesApexBaseController* steelseries_ptr)
|
||||
RGBController_SteelSeriesApex::RGBController_SteelSeriesApex(SteelSeriesApexBaseController* controller_ptr)
|
||||
{
|
||||
steelseries = steelseries_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "SteelSeries Apex RGB Keyboard";
|
||||
vendor = "SteelSeries";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "SteelSeries Apex RGB Device";
|
||||
location = steelseries->GetDeviceLocation();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = "";
|
||||
|
||||
proto_type = steelseries->proto_type;
|
||||
proto_type = controller->proto_type;
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
|
@ -193,7 +193,6 @@ RGBController_SteelSeriesApex::RGBController_SteelSeriesApex(SteelSeriesApexBase
|
|||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
|
||||
}
|
||||
|
||||
RGBController_SteelSeriesApex::~RGBController_SteelSeriesApex()
|
||||
|
|
@ -209,7 +208,7 @@ RGBController_SteelSeriesApex::~RGBController_SteelSeriesApex()
|
|||
}
|
||||
}
|
||||
|
||||
delete steelseries;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesApex::SetupZones()
|
||||
|
|
@ -290,7 +289,7 @@ void RGBController_SteelSeriesApex::ResizeZone(int /*zone*/, int /*new_size*/)
|
|||
void RGBController_SteelSeriesApex::DeviceUpdateLEDs()
|
||||
{
|
||||
last_update_time = std::chrono::steady_clock::now();
|
||||
steelseries->SetLEDsDirect(colors);
|
||||
controller->SetLEDsDirect(colors);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesApex::UpdateZoneLEDs(int /*zone*/)
|
||||
|
|
@ -303,13 +302,8 @@ void RGBController_SteelSeriesApex::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesApex::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesApex::DeviceUpdateMode()
|
||||
{
|
||||
std::vector<RGBColor> temp_colors;
|
||||
steelseries->SetMode(modes[active_mode].value, temp_colors);
|
||||
controller->SetMode(modes[active_mode].value, temp_colors);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,23 +17,21 @@
|
|||
class RGBController_SteelSeriesApex : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SteelSeriesApex(SteelSeriesApexBaseController* steelseries_ptr);
|
||||
RGBController_SteelSeriesApex(SteelSeriesApexBaseController* controller_ptr);
|
||||
~RGBController_SteelSeriesApex();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
SteelSeriesApexBaseController* steelseries;
|
||||
steelseries_type proto_type;
|
||||
SteelSeriesApexBaseController* controller;
|
||||
steelseries_type proto_type;
|
||||
|
||||
std::chrono::time_point<std::chrono::steady_clock> last_update_time;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -90,17 +90,11 @@ void RGBController_SteelSeriesApexTZone::UpdateZoneLEDs(int /*zone*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
|
||||
void RGBController_SteelSeriesApexTZone::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesApexTZone::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesApexTZone::DeviceUpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
|
|
|
|||
|
|
@ -16,14 +16,12 @@ public:
|
|||
~RGBController_SteelSeriesApexTZone();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
|
|
|
|||
|
|
@ -98,11 +98,6 @@ void RGBController_SteelSeriesArctis5::UpdateSingleLED(int led)
|
|||
UpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesArctis5::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesArctis5::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,11 @@ public:
|
|||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void SetCustomMode();
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SteelSeriesOldApex::RGBController_SteelSeriesOldApex(SteelSeriesOldApexController* old_apex_ptr)
|
||||
RGBController_SteelSeriesOldApex::RGBController_SteelSeriesOldApex(SteelSeriesOldApexController* controller_ptr)
|
||||
{
|
||||
OldApex = old_apex_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = OldApex->GetDeviceName();
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "SteelSeries";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "SteelSeries old Apex device";
|
||||
location = OldApex->GetDeviceLocation();
|
||||
serial = OldApex->GetSerialString();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode direct;
|
||||
direct.name = "Direct";
|
||||
|
|
@ -52,7 +52,7 @@ RGBController_SteelSeriesOldApex::RGBController_SteelSeriesOldApex(SteelSeriesOl
|
|||
|
||||
RGBController_SteelSeriesOldApex::~RGBController_SteelSeriesOldApex()
|
||||
{
|
||||
delete OldApex;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesOldApex::SetupZones()
|
||||
|
|
@ -167,8 +167,7 @@ void RGBController_SteelSeriesOldApex::DeviceUpdateLEDs()
|
|||
logo.blue = RGBGetBValue(colors[4]);
|
||||
logo.alpha = modes[active_mode].value;
|
||||
|
||||
OldApex->SetColorDetailed(qwerty, tenkey, functionkey, mxkey, logo);
|
||||
|
||||
controller->SetColorDetailed(qwerty, tenkey, functionkey, mxkey, logo);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesOldApex::UpdateZoneLEDs(int /*zone*/)
|
||||
|
|
@ -189,11 +188,6 @@ void RGBController_SteelSeriesOldApex::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesOldApex::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesOldApex::DeviceUpdateMode()
|
||||
{
|
||||
// We are using SetLightingEffect to control the brightness of
|
||||
|
|
|
|||
|
|
@ -25,20 +25,18 @@
|
|||
class RGBController_SteelSeriesOldApex : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SteelSeriesOldApex(SteelSeriesOldApexController* old_apex_ptr);
|
||||
RGBController_SteelSeriesOldApex(SteelSeriesOldApexController* controller_ptr);
|
||||
~RGBController_SteelSeriesOldApex();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
SteelSeriesOldApexController* OldApex;
|
||||
SteelSeriesOldApexController* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SteelSeriesQCKMat::RGBController_SteelSeriesQCKMat(SteelSeriesQCKMatController* qck_ptr)
|
||||
RGBController_SteelSeriesQCKMat::RGBController_SteelSeriesQCKMat(SteelSeriesQCKMatController* controller_ptr)
|
||||
{
|
||||
qck = qck_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = qck->GetDeviceName();
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "SteelSeries";
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = "SteelSeries QCK Mat Device";
|
||||
location = qck->GetDeviceLocation();
|
||||
serial = qck->GetSerialString();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
|
@ -42,7 +42,7 @@ RGBController_SteelSeriesQCKMat::RGBController_SteelSeriesQCKMat(SteelSeriesQCKM
|
|||
|
||||
RGBController_SteelSeriesQCKMat::~RGBController_SteelSeriesQCKMat()
|
||||
{
|
||||
delete qck;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesQCKMat::SetupZones()
|
||||
|
|
@ -79,7 +79,7 @@ void RGBController_SteelSeriesQCKMat::ResizeZone(int /*zone*/, int /*new_size*/)
|
|||
|
||||
void RGBController_SteelSeriesQCKMat::DeviceUpdateLEDs()
|
||||
{
|
||||
qck->SetColors(colors);
|
||||
controller->SetColors(colors);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesQCKMat::UpdateZoneLEDs(int /*zone*/)
|
||||
|
|
@ -98,11 +98,6 @@ void RGBController_SteelSeriesQCKMat::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesQCKMat::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesQCKMat::DeviceUpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
|
|
|
|||
|
|
@ -15,20 +15,18 @@
|
|||
class RGBController_SteelSeriesQCKMat : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SteelSeriesQCKMat(SteelSeriesQCKMatController* qck_ptr);
|
||||
RGBController_SteelSeriesQCKMat(SteelSeriesQCKMatController* controller_ptr);
|
||||
~RGBController_SteelSeriesQCKMat();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
SteelSeriesQCKMatController* qck;
|
||||
SteelSeriesQCKMatController* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -46,17 +46,17 @@ static const steelseries_rival_led_info rival_600_leds[]=
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SteelSeriesRival::RGBController_SteelSeriesRival(SteelSeriesRivalController* rival_ptr)
|
||||
RGBController_SteelSeriesRival::RGBController_SteelSeriesRival(SteelSeriesRivalController* controller_ptr)
|
||||
{
|
||||
rival = rival_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = rival->GetDeviceName();
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "SteelSeries";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "SteelSeries Rival Device";
|
||||
location = rival->GetDeviceLocation();
|
||||
serial = rival->GetSerialString();
|
||||
version = rival->GetFirmwareVersion();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
version = controller->GetFirmwareVersion();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
|
@ -80,7 +80,7 @@ RGBController_SteelSeriesRival::RGBController_SteelSeriesRival(SteelSeriesRivalC
|
|||
|
||||
RGBController_SteelSeriesRival::~RGBController_SteelSeriesRival()
|
||||
{
|
||||
delete rival;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesRival::SetupZones()
|
||||
|
|
@ -101,8 +101,8 @@ void RGBController_SteelSeriesRival::SetupZones()
|
|||
leds.push_back(logo_led);
|
||||
|
||||
/* Rival 300 and 700 extend this by adding Scroll Wheel LED + Zone */
|
||||
if(rival->GetMouseType() == RIVAL_300 ||
|
||||
rival->GetMouseType() == RIVAL_700)
|
||||
if(controller->GetMouseType() == RIVAL_300 ||
|
||||
controller->GetMouseType() == RIVAL_700)
|
||||
{
|
||||
zone wheel_zone;
|
||||
wheel_zone.name = "Scroll Wheel";
|
||||
|
|
@ -119,7 +119,7 @@ void RGBController_SteelSeriesRival::SetupZones()
|
|||
leds.push_back(wheel_led);
|
||||
}
|
||||
/* Rival 650 extends this by Scroll Wheel LED + Zone and additional lights LEDs + Zone */
|
||||
else if(rival->GetMouseType() == RIVAL_650)
|
||||
else if(controller->GetMouseType() == RIVAL_650)
|
||||
{
|
||||
leds[0].value = 0x11;
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ void RGBController_SteelSeriesRival::SetupZones()
|
|||
}
|
||||
}
|
||||
/* Rival 600 is simular to Rival 650 */
|
||||
else if(rival->GetMouseType() == RIVAL_600)
|
||||
else if(controller->GetMouseType() == RIVAL_600)
|
||||
{
|
||||
leds[0].value = 0x01;
|
||||
|
||||
|
|
@ -208,7 +208,7 @@ void RGBController_SteelSeriesRival::DeviceUpdateLEDs()
|
|||
unsigned char red = RGBGetRValue(colors[i]);
|
||||
unsigned char grn = RGBGetGValue(colors[i]);
|
||||
unsigned char blu = RGBGetBValue(colors[i]);
|
||||
rival->SetColor(leds[i].value, red, grn, blu);
|
||||
controller->SetColor(leds[i].value, red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ void RGBController_SteelSeriesRival::UpdateZoneLEDs(int zone)
|
|||
unsigned char red = RGBGetRValue(zones[zone].colors[i]);
|
||||
unsigned char grn = RGBGetGValue(zones[zone].colors[i]);
|
||||
unsigned char blu = RGBGetBValue(zones[zone].colors[i]);
|
||||
rival->SetColor(zones[zone].leds[i].value, red, grn, blu);
|
||||
controller->SetColor(zones[zone].leds[i].value, red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -228,12 +228,7 @@ void RGBController_SteelSeriesRival::UpdateSingleLED(int led)
|
|||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
unsigned char blu = RGBGetBValue(colors[led]);
|
||||
rival->SetColor(leds[led].value, red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesRival::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
controller->SetColor(leds[led].value, red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesRival::DeviceUpdateMode()
|
||||
|
|
@ -244,10 +239,11 @@ void RGBController_SteelSeriesRival::DeviceUpdateMode()
|
|||
switch (modes[active_mode].value)
|
||||
{
|
||||
case STEELSERIES_RIVAL_DIRECT:
|
||||
rival->SetLightEffectAll(STEELSERIES_RIVAL_EFFECT_DIRECT);
|
||||
controller->SetLightEffectAll(STEELSERIES_RIVAL_EFFECT_DIRECT);
|
||||
break;
|
||||
|
||||
case STEELSERIES_RIVAL_PULSATE:
|
||||
rival->SetLightEffectAll(modes[active_mode].speed);
|
||||
controller->SetLightEffectAll(modes[active_mode].speed);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -257,5 +253,5 @@ void RGBController_SteelSeriesRival::DeviceUpdateMode()
|
|||
void RGBController_SteelSeriesRival::DeviceSaveMode()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
rival->SaveMode();
|
||||
controller->SaveMode();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,21 +15,19 @@
|
|||
class RGBController_SteelSeriesRival : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SteelSeriesRival(SteelSeriesRivalController* rival_ptr);
|
||||
RGBController_SteelSeriesRival(SteelSeriesRivalController* controller_ptr);
|
||||
~RGBController_SteelSeriesRival();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
SteelSeriesRivalController* rival;
|
||||
SteelSeriesRivalController* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SteelSeriesRival3::RGBController_SteelSeriesRival3(SteelSeriesMouseController *controller_ptr)
|
||||
RGBController_SteelSeriesRival3::RGBController_SteelSeriesRival3(SteelSeriesMouseController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
|
|
@ -166,11 +166,6 @@ void RGBController_SteelSeriesRival3::UpdateSingleLED(int led)
|
|||
controller->SetColor(leds[led].value, red, grn, blu, modes[active_mode].brightness);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesRival3::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesRival3::DeviceUpdateMode()
|
||||
{
|
||||
controller->SetLightEffectAll(modes[active_mode].value - modes[active_mode].speed);
|
||||
|
|
|
|||
|
|
@ -20,18 +20,15 @@ public:
|
|||
~RGBController_SteelSeriesRival3();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
|
||||
private:
|
||||
SteelSeriesMouseController* controller;
|
||||
SteelSeriesMouseController* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SteelSeriesSensei::RGBController_SteelSeriesSensei(SteelSeriesSenseiController* sensei_ptr)
|
||||
RGBController_SteelSeriesSensei::RGBController_SteelSeriesSensei(SteelSeriesSenseiController* controller_ptr)
|
||||
{
|
||||
sensei = sensei_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = sensei->GetDeviceName();
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "SteelSeries";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "SteelSeries Sensei Device";
|
||||
location = sensei->GetDeviceLocation();
|
||||
serial = sensei->GetSerialString();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
|
@ -63,7 +63,7 @@ RGBController_SteelSeriesSensei::RGBController_SteelSeriesSensei(SteelSeriesSens
|
|||
|
||||
RGBController_SteelSeriesSensei::~RGBController_SteelSeriesSensei()
|
||||
{
|
||||
delete sensei;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesSensei::SetupZones()
|
||||
|
|
@ -120,12 +120,12 @@ void RGBController_SteelSeriesSensei::UpdateZoneLEDs(int zone)
|
|||
switch(modes[active_mode].value)
|
||||
{
|
||||
case STEELSERIES_SENSEI_MODE_DIRECT:
|
||||
sensei->SetColor(zone, red, grn, blu);
|
||||
controller->SetColor(zone, red, grn, blu);
|
||||
break;
|
||||
|
||||
case STEELSERIES_SENSEI_MODE_BREATHING:
|
||||
case STEELSERIES_SENSEI_MODE_RAINBOW:
|
||||
sensei->SetLightEffect(zone, modes[active_mode].value, modes[active_mode].speed, red, grn, blu);
|
||||
controller->SetLightEffect(zone, modes[active_mode].value, modes[active_mode].speed, red, grn, blu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -139,11 +139,6 @@ void RGBController_SteelSeriesSensei::UpdateSingleLED(int led)
|
|||
UpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesSensei::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesSensei::DeviceUpdateMode()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
|
|
|
|||
|
|
@ -15,20 +15,18 @@
|
|||
class RGBController_SteelSeriesSensei : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SteelSeriesSensei(SteelSeriesSenseiController* sensei_ptr);
|
||||
RGBController_SteelSeriesSensei(SteelSeriesSenseiController* controller_ptr);
|
||||
~RGBController_SteelSeriesSensei();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
SteelSeriesSenseiController* sensei;
|
||||
SteelSeriesSenseiController* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_SteelSeriesSiberia::RGBController_SteelSeriesSiberia(SteelSeriesSiberiaController* siberia_ptr)
|
||||
RGBController_SteelSeriesSiberia::RGBController_SteelSeriesSiberia(SteelSeriesSiberiaController* controller_ptr)
|
||||
{
|
||||
siberia = siberia_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = siberia->GetDeviceName();
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "SteelSeries";
|
||||
type = DEVICE_TYPE_HEADSET;
|
||||
description = "SteelSeries Siberia Device";
|
||||
location = siberia->GetDeviceLocation();
|
||||
serial = siberia->GetSerialString();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
|
|
@ -42,7 +42,7 @@ RGBController_SteelSeriesSiberia::RGBController_SteelSeriesSiberia(SteelSeriesSi
|
|||
|
||||
RGBController_SteelSeriesSiberia::~RGBController_SteelSeriesSiberia()
|
||||
{
|
||||
delete siberia;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesSiberia::SetupZones()
|
||||
|
|
@ -76,7 +76,7 @@ void RGBController_SteelSeriesSiberia::DeviceUpdateLEDs()
|
|||
unsigned char red = RGBGetRValue(colors[0]);
|
||||
unsigned char grn = RGBGetGValue(colors[0]);
|
||||
unsigned char blu = RGBGetBValue(colors[0]);
|
||||
siberia->SetColor(red, grn, blu);
|
||||
controller->SetColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesSiberia::UpdateZoneLEDs(int zone)
|
||||
|
|
@ -85,7 +85,7 @@ void RGBController_SteelSeriesSiberia::UpdateZoneLEDs(int zone)
|
|||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
siberia->SetColor(red, grn, blu);
|
||||
controller->SetColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesSiberia::UpdateSingleLED(int led)
|
||||
|
|
@ -95,11 +95,6 @@ void RGBController_SteelSeriesSiberia::UpdateSingleLED(int led)
|
|||
UpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesSiberia::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesSiberia::DeviceUpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
|
|
|
|||
|
|
@ -15,20 +15,18 @@
|
|||
class RGBController_SteelSeriesSiberia : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_SteelSeriesSiberia(SteelSeriesSiberiaController* siberia_ptr);
|
||||
RGBController_SteelSeriesSiberia(SteelSeriesSiberiaController* controller_ptr);
|
||||
~RGBController_SteelSeriesSiberia();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
SteelSeriesSiberiaController* siberia;
|
||||
SteelSeriesSiberiaController* controller;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue