Remove SetCustomMode from all controllers beginning with the letter R
This commit is contained in:
parent
933370537d
commit
66c856f49a
10 changed files with 28 additions and 60 deletions
|
|
@ -20,16 +20,16 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_RedragonM711::RGBController_RedragonM711(RedragonM711Controller* redragon_ptr)
|
||||
RGBController_RedragonM711::RGBController_RedragonM711(RedragonM711Controller* controller_ptr)
|
||||
{
|
||||
redragon = redragon_ptr;
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Redragon Mouse Device";
|
||||
vendor = "Redragon";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "Redragon Mouse Device";
|
||||
location = redragon->GetDeviceLocation();
|
||||
serial = redragon->GetSerialString();
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
|
|
@ -71,7 +71,7 @@ RGBController_RedragonM711::RGBController_RedragonM711(RedragonM711Controller* r
|
|||
|
||||
RGBController_RedragonM711::~RGBController_RedragonM711()
|
||||
{
|
||||
delete redragon;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_RedragonM711::SetupZones()
|
||||
|
|
@ -105,8 +105,8 @@ void RGBController_RedragonM711::DeviceUpdateLEDs()
|
|||
unsigned char grn = RGBGetGValue(colors[0]);
|
||||
unsigned char blu = RGBGetBValue(colors[0]);
|
||||
|
||||
redragon->SendMouseColor(red, grn, blu);
|
||||
redragon->SendMouseApply();
|
||||
controller->SendMouseColor(red, grn, blu);
|
||||
controller->SendMouseApply();
|
||||
}
|
||||
|
||||
void RGBController_RedragonM711::UpdateZoneLEDs(int /*zone*/)
|
||||
|
|
@ -119,11 +119,6 @@ void RGBController_RedragonM711::UpdateSingleLED(int /*led*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_RedragonM711::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_RedragonM711::DeviceUpdateMode()
|
||||
{
|
||||
bool random = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
|
|
@ -133,12 +128,12 @@ void RGBController_RedragonM711::DeviceUpdateMode()
|
|||
|
||||
if((modes[active_mode].value == REDRAGON_M711_MODE_BREATHING) && random)
|
||||
{
|
||||
redragon->SendMouseMode(REDRAGON_M711_MODE_RANDOM_BREATHING, 0, red, grn, blu);
|
||||
controller->SendMouseMode(REDRAGON_M711_MODE_RANDOM_BREATHING, 0, red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
redragon->SendMouseMode(modes[active_mode].value, 0, red, grn, blu);
|
||||
controller->SendMouseMode(modes[active_mode].value, 0, red, grn, blu);
|
||||
}
|
||||
|
||||
redragon->SendMouseApply();
|
||||
controller->SendMouseApply();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,20 +14,18 @@
|
|||
class RGBController_RedragonM711 : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_RedragonM711(RedragonM711Controller* redragon_ptr);
|
||||
RGBController_RedragonM711(RedragonM711Controller* controller_ptr);
|
||||
~RGBController_RedragonM711();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
RedragonM711Controller* redragon;
|
||||
RedragonM711Controller* controller;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -170,11 +170,6 @@ void RGBController_RoccatBurst::UpdateSingleLED(int /*led_idx*/)
|
|||
UpdateZoneLEDs(0);
|
||||
}
|
||||
|
||||
void RGBController_RoccatBurst::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_RoccatBurst::DeviceUpdateMode()
|
||||
{
|
||||
if(modes[active_mode].value == ROCCAT_BURST_DIRECT_MODE_VALUE)
|
||||
|
|
|
|||
|
|
@ -19,10 +19,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:
|
||||
|
|
|
|||
|
|
@ -87,11 +87,6 @@ void RGBController_RoccatHordeAimo::UpdateSingleLED(int /*led_idx*/)
|
|||
UpdateZoneLEDs(0);
|
||||
}
|
||||
|
||||
void RGBController_RoccatHordeAimo::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_RoccatHordeAimo::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -18,14 +18,12 @@ public:
|
|||
~RGBController_RoccatHordeAimo();
|
||||
|
||||
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,15 +20,16 @@
|
|||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_RoccatKoneAimo::RGBController_RoccatKoneAimo(RoccatKoneAimoController* mouse_ptr)
|
||||
RGBController_RoccatKoneAimo::RGBController_RoccatKoneAimo(RoccatKoneAimoController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = "Roccat Kone Aimo";
|
||||
vendor = "Roccat";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "Roccat Kone Aimo Mouse";
|
||||
mouse = mouse_ptr;
|
||||
location = mouse->GetLocation();
|
||||
serial = mouse->GetSerial();
|
||||
location = controller->GetLocation();
|
||||
serial = controller->GetSerial();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
|
|
@ -43,12 +44,11 @@ RGBController_RoccatKoneAimo::RGBController_RoccatKoneAimo(RoccatKoneAimoControl
|
|||
active_mode = 0;
|
||||
|
||||
SetupZones();
|
||||
|
||||
}
|
||||
|
||||
RGBController_RoccatKoneAimo::~RGBController_RoccatKoneAimo()
|
||||
{
|
||||
delete mouse;
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_RoccatKoneAimo::SetupZones()
|
||||
|
|
@ -171,12 +171,12 @@ void RGBController_RoccatKoneAimo::DeviceUpdateLEDs()
|
|||
\*---------------------------------------------------------*/
|
||||
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
mouse->SetChannelColors(zones_channel[zone_idx], zones[zone_idx].colors, zones[zone_idx].leds_count);
|
||||
controller->SetChannelColors(zones_channel[zone_idx], zones[zone_idx].colors, zones[zone_idx].leds_count);
|
||||
}
|
||||
/*---------------------------------------------------------*\
|
||||
| Apply new colors to the mouse |
|
||||
\*---------------------------------------------------------*/
|
||||
mouse->SendUpdate();
|
||||
controller->SendUpdate();
|
||||
}
|
||||
|
||||
void RGBController_RoccatKoneAimo::UpdateZoneLEDs(int zone_idx)
|
||||
|
|
@ -184,11 +184,11 @@ void RGBController_RoccatKoneAimo::UpdateZoneLEDs(int zone_idx)
|
|||
/*---------------------------------------------------------*\
|
||||
| Set colors for one channel of leds |
|
||||
\*---------------------------------------------------------*/
|
||||
mouse->SetChannelColors(zones_channel[zone_idx], zones[zone_idx].colors, zones[zone_idx].leds_count);
|
||||
controller->SetChannelColors(zones_channel[zone_idx], zones[zone_idx].colors, zones[zone_idx].leds_count);
|
||||
/*---------------------------------------------------------*\
|
||||
| Apply new colors to the mouse |
|
||||
\*---------------------------------------------------------*/
|
||||
mouse->SendUpdate();
|
||||
controller->SendUpdate();
|
||||
}
|
||||
|
||||
void RGBController_RoccatKoneAimo::UpdateSingleLED(int led_idx)
|
||||
|
|
@ -200,16 +200,11 @@ void RGBController_RoccatKoneAimo::UpdateSingleLED(int led_idx)
|
|||
/*---------------------------------------------------------*\
|
||||
| Update channel corresponding to led |
|
||||
\*---------------------------------------------------------*/
|
||||
mouse->SetChannelColors(channel, zones[leds[led_idx].value].colors, zones[leds[led_idx].value].leds_count);
|
||||
controller->SetChannelColors(channel, zones[leds[led_idx].value].colors, zones[leds[led_idx].value].leds_count);
|
||||
/*---------------------------------------------------------*\
|
||||
| Apply new colors to the mouse |
|
||||
\*---------------------------------------------------------*/
|
||||
mouse->SendUpdate();
|
||||
}
|
||||
|
||||
void RGBController_RoccatKoneAimo::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
controller->SendUpdate();
|
||||
}
|
||||
|
||||
void RGBController_RoccatKoneAimo::DeviceUpdateMode()
|
||||
|
|
|
|||
|
|
@ -14,22 +14,20 @@
|
|||
class RGBController_RoccatKoneAimo : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_RoccatKoneAimo(RoccatKoneAimoController* mouse_ptr);
|
||||
RGBController_RoccatKoneAimo(RoccatKoneAimoController* controller_ptr);
|
||||
~RGBController_RoccatKoneAimo();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
RoccatKoneAimoController* mouse;
|
||||
RoccatKoneAimoController* controller;
|
||||
std::vector<ROCCAT_KONE_AIMO_CHANNEL> zones_channel;
|
||||
std::vector<ROCCAT_KONE_AIMO_CHANNEL> leds_channel;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -276,11 +276,6 @@ void RGBController_RoccatVulcanAimo::UpdateSingleLED(int /*led_idx*/)
|
|||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_RoccatVulcanAimo::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_RoccatVulcanAimo::DeviceUpdateMode()
|
||||
{
|
||||
controller->SendMode(modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, colors);
|
||||
|
|
|
|||
|
|
@ -28,14 +28,12 @@ public:
|
|||
~RGBController_RoccatVulcanAimo();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue