mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-02-06 13:21:16 -05:00
RGBController API Overhaul
* Reorganize and clean up RGBController API functions
* Add functions to get protected RGBController member values
* Make NetworkClient, ProfileManager, and ResourceManager friend classes so they can access protected members
* Protected previously-public RGBController members
* Information strings (name, vendor, description, version, serial location)
* Device type
* Active mode
* Flags
* LEDs vector
* LED alternate names vector
* Modes vector
* Colors vector
* Zones vector
* Add CONTROLLER_FLAG_HIDDEN to allow plugins to hide controllers from control GUI
* Add update reason codes to RGBController update callback and signal updates on more RGBController events
* Add loop zone types and segmented zone type
* Add matrix map field to segments
* Rework matrix_map_type from using pointers to vector to prevent memory leaks
* Rework KeyboardLayoutManager to return new matrix_map_type
* Add access mutex to RGBController API
* Add per-zone modes ot RGBController API
* Add JSON description functions to RGBController API
This commit is contained in:
@@ -187,11 +187,7 @@ void RGBController_BloodyB820R::SetupZones()
|
||||
KB_zone.leds_min = BLOODY_B820R_KEYCOUNT;
|
||||
KB_zone.leds_max = BLOODY_B820R_KEYCOUNT;
|
||||
KB_zone.leds_count = BLOODY_B820R_KEYCOUNT;
|
||||
|
||||
KB_zone.matrix_map = new matrix_map_type;
|
||||
KB_zone.matrix_map->height = 6;
|
||||
KB_zone.matrix_map->width = 21;
|
||||
KB_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
KB_zone.matrix_map.Set(6, 21, (unsigned int *)&matrix_map);
|
||||
zones.push_back(KB_zone);
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
@@ -214,20 +210,12 @@ void RGBController_BloodyB820R::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_BloodyB820R::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
|
||||
void RGBController_BloodyB820R::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->SetLEDDirect(colors);
|
||||
}
|
||||
|
||||
void RGBController_BloodyB820R::UpdateZoneLEDs(int zone)
|
||||
void RGBController_BloodyB820R::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
std::vector<RGBColor> colour;
|
||||
|
||||
@@ -239,7 +227,7 @@ void RGBController_BloodyB820R::UpdateZoneLEDs(int zone)
|
||||
controller->SetLEDDirect(colour);
|
||||
}
|
||||
|
||||
void RGBController_BloodyB820R::UpdateSingleLED(int led)
|
||||
void RGBController_BloodyB820R::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
std::vector<RGBColor> colour;
|
||||
colour.push_back(colors[led]);
|
||||
|
||||
@@ -22,11 +22,10 @@ public:
|
||||
~RGBController_BloodyB820R();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -134,7 +134,6 @@ void RGBController_BloodyMouse::SetupZones()
|
||||
new_zone.leds_max = new_zone.leds_min;
|
||||
new_zone.leds_count = new_zone.leds_min;
|
||||
new_zone.type = bool_single ? ZONE_TYPE_SINGLE : ZONE_TYPE_LINEAR;
|
||||
new_zone.matrix_map = NULL;
|
||||
zones.push_back(new_zone);
|
||||
|
||||
for(unsigned int lp_idx = 0; lp_idx < zones[zone_idx].leds_count; lp_idx++)
|
||||
@@ -160,13 +159,6 @@ void RGBController_BloodyMouse::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<RGBColor> colour;
|
||||
@@ -179,12 +171,12 @@ void RGBController_BloodyMouse::DeviceUpdateLEDs()
|
||||
controller->SetLedsDirect(colour);
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_BloodyMouse::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_BloodyMouse::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -30,11 +30,10 @@ public:
|
||||
~RGBController_BloodyMouse();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ void RGBController_AMBX::SetupZones()
|
||||
side_lights_zone.leds_min = 2;
|
||||
side_lights_zone.leds_max = 2;
|
||||
side_lights_zone.leds_count = 2;
|
||||
side_lights_zone.matrix_map = NULL;
|
||||
zones.push_back(side_lights_zone);
|
||||
|
||||
zone wallwasher_zone;
|
||||
@@ -65,7 +64,6 @@ void RGBController_AMBX::SetupZones()
|
||||
wallwasher_zone.leds_min = 3;
|
||||
wallwasher_zone.leds_max = 3;
|
||||
wallwasher_zone.leds_count = 3;
|
||||
wallwasher_zone.matrix_map = NULL;
|
||||
zones.push_back(wallwasher_zone);
|
||||
|
||||
// Set up LEDs
|
||||
@@ -97,11 +95,6 @@ void RGBController_AMBX::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AMBX::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
// This device does not support resizing zones
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateLEDs()
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
@@ -121,7 +114,7 @@ void RGBController_AMBX::DeviceUpdateLEDs()
|
||||
controller->SetLEDColors(led_values, led_colors, static_cast<unsigned int>(leds.size()));
|
||||
}
|
||||
|
||||
void RGBController_AMBX::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AMBX::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
@@ -156,7 +149,7 @@ void RGBController_AMBX::UpdateZoneLEDs(int zone)
|
||||
controller->SetLEDColors(led_values, led_colors, zone_size);
|
||||
}
|
||||
|
||||
void RGBController_AMBX::UpdateSingleLED(int led)
|
||||
void RGBController_AMBX::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
if(!controller->IsInitialized())
|
||||
{
|
||||
|
||||
@@ -19,11 +19,10 @@ public:
|
||||
~RGBController_AMBX();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -154,7 +154,6 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
logo_zone.leds_min = 1;
|
||||
logo_zone.leds_max = 1;
|
||||
logo_zone.leds_count = 1;
|
||||
logo_zone.matrix_map = NULL;
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
zone fan_zone;
|
||||
@@ -163,7 +162,6 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
fan_zone.leds_min = 1;
|
||||
fan_zone.leds_max = 1;
|
||||
fan_zone.leds_count = 1;
|
||||
fan_zone.matrix_map = NULL;
|
||||
zones.push_back(fan_zone);
|
||||
|
||||
zone ring_zone;
|
||||
@@ -172,7 +170,6 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
ring_zone.leds_min = 15;
|
||||
ring_zone.leds_max = 15;
|
||||
ring_zone.leds_count = 15;
|
||||
ring_zone.matrix_map = NULL;
|
||||
zones.push_back(ring_zone);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -205,13 +202,6 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*-----------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::DeviceUpdateLEDs()
|
||||
{
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_PER_LED)
|
||||
@@ -271,12 +261,12 @@ void RGBController_AMDWraithPrism::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AMDWraithPrism::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AMDWraithPrism::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -262,30 +262,18 @@ RGBController_AOCKeyboard::~RGBController_AOCKeyboard()
|
||||
|
||||
void RGBController_AOCKeyboard::SetupZones()
|
||||
{
|
||||
KeyboardLayoutManager new_kb(KEYBOARD_LAYOUT_ANSI_QWERTY, KEYBOARD_SIZE_FULL, aoc_keyboard_offset_values);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Create the keyboard zone usiung Keyboard Layout Manager |
|
||||
\*---------------------------------------------------------*/
|
||||
zone new_zone;
|
||||
new_zone.name = ZONE_EN_KEYBOARD;
|
||||
new_zone.type = ZONE_TYPE_MATRIX;
|
||||
|
||||
KeyboardLayoutManager new_kb(KEYBOARD_LAYOUT_ANSI_QWERTY, KEYBOARD_SIZE_FULL, aoc_keyboard_offset_values);
|
||||
|
||||
matrix_map_type * new_map = new matrix_map_type;
|
||||
new_zone.matrix_map = new_map;
|
||||
new_zone.matrix_map->height = new_kb.GetRowCount();
|
||||
new_zone.matrix_map->width = new_kb.GetColumnCount();
|
||||
|
||||
new_zone.matrix_map->map = new unsigned int[new_map->height * new_map->width];
|
||||
new_zone.leds_count = new_kb.GetKeyCount();
|
||||
new_zone.leds_min = new_zone.leds_count;
|
||||
new_zone.leds_max = new_zone.leds_count;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Matrix map still uses declared zone rows and columns |
|
||||
| as the packet structure depends on the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
new_kb.GetKeyMap(new_map->map, KEYBOARD_MAP_FILL_TYPE_COUNT, new_map->height, new_map->width);
|
||||
new_zone.name = ZONE_EN_KEYBOARD;
|
||||
new_zone.type = ZONE_TYPE_MATRIX;
|
||||
new_zone.leds_count = new_kb.GetKeyCount();
|
||||
new_zone.leds_min = new_zone.leds_count;
|
||||
new_zone.leds_max = new_zone.leds_count;
|
||||
new_zone.matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Create LEDs for the Matrix zone |
|
||||
@@ -305,13 +293,6 @@ void RGBController_AOCKeyboard::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
if(modes[active_mode].value == AOC_KEYBOARD_MODE_CUSTOM)
|
||||
@@ -331,12 +312,12 @@ void RGBController_AOCKeyboard::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AOCKeyboard::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AOCKeyboard::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AOCKeyboard::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -134,7 +134,6 @@ void RGBController_AOCMouse::SetupZones()
|
||||
logo_zone.leds_min = 1;
|
||||
logo_zone.leds_max = 1;
|
||||
logo_zone.leds_count = 1;
|
||||
logo_zone.matrix_map = NULL;
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
led logo_led;
|
||||
@@ -147,7 +146,6 @@ void RGBController_AOCMouse::SetupZones()
|
||||
scroll_wheel_zone.leds_min = 1;
|
||||
scroll_wheel_zone.leds_max = 1;
|
||||
scroll_wheel_zone.leds_count = 1;
|
||||
scroll_wheel_zone.matrix_map = NULL;
|
||||
zones.push_back(scroll_wheel_zone);
|
||||
|
||||
led scroll_wheel_led;
|
||||
@@ -157,24 +155,17 @@ void RGBController_AOCMouse::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AOCMouse::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AOCMouse::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_AOCMouse::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AOCMouse::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AOCMouse::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AOCMouse::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -124,7 +124,6 @@ void RGBController_AOCMousemat::SetupZones()
|
||||
mousemat_zone.leds_min = 1;
|
||||
mousemat_zone.leds_max = 1;
|
||||
mousemat_zone.leds_count = 1;
|
||||
mousemat_zone.matrix_map = NULL;
|
||||
zones.push_back(mousemat_zone);
|
||||
|
||||
led mousemat_led;
|
||||
@@ -134,24 +133,17 @@ void RGBController_AOCMousemat::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AOCMousemat::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AOCMousemat::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_AOCMousemat::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AOCMousemat::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AOCMousemat::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AOCMousemat::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ void PolychromeUSBController::SetDeviceInfo()
|
||||
WriteRGSwap(rgswap_final[0], rgswap_final[1], rgswap_final[2], rgswap_final[3], rgswap_final[4], rgswap_final[5], rgswap_final[6], rgswap_final[7]);
|
||||
}
|
||||
|
||||
void PolychromeUSBController::ResizeZone(int zone, int new_size)
|
||||
void PolychromeUSBController::DeviceResizeZone(int zone, int new_size)
|
||||
{
|
||||
unsigned char zonecfg[POLYCHROME_USB_ZONE_MAX_NUM];
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
unsigned int configsize
|
||||
);
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceResizeZone(int zone, int new_size);
|
||||
void SetRGSwap(bool reset);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -229,8 +229,6 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
zones[channel_idx].matrix_map = NULL;
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
@@ -273,10 +271,10 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::ResizeZone(int zone, int new_size)
|
||||
void RGBController_PolychromeUSB::DeviceResizeZone(int zone, int new_size)
|
||||
{
|
||||
zones[zone].leds_count = (unsigned char) new_size;
|
||||
controller->ResizeZone(zones_info[zone].zone, new_size);
|
||||
controller->DeviceResizeZone(zones_info[zone].zone, new_size);
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::DeviceUpdateLEDs()
|
||||
@@ -299,7 +297,7 @@ void RGBController_PolychromeUSB::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::UpdateZoneLEDs(int zone)
|
||||
void RGBController_PolychromeUSB::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
unsigned char set_mode=zones_info[zone].mode;
|
||||
|
||||
@@ -311,7 +309,7 @@ void RGBController_PolychromeUSB::UpdateZoneLEDs(int zone)
|
||||
controller->WriteZone(zone, set_mode, zones_info[zone].speed, zones[zone].colors[0], false);
|
||||
}
|
||||
|
||||
void RGBController_PolychromeUSB::UpdateSingleLED(int led)
|
||||
void RGBController_PolychromeUSB::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned int channel = leds[led].value;
|
||||
unsigned char set_mode = zones_info[channel].mode;
|
||||
|
||||
@@ -22,11 +22,11 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -135,7 +135,6 @@ void RGBController_ASRockASRRGBSMBus::SetupZones()
|
||||
new_zone->leds_min = 1;
|
||||
new_zone->leds_max = 1;
|
||||
new_zone->leds_count = 1;
|
||||
new_zone->matrix_map = NULL;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Push new zone to zones vector |
|
||||
@@ -160,7 +159,7 @@ void RGBController_ASRockASRRGBSMBus::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ASRockASRRGBSMBus::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
void RGBController_ASRockASRRGBSMBus::DeviceResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
@@ -171,16 +170,16 @@ void RGBController_ASRockASRRGBSMBus::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int led = 0; led < colors.size(); led++)
|
||||
{
|
||||
UpdateSingleLED(led);
|
||||
DeviceUpdateSingleLED(led);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ASRockASRRGBSMBus::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ASRockASRRGBSMBus::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ASRockASRRGBSMBus::UpdateSingleLED(int led)
|
||||
void RGBController_ASRockASRRGBSMBus::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
|
||||
@@ -22,11 +22,11 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -267,7 +267,6 @@ void RGBController_ASRockPolychromeV1SMBus::SetupZones()
|
||||
new_zone->leds_min = 1;
|
||||
new_zone->leds_max = 1;
|
||||
new_zone->leds_count = 1;
|
||||
new_zone->matrix_map = NULL;
|
||||
|
||||
if(zone_idx == POLYCHROME_V1_ZONE_ADDRESSABLE)
|
||||
{
|
||||
@@ -297,9 +296,9 @@ void RGBController_ASRockPolychromeV1SMBus::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV1SMBus::ResizeZone(int zone, int new_size)
|
||||
void RGBController_ASRockPolychromeV1SMBus::DeviceResizeZone(int zone, int new_size)
|
||||
{
|
||||
LOG_TRACE("[%s] ResizeZone(%02X, %02X)", name.c_str(), zone, new_size);
|
||||
LOG_TRACE("[%s] DeviceResizeZone(%02X, %02X)", name.c_str(), zone, new_size);
|
||||
controller-> SetARGBSize(new_size & 0xFF);
|
||||
zones[POLYCHROME_V1_ZONE_ADDRESSABLE].leds_count = 1;
|
||||
}
|
||||
@@ -309,19 +308,19 @@ void RGBController_ASRockPolychromeV1SMBus::DeviceUpdateLEDs()
|
||||
LOG_TRACE("[%s] DeviceUpdateLEDs()", name.c_str());
|
||||
for (uint8_t zone_idx = 0; zone_idx < zoneIndexMap.size(); zone_idx++)
|
||||
{
|
||||
UpdateSingleLED(zone_idx);
|
||||
DeviceUpdateSingleLED(zone_idx);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV1SMBus::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ASRockPolychromeV1SMBus::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
LOG_TRACE("[%s] UpdateZoneLEDs()", name.c_str());
|
||||
LOG_TRACE("[%s] DeviceUpdateZoneLEDs()", name.c_str());
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV1SMBus::UpdateSingleLED(int zone)
|
||||
void RGBController_ASRockPolychromeV1SMBus::DeviceUpdateSingleLED(int zone)
|
||||
{
|
||||
LOG_TRACE("[%s] UpdateSingleLED(%02X)", name.c_str(), zone);
|
||||
LOG_TRACE("[%s] DeviceUpdateSingleLED(%02X)", name.c_str(), zone);
|
||||
|
||||
uint8_t red = RGBGetRValue(colors[zone]);
|
||||
uint8_t grn = RGBGetGValue(colors[zone]);
|
||||
@@ -338,7 +337,7 @@ void RGBController_ASRockPolychromeV1SMBus::DeviceUpdateMode()
|
||||
for(uint8_t zone_idx = 0; zone_idx < zoneIndexMap.size(); zone_idx++)
|
||||
{
|
||||
controller->SetMode(zoneIndexMap[zone_idx], modes[active_mode].value, modes[active_mode].speed);
|
||||
UpdateSingleLED(zone_idx);
|
||||
DeviceUpdateSingleLED(zone_idx);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -23,11 +23,11 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -229,8 +229,6 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
new_zone->type = ZONE_TYPE_SINGLE;
|
||||
}
|
||||
|
||||
new_zone->matrix_map = NULL;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Push new zone to zones vector |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -281,7 +279,7 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV2SMBus::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
void RGBController_ASRockPolychromeV2SMBus::DeviceResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
@@ -292,16 +290,16 @@ void RGBController_ASRockPolychromeV2SMBus::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int led = 0; led < colors.size(); led++)
|
||||
{
|
||||
UpdateSingleLED(led);
|
||||
DeviceUpdateSingleLED(led);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV2SMBus::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ASRockPolychromeV2SMBus::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ASRockPolychromeV2SMBus::UpdateSingleLED(int led)
|
||||
void RGBController_ASRockPolychromeV2SMBus::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
|
||||
@@ -23,11 +23,11 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -141,7 +141,6 @@ void RGBController_Alienware::SetupZones()
|
||||
new_zone.leds_min = 1;
|
||||
new_zone.leds_max = 1;
|
||||
new_zone.leds_count = 1;
|
||||
new_zone.matrix_map = nullptr;
|
||||
|
||||
zones.emplace_back(new_zone);
|
||||
}
|
||||
@@ -158,26 +157,19 @@ void RGBController_Alienware::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_Alienware::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_Alienware::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_Alienware::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_Alienware::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_Alienware::UpdateSingleLED(int led)
|
||||
void RGBController_Alienware::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(led);
|
||||
DeviceUpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
static bool modes_eq(const mode& mode1, const mode& mode2)
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ void AlienwareAW410KController::SetMode
|
||||
SendCommit();
|
||||
}
|
||||
|
||||
void AlienwareAW410KController::UpdateSingleLED
|
||||
void AlienwareAW410KController::DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
unsigned char blue2
|
||||
);
|
||||
|
||||
void UpdateSingleLED
|
||||
void DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
@@ -278,17 +278,6 @@ RGBController_AlienwareAW410K::RGBController_AlienwareAW410K(AlienwareAW410KCont
|
||||
|
||||
RGBController_AlienwareAW410K::~RGBController_AlienwareAW410K()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Delete the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
for(unsigned int zone_index = 0; zone_index < zones.size(); zone_index++)
|
||||
{
|
||||
if(zones[zone_index].matrix_map != NULL)
|
||||
{
|
||||
delete zones[zone_index].matrix_map;
|
||||
}
|
||||
}
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -310,14 +299,7 @@ void RGBController_AlienwareAW410K::SetupZones()
|
||||
|
||||
if(zone_types[zone_idx] == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 6;
|
||||
new_zone.matrix_map->width = 24;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.matrix_map = NULL;
|
||||
new_zone.matrix_map.Set(6, 24, (unsigned int *)&matrix_map);
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
@@ -336,13 +318,6 @@ void RGBController_AlienwareAW410K::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<SelectedButtons> frame_buf_keys;
|
||||
@@ -374,21 +349,21 @@ void RGBController_AlienwareAW410K::DeviceUpdateLEDs()
|
||||
std::copy(new_colors.begin(), new_colors.end(),current_colors.begin());
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
controller->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::UpdateSingleLED(int led)
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
controller->UpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
controller->DeviceUpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateMode()
|
||||
{
|
||||
if(active_mode == 0xFFFF)
|
||||
{
|
||||
UpdateLEDs();
|
||||
UpdateLEDsInternal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,11 +23,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ void AlienwareAW510KController::SetMode
|
||||
SendCommit();
|
||||
}
|
||||
|
||||
void AlienwareAW510KController::UpdateSingleLED
|
||||
void AlienwareAW510KController::DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
unsigned char blue2
|
||||
);
|
||||
|
||||
void UpdateSingleLED
|
||||
void DeviceUpdateSingleLED
|
||||
(
|
||||
unsigned char led,
|
||||
unsigned char red,
|
||||
|
||||
@@ -277,17 +277,6 @@ RGBController_AlienwareAW510K::RGBController_AlienwareAW510K(AlienwareAW510KCont
|
||||
|
||||
RGBController_AlienwareAW510K::~RGBController_AlienwareAW510K()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Delete the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
for(unsigned int zone_index = 0; zone_index < zones.size(); zone_index++)
|
||||
{
|
||||
if(zones[zone_index].matrix_map != NULL)
|
||||
{
|
||||
delete zones[zone_index].matrix_map;
|
||||
}
|
||||
}
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -309,14 +298,7 @@ void RGBController_AlienwareAW510K::SetupZones()
|
||||
|
||||
if(zone_types[zone_idx] == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 7;
|
||||
new_zone.matrix_map->width = 24;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.matrix_map = NULL;
|
||||
new_zone.matrix_map.Set(7, 24, (unsigned int *)&matrix_map);
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
@@ -335,13 +317,6 @@ void RGBController_AlienwareAW510K::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<SelectedKeys> frame_buf_keys;
|
||||
@@ -395,21 +370,21 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
std::copy(new_colors.begin(), new_colors.end(),current_colors.begin());
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
controller->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::UpdateSingleLED(int led)
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
controller->UpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
controller->DeviceUpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateMode()
|
||||
{
|
||||
if(active_mode == 0xFFFF)
|
||||
{
|
||||
UpdateLEDs();
|
||||
UpdateLEDsInternal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
Logo.leds_min = 1;
|
||||
Logo.leds_max = 1;
|
||||
Logo.leds_count = 1;
|
||||
Logo.matrix_map = NULL;
|
||||
zones.push_back(Logo);
|
||||
|
||||
led Logo_LED;
|
||||
@@ -71,7 +70,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
Number.leds_min = 1;
|
||||
Number.leds_max = 1;
|
||||
Number.leds_count = 1;
|
||||
Number.matrix_map = NULL;
|
||||
zones.push_back(Number);
|
||||
|
||||
led Number_LED;
|
||||
@@ -85,7 +83,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
PowerButton.leds_min = 1;
|
||||
PowerButton.leds_max = 1;
|
||||
PowerButton.leds_count = 1;
|
||||
PowerButton.matrix_map = NULL;
|
||||
zones.push_back(PowerButton);
|
||||
|
||||
led PowerButton_LED;
|
||||
@@ -96,10 +93,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::DeviceUpdateLEDs()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -118,17 +111,17 @@ void RGBController_AlienwareAW3423DWF::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
UpdateSingleLED(led_idx);
|
||||
DeviceUpdateSingleLED(led_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AlienwareAW3423DWF::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::UpdateSingleLED(int led)
|
||||
void RGBController_AlienwareAW3423DWF::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
|
||||
@@ -21,11 +21,10 @@ public:
|
||||
~RGBController_AlienwareAW3423DWF();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
Logo.leds_min = 1;
|
||||
Logo.leds_max = 1;
|
||||
Logo.leds_count = 1;
|
||||
Logo.matrix_map = NULL;
|
||||
zones.push_back(Logo);
|
||||
|
||||
led Logo_LED;
|
||||
@@ -71,7 +70,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
Number.leds_min = 1;
|
||||
Number.leds_max = 1;
|
||||
Number.leds_count = 1;
|
||||
Number.matrix_map = NULL;
|
||||
zones.push_back(Number);
|
||||
|
||||
led Number_LED;
|
||||
@@ -85,7 +83,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
PowerButton.leds_min = 1;
|
||||
PowerButton.leds_max = 1;
|
||||
PowerButton.leds_count = 1;
|
||||
PowerButton.matrix_map = NULL;
|
||||
zones.push_back(PowerButton);
|
||||
|
||||
led PowerButton_LED;
|
||||
@@ -96,11 +93,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::DeviceUpdateLEDs()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -119,17 +111,17 @@ void RGBController_AlienwareMonitor::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
UpdateSingleLED(led_idx);
|
||||
DeviceUpdateSingleLED(led_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AlienwareMonitor::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::UpdateSingleLED(int led)
|
||||
void RGBController_AlienwareMonitor::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
|
||||
@@ -21,11 +21,10 @@ RGBController_AlienwareMonitor(AlienwareMonitorController* controller_ptr);
|
||||
~RGBController_AlienwareMonitor();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -164,14 +164,7 @@ void RGBController_AnnePro2::SetupZones()
|
||||
|
||||
if(zone_types[zone_idx] == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 5;
|
||||
new_zone.matrix_map->width = 14;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.matrix_map = NULL;
|
||||
new_zone.matrix_map.Set(5, 14, (unsigned int *)&matrix_map);
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
@@ -190,13 +183,6 @@ void RGBController_AnnePro2::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::DeviceUpdateLEDs()
|
||||
{
|
||||
const unsigned char frame_buf_length = LED_REAL_COUNT * 3;
|
||||
@@ -228,12 +214,12 @@ void RGBController_AnnePro2::DeviceUpdateLEDs()
|
||||
controller->SendDirect(frame_buf_length, frame_buf);
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AnnePro2::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AnnePro2::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AnnePro2::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -21,11 +21,10 @@ public:
|
||||
~RGBController_AnnePro2();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ void RGBController_Arctic::SetupZones()
|
||||
LedZone.leds_count = 1;
|
||||
LedZone.leds_min = 1;
|
||||
LedZone.leds_max = 1;
|
||||
LedZone.matrix_map = nullptr;
|
||||
|
||||
led Led;
|
||||
Led.name = LedZone.name + " LED";
|
||||
@@ -83,13 +82,6 @@ void RGBController_Arctic::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_Arctic::ResizeZone(int /* zone */, int /* new_size */)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_Arctic::DeviceUpdateLEDs()
|
||||
{
|
||||
last_update_time = std::chrono::steady_clock::now();
|
||||
@@ -97,12 +89,12 @@ void RGBController_Arctic::DeviceUpdateLEDs()
|
||||
controller->SetChannels(colors);
|
||||
}
|
||||
|
||||
void RGBController_Arctic::UpdateZoneLEDs(int /* zone */)
|
||||
void RGBController_Arctic::DeviceUpdateZoneLEDs(int /* zone */)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_Arctic::UpdateSingleLED(int /* led */)
|
||||
void RGBController_Arctic::DeviceUpdateSingleLED(int /* led */)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
@@ -123,7 +115,7 @@ void RGBController_Arctic::KeepaliveThreadFunction()
|
||||
sleep_time = ARCTIC_KEEPALIVE_PERIOD - (std::chrono::steady_clock::now() - last_update_time);
|
||||
if(sleep_time <= ARCTIC_SLEEP_THRESHOLD)
|
||||
{
|
||||
UpdateLEDs(); // Already protected thru a device update thread
|
||||
UpdateLEDsInternal(); // Already protected thru a device update thread
|
||||
std::this_thread::sleep_for(ARCTIC_KEEPALIVE_PERIOD);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -25,11 +25,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -137,7 +137,6 @@ void RGBController_Areson::SetupZones()
|
||||
new_zone.leds_min = 1;
|
||||
new_zone.leds_max = 1;
|
||||
new_zone.leds_count = 1;
|
||||
new_zone.matrix_map = nullptr;
|
||||
|
||||
zones.emplace_back(new_zone);
|
||||
|
||||
@@ -150,24 +149,17 @@ void RGBController_Areson::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_Areson::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_Areson::DeviceUpdateLEDs()
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_Areson::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_Areson::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_Areson::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_Areson::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
@@ -21,11 +21,10 @@ public:
|
||||
~RGBController_Areson();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -186,7 +186,6 @@ void RGBController_AuraCore::SetupZones()
|
||||
auraZone.leds_min = 4;
|
||||
auraZone.leds_max = 4;
|
||||
auraZone.leds_count = 4;
|
||||
auraZone.matrix_map = NULL;
|
||||
}
|
||||
else if(controller->aura_device.aura_type == AURA_CORE_DEVICE_GA15DH)
|
||||
{
|
||||
@@ -195,7 +194,6 @@ void RGBController_AuraCore::SetupZones()
|
||||
auraZone.leds_min = 20;
|
||||
auraZone.leds_max = 20;
|
||||
auraZone.leds_count = 20;
|
||||
auraZone.matrix_map = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -215,19 +213,12 @@ void RGBController_AuraCore::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::DeviceUpdateLEDs()
|
||||
{
|
||||
UpdateZoneLEDs(0);
|
||||
DeviceUpdateZoneLEDs(0);
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AuraCore::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
if(modes[active_mode].value == AURA_CORE_MODE_DIRECT)
|
||||
{
|
||||
@@ -256,16 +247,16 @@ void RGBController_AuraCore::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
UpdateSingleLED(led_idx);
|
||||
DeviceUpdateSingleLED(led_idx);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateSingleLED(0);
|
||||
DeviceUpdateSingleLED(0);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::UpdateSingleLED(int led)
|
||||
void RGBController_AuraCore::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned char speed = 0xFF;
|
||||
unsigned char red = 0;
|
||||
|
||||
@@ -24,11 +24,9 @@ public:
|
||||
void SetupGA15DH();
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ void DetectAsusAuraCoreControllers(hid_device_info* info, const std::string& /*n
|
||||
AuraCoreController* controller = new AuraCoreController(dev, info->path);
|
||||
RGBController_AuraCore* rgb_controller = new RGBController_AuraCore(controller);
|
||||
|
||||
if(rgb_controller->type != DEVICE_TYPE_UNKNOWN)
|
||||
if(rgb_controller->GetDeviceType() != DEVICE_TYPE_UNKNOWN)
|
||||
{
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ RGBController_AsusAuraCoreLaptop::RGBController_AsusAuraCoreLaptop(AsusAuraCoreL
|
||||
|
||||
SetupZones();
|
||||
|
||||
SetMode(active_mode);
|
||||
SetActiveMode(active_mode);
|
||||
}
|
||||
|
||||
RGBController_AsusAuraCoreLaptop::~RGBController_AsusAuraCoreLaptop()
|
||||
@@ -339,18 +339,7 @@ void RGBController_AsusAuraCoreLaptop::SetupZones()
|
||||
else
|
||||
{
|
||||
new_zone.type = ZONE_TYPE_MATRIX;
|
||||
matrix_map_type * new_map = new matrix_map_type;
|
||||
new_zone.matrix_map = new_map;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Trusting the layout handed to the KLM is correct use the |
|
||||
| row & column counts to set the matrix height & width |
|
||||
\*---------------------------------------------------------*/
|
||||
new_map->height = new_kb.GetRowCount();
|
||||
new_map->width = new_kb.GetColumnCount();
|
||||
new_map->map = new unsigned int[new_map->height * new_map->width];
|
||||
|
||||
new_kb.GetKeyMap(new_map->map, KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
new_zone.matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -398,13 +387,6 @@ void RGBController_AsusAuraCoreLaptop::SetupZones()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraCoreLaptop::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraCoreLaptop::DeviceUpdateLEDs()
|
||||
{
|
||||
for(size_t i = 85; i < leds.size(); i++)
|
||||
@@ -422,12 +404,12 @@ void RGBController_AsusAuraCoreLaptop::DeviceUpdateLEDs()
|
||||
controller->SetLedsDirect(buffer_map);
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraCoreLaptop::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AsusAuraCoreLaptop::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
controller->SetLedsDirect(buffer_map);
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraCoreLaptop::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AsusAuraCoreLaptop::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
controller->SetLedsDirect(buffer_map);
|
||||
}
|
||||
|
||||
@@ -23,11 +23,10 @@ public:
|
||||
~RGBController_AsusAuraCoreLaptop();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -138,7 +138,6 @@ void RGBController_AuraGPU::SetupZones()
|
||||
aura_gpu_zone.leds_min = 1;
|
||||
aura_gpu_zone.leds_max = 1;
|
||||
aura_gpu_zone.leds_count = 1;
|
||||
aura_gpu_zone.matrix_map = NULL;
|
||||
zones.push_back(aura_gpu_zone);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -160,13 +159,6 @@ void RGBController_AuraGPU::SetupZones()
|
||||
colors[0] = ToRGBColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::DeviceUpdateLEDs()
|
||||
{
|
||||
for(std::size_t led = 0; led < colors.size(); led++)
|
||||
@@ -177,18 +169,18 @@ void RGBController_AuraGPU::DeviceUpdateLEDs()
|
||||
|
||||
controller->SetLEDColors(red, grn, blu);
|
||||
}
|
||||
if (controller->SaveOnlyApplies() && GetMode() != 0)
|
||||
if (controller->SaveOnlyApplies() && GetActiveMode() != 0)
|
||||
{
|
||||
controller->Save();
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AuraGPU::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AuraGPU::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -124,7 +124,6 @@ void RGBController_AuraHeadsetStand::SetupZones()
|
||||
underglow_zone.leds_min = 17;
|
||||
underglow_zone.leds_max = 17;
|
||||
underglow_zone.leds_count = 17;
|
||||
underglow_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(underglow_zone);
|
||||
|
||||
@@ -144,7 +143,6 @@ void RGBController_AuraHeadsetStand::SetupZones()
|
||||
logo_zone.leds_min = 1;
|
||||
logo_zone.leds_max = 1;
|
||||
logo_zone.leds_count = 1;
|
||||
logo_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
@@ -157,24 +155,17 @@ void RGBController_AuraHeadsetStand::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraHeadsetStand::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraHeadsetStand::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->UpdateLeds(std::vector<RGBColor>(colors));
|
||||
}
|
||||
|
||||
void RGBController_AuraHeadsetStand::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AuraHeadsetStand::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraHeadsetStand::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AuraHeadsetStand::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -32,11 +32,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -380,14 +380,6 @@ RGBController_AuraKeyboard::RGBController_AuraKeyboard(AuraKeyboardController* c
|
||||
|
||||
RGBController_AuraKeyboard::~RGBController_AuraKeyboard()
|
||||
{
|
||||
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
if(zones[zone_idx].type == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
delete zones[zone_idx].matrix_map;
|
||||
}
|
||||
}
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -407,7 +399,7 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
\*-----------------------------------------------------*/
|
||||
case SCOPE_LAYOUT:
|
||||
led_names = default_led_names;
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 106, new matrix_map_type{6, 22, (unsigned int *)&scope_matrix_map}});
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 106, new matrix_map_type(6, 22, (unsigned int *)&scope_matrix_map)});
|
||||
|
||||
led_names.insert(led_names.begin() + 7, {KEY_EN_LEFT_WINDOWS, 0x15});
|
||||
led_names.insert(led_names.begin() + 12, {KEY_EN_LEFT_ALT, 0x1D});
|
||||
@@ -415,7 +407,7 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
|
||||
case SCOPE_RX_LAYOUT:
|
||||
led_names = default_led_names;
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 106, new matrix_map_type{6, 22, (unsigned int *)&scope_matrix_map}});
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 106, new matrix_map_type(6, 22, (unsigned int *)&scope_matrix_map)});
|
||||
led_zones.push_back({"Logo", ZONE_TYPE_SINGLE, 1, NULL});
|
||||
|
||||
led_names.insert(led_names.begin() + 7, {KEY_EN_LEFT_WINDOWS, 0x15});
|
||||
@@ -425,7 +417,7 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
|
||||
case SCOPE_TKL_LAYOUT:
|
||||
led_names = default_tkl_led_names;
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 86, new matrix_map_type{6, 18, (unsigned int *)&scope_tkl_matrix_map}});
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 86, new matrix_map_type(6, 18, (unsigned int *)&scope_tkl_matrix_map)});
|
||||
led_zones.push_back({"Logo", ZONE_TYPE_LINEAR, 2, NULL});
|
||||
led_zones.push_back({"Underglow", ZONE_TYPE_LINEAR, 26, NULL});
|
||||
|
||||
@@ -435,7 +427,7 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
|
||||
case FLARE_LAYOUT:
|
||||
led_names = default_led_names;
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 106, new matrix_map_type{6, 22, (unsigned int *)&flare_matrix_map}});
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 106, new matrix_map_type(6, 22, (unsigned int *)&flare_matrix_map)});
|
||||
led_zones.push_back({"Logo", ZONE_TYPE_SINGLE, 1, NULL});
|
||||
led_zones.push_back({"Underglow", ZONE_TYPE_SINGLE, 2, NULL});
|
||||
|
||||
@@ -449,7 +441,7 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
|
||||
case FALCHION_LAYOUT:
|
||||
led_names = default_65pct_led_names;
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 68, new matrix_map_type{5, 16, (unsigned int *)&falchion_matrix_map}});
|
||||
led_zones.push_back({ZONE_EN_KEYBOARD, ZONE_TYPE_MATRIX, 68, new matrix_map_type(5, 16, (unsigned int *)&falchion_matrix_map)});
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -463,13 +455,9 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
new_zone.leds_max = led_zones[zone_idx].size;
|
||||
new_zone.leds_count = led_zones[zone_idx].size;
|
||||
|
||||
if(led_zones[zone_idx].type == ZONE_TYPE_MATRIX)
|
||||
if(led_zones[zone_idx].type == ZONE_TYPE_MATRIX && led_zones[zone_idx].matrix != NULL)
|
||||
{
|
||||
new_zone.matrix_map = led_zones[zone_idx].matrix;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.matrix_map = NULL;
|
||||
new_zone.matrix_map = *led_zones[zone_idx].matrix;
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
@@ -489,13 +477,6 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<unsigned char> frame_buf;
|
||||
@@ -519,12 +500,12 @@ void RGBController_AuraKeyboard::DeviceUpdateLEDs()
|
||||
controller->SendDirect((unsigned char)leds.size(), frame_buf.data());
|
||||
}
|
||||
|
||||
void RGBController_AuraKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AuraKeyboard::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraKeyboard::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AuraKeyboard::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -45,11 +45,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ void RGBController_AuraMonitor::SetupZones()
|
||||
underglow_zone.leds_min = 3;
|
||||
underglow_zone.leds_max = 3;
|
||||
underglow_zone.leds_count = 3;
|
||||
underglow_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(underglow_zone);
|
||||
|
||||
@@ -73,13 +72,6 @@ void RGBController_AuraMonitor::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->BeginUpdate();
|
||||
@@ -96,12 +88,12 @@ void RGBController_AuraMonitor::DeviceUpdateLEDs()
|
||||
controller->ApplyChanges();
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AuraMonitor::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraMonitor::UpdateSingleLED(int led)
|
||||
void RGBController_AuraMonitor::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
controller->BeginUpdate();
|
||||
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -199,7 +199,6 @@ void RGBController_AuraMouse::SetupZones()
|
||||
mouse_zone.leds_min = 1;
|
||||
mouse_zone.leds_max = 1;
|
||||
mouse_zone.leds_count = 1;
|
||||
mouse_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(mouse_zone);
|
||||
|
||||
@@ -214,11 +213,6 @@ void RGBController_AuraMouse::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::DeviceUpdateLEDs()
|
||||
{
|
||||
if(modes[active_mode].value == AURA_MOUSE_MODE_DIRECT)
|
||||
@@ -229,17 +223,17 @@ void RGBController_AuraMouse::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int zone_index = 0; zone_index < zones.size(); zone_index++)
|
||||
{
|
||||
UpdateSingleLED(zone_index);
|
||||
DeviceUpdateSingleLED(zone_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AuraMouse::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::UpdateSingleLED(int led)
|
||||
void RGBController_AuraMouse::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
if(modes[active_mode].value == AURA_MOUSE_MODE_DIRECT)
|
||||
{
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -133,7 +133,6 @@ void RGBController_AsusROGSpatha::SetupZones()
|
||||
spatha_zone.leds_min = 1;
|
||||
spatha_zone.leds_max = 1;
|
||||
spatha_zone.leds_count = 1;
|
||||
spatha_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(spatha_zone);
|
||||
|
||||
@@ -148,11 +147,6 @@ void RGBController_AsusROGSpatha::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusROGSpatha::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AsusROGSpatha::DeviceUpdateLEDs()
|
||||
{
|
||||
if(modes[active_mode].value == ASUS_ROG_SPATHA_MODE_DIRECT)
|
||||
@@ -161,13 +155,13 @@ void RGBController_AsusROGSpatha::DeviceUpdateLEDs()
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateSingleLED(0);
|
||||
UpdateSingleLED(1);
|
||||
UpdateSingleLED(2);
|
||||
DeviceUpdateSingleLED(0);
|
||||
DeviceUpdateSingleLED(1);
|
||||
DeviceUpdateSingleLED(2);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AsusROGSpatha::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AsusROGSpatha::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(modes[active_mode].value == ASUS_ROG_SPATHA_MODE_DIRECT)
|
||||
{
|
||||
@@ -175,11 +169,11 @@ void RGBController_AsusROGSpatha::UpdateZoneLEDs(int zone)
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateSingleLED(zone);
|
||||
DeviceUpdateSingleLED(zone);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AsusROGSpatha::UpdateSingleLED(int led)
|
||||
void RGBController_AsusROGSpatha::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
if(modes[active_mode].value == ASUS_ROG_SPATHA_MODE_DIRECT)
|
||||
{
|
||||
|
||||
@@ -40,11 +40,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -91,7 +91,6 @@ void RGBController_AsusROGStrixEvolve::SetupZones()
|
||||
mouse_zone.leds_min = 1;
|
||||
mouse_zone.leds_max = 1;
|
||||
mouse_zone.leds_count = 1;
|
||||
mouse_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(mouse_zone);
|
||||
|
||||
@@ -105,22 +104,17 @@ void RGBController_AsusROGStrixEvolve::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixEvolve::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixEvolve::DeviceUpdateLEDs()
|
||||
{
|
||||
UpdateSingleLED(0);
|
||||
DeviceUpdateSingleLED(0);
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixEvolve::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AsusROGStrixEvolve::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
UpdateSingleLED(zone);
|
||||
DeviceUpdateSingleLED(zone);
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixEvolve::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AsusROGStrixEvolve::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
controller->SendUpdate(0x1C, RGBGetRValue(colors[0]));
|
||||
controller->SendUpdate(0x1D, RGBGetGValue(colors[0]));
|
||||
|
||||
@@ -37,11 +37,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -194,7 +194,6 @@ void RGBController_AuraMousemat::SetupZones()
|
||||
mousemat_zone.leds_min = 15;
|
||||
mousemat_zone.leds_max = 15;
|
||||
mousemat_zone.leds_count = 15;
|
||||
mousemat_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(mousemat_zone);
|
||||
|
||||
@@ -210,24 +209,17 @@ void RGBController_AuraMousemat::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->UpdateLeds(std::vector<RGBColor>(colors));
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AuraMousemat::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraMousemat::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AuraMousemat::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -40,11 +40,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -171,29 +171,22 @@ void RGBController_AsusAuraRyuoAIO::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraRyuoAIO::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraRyuoAIO::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
UpdateZoneLEDs(zone_idx);
|
||||
DeviceUpdateZoneLEDs(zone_idx);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraRyuoAIO::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AsusAuraRyuoAIO::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
controller->SetLedsDirect(zones[zone].colors, zones[zone].leds_count);
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraRyuoAIO::UpdateSingleLED(int led)
|
||||
void RGBController_AsusAuraRyuoAIO::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(GetLED_Zone(led));
|
||||
DeviceUpdateZoneLEDs(GetLED_Zone(led));
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraRyuoAIO::DeviceUpdateMode()
|
||||
|
||||
@@ -24,11 +24,10 @@ public:
|
||||
~RGBController_AsusAuraRyuoAIO();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -511,10 +511,7 @@ void RGBController_AuraTUFKeyboard::SetupZones()
|
||||
keyboard_zone.leds_min = keyboard[layout].size;
|
||||
keyboard_zone.leds_max = keyboard[layout].size;
|
||||
keyboard_zone.leds_count = keyboard[layout].size;
|
||||
keyboard_zone.matrix_map = new matrix_map_type;
|
||||
keyboard_zone.matrix_map->height = keyboard[layout].rows;
|
||||
keyboard_zone.matrix_map->width = keyboard[layout].cols;
|
||||
keyboard_zone.matrix_map->map = keyboard[layout].matrix_map;
|
||||
keyboard_zone.matrix_map.Set(keyboard[layout].rows, keyboard[layout].cols, keyboard[layout].matrix_map);
|
||||
zones.push_back(keyboard_zone);
|
||||
|
||||
for(int led_id = 0; led_id < keyboard[layout].size; led_id++)
|
||||
@@ -533,11 +530,6 @@ void RGBController_AuraTUFKeyboard::SetupZones()
|
||||
DeviceUpdateMode();
|
||||
}
|
||||
|
||||
void RGBController_AuraTUFKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AuraTUFKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<led_color> led_color_list = {};
|
||||
@@ -550,12 +542,12 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateLEDs()
|
||||
controller->UpdateLeds(led_color_list);
|
||||
}
|
||||
|
||||
void RGBController_AuraTUFKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AuraTUFKeyboard::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AuraTUFKeyboard::UpdateSingleLED(int led)
|
||||
void RGBController_AuraTUFKeyboard::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
if(!controller->is_per_led_keyboard)
|
||||
{
|
||||
|
||||
@@ -43,11 +43,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -195,14 +195,12 @@ void RGBController_AuraUSB::SetupZones()
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
zones[channel_idx].matrix_map = NULL;
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::ResizeZone(int zone, int new_size)
|
||||
void RGBController_AuraUSB::DeviceResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
@@ -229,7 +227,7 @@ void RGBController_AuraUSB::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AuraUSB::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
if(!initializedMode)
|
||||
{
|
||||
@@ -239,7 +237,7 @@ void RGBController_AuraUSB::UpdateZoneLEDs(int zone)
|
||||
controller->SetChannelLEDs(zone, zones[zone].colors, zones[zone].leds_count);
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::UpdateSingleLED(int led)
|
||||
void RGBController_AuraUSB::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
if(!initializedMode)
|
||||
{
|
||||
|
||||
@@ -24,11 +24,11 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -129,7 +129,6 @@ void RGBController_AsusROGAlly::SetupZones()
|
||||
left_stick_zone.leds_min = 2;
|
||||
left_stick_zone.leds_max = 2;
|
||||
left_stick_zone.leds_count = 2;
|
||||
left_stick_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(left_stick_zone);
|
||||
|
||||
@@ -149,7 +148,6 @@ void RGBController_AsusROGAlly::SetupZones()
|
||||
right_stick_zone.leds_min = 2;
|
||||
right_stick_zone.leds_max = 2;
|
||||
right_stick_zone.leds_count = 2;
|
||||
right_stick_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(right_stick_zone);
|
||||
|
||||
@@ -165,13 +163,6 @@ void RGBController_AsusROGAlly::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusROGAlly::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AsusROGAlly::DeviceUpdateLEDs()
|
||||
{
|
||||
if(modes[active_mode].value == ROG_ALLY_MODE_DIRECT)
|
||||
@@ -180,12 +171,12 @@ void RGBController_AsusROGAlly::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AsusROGAlly::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AsusROGAlly::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AsusROGAlly::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AsusROGAlly::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -172,29 +172,22 @@ void RGBController_AsusROGStrixLC::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixLC::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixLC::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
UpdateZoneLEDs(zone_idx);
|
||||
DeviceUpdateZoneLEDs(zone_idx);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixLC::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AsusROGStrixLC::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
controller->SetLedsDirect( zones[zone].colors, zones[zone].leds_count );
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixLC::UpdateSingleLED(int led)
|
||||
void RGBController_AsusROGStrixLC::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(GetLED_Zone(led));
|
||||
DeviceUpdateZoneLEDs(GetLED_Zone(led));
|
||||
}
|
||||
|
||||
void RGBController_AsusROGStrixLC::DeviceUpdateMode()
|
||||
|
||||
@@ -23,11 +23,10 @@ public:
|
||||
~RGBController_AsusROGStrixLC();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
private:
|
||||
|
||||
@@ -296,10 +296,7 @@ void RGBController_AsusCerberusKeyboard::SetupZones()
|
||||
keyboard.leds_min = zone_size;
|
||||
keyboard.leds_max = zone_size;
|
||||
keyboard.leds_count = zone_size;
|
||||
keyboard.matrix_map = new matrix_map_type;
|
||||
keyboard.matrix_map->height = 6;
|
||||
keyboard.matrix_map->width = 24;
|
||||
keyboard.matrix_map->map = *matrix_map;
|
||||
keyboard.matrix_map.Set(6, 24, *matrix_map);
|
||||
zones.push_back(keyboard);
|
||||
|
||||
for(int led_id = 0; led_id < zone_size; led_id++)
|
||||
@@ -314,11 +311,6 @@ void RGBController_AsusCerberusKeyboard::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusCerberusKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AsusCerberusKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
for(unsigned int i = 0; i < colors.size(); i++)
|
||||
@@ -332,12 +324,12 @@ void RGBController_AsusCerberusKeyboard::DeviceUpdateLEDs()
|
||||
controller->SendPerLEDColorEnd();
|
||||
}
|
||||
|
||||
void RGBController_AsusCerberusKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AsusCerberusKeyboard::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AsusCerberusKeyboard::UpdateSingleLED(int led)
|
||||
void RGBController_AsusCerberusKeyboard::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
uint8_t red = RGBGetRValue(colors[led]);
|
||||
uint8_t green = RGBGetGValue(colors[led]);
|
||||
|
||||
@@ -29,11 +29,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -176,27 +176,21 @@ void RGBController_AsusSagarisKeyboard::SetupZones()
|
||||
keyboard.leds_min = 1;
|
||||
keyboard.leds_max = 1;
|
||||
keyboard.leds_count = 1;
|
||||
keyboard.matrix_map = nullptr;
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusSagarisKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AsusSagarisKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AsusSagarisKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AsusSagarisKeyboard::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AsusSagarisKeyboard::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AsusSagarisKeyboard::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ void RGBController_StrixClaw::SetupZones()
|
||||
scroll_wheel_zone.leds_min = 1;
|
||||
scroll_wheel_zone.leds_max = 1;
|
||||
scroll_wheel_zone.leds_count = 1;
|
||||
scroll_wheel_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(scroll_wheel_zone);
|
||||
|
||||
@@ -83,7 +82,6 @@ void RGBController_StrixClaw::SetupZones()
|
||||
logo_zone.leds_min = 1;
|
||||
logo_zone.leds_max = 1;
|
||||
logo_zone.leds_count = 1;
|
||||
logo_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
@@ -97,22 +95,17 @@ void RGBController_StrixClaw::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_StrixClaw::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_StrixClaw::DeviceUpdateLEDs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_StrixClaw::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_StrixClaw::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_StrixClaw::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_StrixClaw::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -60,8 +60,6 @@ void RGBController_AsusMonitor::SetupZones()
|
||||
new_zone.leds_max = number_of_leds;
|
||||
new_zone.leds_count = number_of_leds;
|
||||
|
||||
new_zone.matrix_map = nullptr;
|
||||
|
||||
zones.emplace_back(new_zone);
|
||||
|
||||
leds.resize(new_zone.leds_count);
|
||||
@@ -74,24 +72,17 @@ void RGBController_AsusMonitor::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusMonitor::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AsusMonitor::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->SetDirect(colors);
|
||||
}
|
||||
|
||||
void RGBController_AsusMonitor::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AsusMonitor::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AsusMonitor::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AsusMonitor::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -21,11 +21,10 @@ public:
|
||||
~RGBController_AsusMonitor();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -103,7 +103,6 @@ void RGBController_AsusTUFLaptopLinux::SetupZones()
|
||||
zones[0].leds_min = 1;
|
||||
zones[0].leds_max = 1;
|
||||
zones[0].leds_count = 1;
|
||||
zones[0].matrix_map = NULL;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LED |
|
||||
@@ -114,13 +113,6 @@ void RGBController_AsusTUFLaptopLinux::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusTUFLaptopLinux::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_AsusTUFLaptopLinux::DeviceUpdateLEDs()
|
||||
{
|
||||
uint8_t red = RGBGetRValue(colors[0]);
|
||||
@@ -143,12 +135,12 @@ void RGBController_AsusTUFLaptopLinux::DeviceUpdateLEDs()
|
||||
controller->SendBrightness(modes[active_mode].brightness);
|
||||
}
|
||||
|
||||
void RGBController_AsusTUFLaptopLinux::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AsusTUFLaptopLinux::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_AsusTUFLaptopLinux::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AsusTUFLaptopLinux::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -17,15 +17,13 @@ class RGBController_AsusTUFLaptopLinux : public RGBController
|
||||
public:
|
||||
RGBController_AsusTUFLaptopLinux(AsusTUFLaptopLinuxController* controller_ptr);
|
||||
|
||||
void SetupZones() override;
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size) override;
|
||||
void DeviceUpdateLEDs();
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateLEDs() override;
|
||||
void UpdateZoneLEDs(int zone) override;
|
||||
void UpdateSingleLED(int led) override;
|
||||
|
||||
void DeviceUpdateMode() override;
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AsusTUFLaptopLinuxController* controller;
|
||||
|
||||
@@ -101,7 +101,6 @@ void RGBController_AsusTUFLaptopWMI::SetupZones()
|
||||
new_zone->leds_min = 1;
|
||||
new_zone->leds_max = 1;
|
||||
new_zone->leds_count = 1;
|
||||
new_zone->matrix_map = NULL;
|
||||
|
||||
new_led->name = "Keyboard Backlight LED";
|
||||
|
||||
@@ -111,13 +110,6 @@ void RGBController_AsusTUFLaptopWMI::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_AsusTUFLaptopWMI::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Break this function off since we have to call save in the |
|
||||
same operation as doing everything else. |
|
||||
@@ -148,12 +140,12 @@ void RGBController_AsusTUFLaptopWMI::DeviceUpdateLEDs()
|
||||
ControllerSetMode(false);
|
||||
}
|
||||
|
||||
void RGBController_AsusTUFLaptopWMI::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_AsusTUFLaptopWMI::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
ControllerSetMode(false);
|
||||
}
|
||||
|
||||
void RGBController_AsusTUFLaptopWMI::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_AsusTUFLaptopWMI::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
ControllerSetMode(false);
|
||||
}
|
||||
|
||||
@@ -20,11 +20,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
@@ -58,13 +58,12 @@ void RGBController_BlinkyTape::SetupZones()
|
||||
led_zone.leds_min = 0;
|
||||
led_zone.leds_max = 512;
|
||||
led_zone.leds_count = 0;
|
||||
led_zone.matrix_map = NULL;
|
||||
zones.push_back(led_zone);
|
||||
|
||||
ResizeZone(0, led_zone.leds_count);
|
||||
DeviceResizeZone(0, led_zone.leds_count);
|
||||
}
|
||||
|
||||
void RGBController_BlinkyTape::ResizeZone(int zone, int new_size)
|
||||
void RGBController_BlinkyTape::DeviceResizeZone(int zone, int new_size)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Explicitly cast these to avoid compiler warnings |
|
||||
@@ -130,12 +129,12 @@ void RGBController_BlinkyTape::DeviceUpdateLEDs()
|
||||
controller->SetLEDs(colors);
|
||||
}
|
||||
|
||||
void RGBController_BlinkyTape::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_BlinkyTape::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
controller->SetLEDs(colors);
|
||||
}
|
||||
|
||||
void RGBController_BlinkyTape::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_BlinkyTape::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
controller->SetLEDs(colors);
|
||||
}
|
||||
|
||||
@@ -23,11 +23,11 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
void DeviceResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -312,17 +312,6 @@ RGBController_CherryKeyboard::RGBController_CherryKeyboard(CherryKeyboardControl
|
||||
|
||||
RGBController_CherryKeyboard::~RGBController_CherryKeyboard()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Delete the matrix map |
|
||||
\*---------------------------------------------------------*/
|
||||
for(unsigned int zone_index = 0; zone_index < zones.size(); zone_index++)
|
||||
{
|
||||
if(zones[zone_index].matrix_map != NULL)
|
||||
{
|
||||
delete zones[zone_index].matrix_map;
|
||||
}
|
||||
}
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -335,10 +324,7 @@ void RGBController_CherryKeyboard::SetupZones()
|
||||
new_zone.leds_min = CHERRY_MATRIX_CELL_COUNT;
|
||||
new_zone.leds_max = CHERRY_MATRIX_CELL_COUNT;
|
||||
new_zone.leds_count = CHERRY_MATRIX_CELL_COUNT;
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = CHERRY_MATRIX_MAP_HEIGHT;
|
||||
new_zone.matrix_map->width = CHERRY_MATRIX_MAP_WIDTH;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
new_zone.matrix_map.Set(CHERRY_MATRIX_MAP_HEIGHT, CHERRY_MATRIX_MAP_WIDTH, (unsigned int *)&matrix_map);
|
||||
|
||||
zones.push_back(new_zone);
|
||||
|
||||
@@ -355,13 +341,6 @@ void RGBController_CherryKeyboard::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_CherryKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_CherryKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
unsigned char color_data[CUSTOM_COLOR_ARRAY_BYTE_COUNT];
|
||||
@@ -380,12 +359,12 @@ void RGBController_CherryKeyboard::DeviceUpdateLEDs()
|
||||
);
|
||||
}
|
||||
|
||||
void RGBController_CherryKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_CherryKeyboard::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_CherryKeyboard::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_CherryKeyboard::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -22,11 +22,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -34,10 +34,9 @@ void DetectClevoKeyboardControllers(hid_device_info* info, const std::string& na
|
||||
{
|
||||
ClevoKeyboardController* controller = new ClevoKeyboardController(dev, *info);
|
||||
RGBController_ClevoKeyboard* rgb_controller = new RGBController_ClevoKeyboard(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_PU("Clevo Keyboard", DetectClevoKeyboardControllers, 0x048D, 0x600B, 0xFF03, 0x01);
|
||||
REGISTER_HID_DETECTOR_PU("CLEVO Keyboard", DetectClevoKeyboardControllers, 0x048D, 0x600B, 0xFF03, 0x01);
|
||||
|
||||
@@ -199,15 +199,6 @@ RGBController_ClevoKeyboard::RGBController_ClevoKeyboard(ClevoKeyboardController
|
||||
|
||||
RGBController_ClevoKeyboard::~RGBController_ClevoKeyboard()
|
||||
{
|
||||
for(unsigned int zone_idx = 0; zone_idx < zones.size(); zone_idx++)
|
||||
{
|
||||
if(zones[zone_idx].matrix_map != nullptr)
|
||||
{
|
||||
delete[] zones[zone_idx].matrix_map->map;
|
||||
delete zones[zone_idx].matrix_map;
|
||||
}
|
||||
}
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
@@ -236,12 +227,7 @@ void RGBController_ClevoKeyboard::SetupZones()
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up the matrix map using KLM dimensions |
|
||||
\*---------------------------------------------------------*/
|
||||
keyboard_zone.matrix_map = new matrix_map_type;
|
||||
keyboard_zone.matrix_map->height = new_kb.GetRowCount();
|
||||
keyboard_zone.matrix_map->width = new_kb.GetColumnCount();
|
||||
keyboard_zone.matrix_map->map = new unsigned int[keyboard_zone.matrix_map->height * keyboard_zone.matrix_map->width];
|
||||
|
||||
new_kb.GetKeyMap(keyboard_zone.matrix_map->map, KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
keyboard_zone.matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
|
||||
zones.push_back(keyboard_zone);
|
||||
|
||||
@@ -274,13 +260,6 @@ void RGBController_ClevoKeyboard::SetupZones()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ClevoKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_ClevoKeyboard::DeviceUpdateLEDs()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -300,12 +279,12 @@ void RGBController_ClevoKeyboard::DeviceUpdateLEDs()
|
||||
controller->SendColors(color_data, modes[active_mode].brightness);
|
||||
}
|
||||
|
||||
void RGBController_ClevoKeyboard::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ClevoKeyboard::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ClevoKeyboard::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_ClevoKeyboard::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -23,11 +23,9 @@ public:
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ void DetectClevoLightbarControllers(hid_device_info* info, const std::string& na
|
||||
{
|
||||
ClevoLightbarController* controller = new ClevoLightbarController(dev, *info);
|
||||
RGBController_ClevoLightbar* rgb_controller = new RGBController_ClevoLightbar(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
|
||||
@@ -132,7 +132,6 @@ void RGBController_ClevoLightbar::SetupZones()
|
||||
lightbar_zone.leds_min = 1;
|
||||
lightbar_zone.leds_max = 1;
|
||||
lightbar_zone.leds_count = 1;
|
||||
lightbar_zone.matrix_map = NULL;
|
||||
zones.push_back(lightbar_zone);
|
||||
|
||||
led lightbar_led;
|
||||
@@ -142,13 +141,6 @@ void RGBController_ClevoLightbar::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ClevoLightbar::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_ClevoLightbar::DeviceUpdateLEDs()
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[0]);
|
||||
@@ -167,12 +159,12 @@ void RGBController_ClevoLightbar::DeviceUpdateLEDs()
|
||||
controller->SetMode(mode_value, brightness, speed);
|
||||
}
|
||||
|
||||
void RGBController_ClevoLightbar::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ClevoLightbar::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ClevoLightbar::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_ClevoLightbar::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -21,11 +21,10 @@ public:
|
||||
~RGBController_ClevoLightbar();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ void RGBController_ColorfulGPU::SetupZones()
|
||||
new_zone.leds_min = 1;
|
||||
new_zone.leds_max = 1;
|
||||
new_zone.leds_count = 1;
|
||||
new_zone.matrix_map = nullptr;
|
||||
|
||||
zones.emplace_back(new_zone);
|
||||
|
||||
@@ -66,22 +65,17 @@ void RGBController_ColorfulGPU::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ColorfulGPU::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_ColorfulGPU::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->SetDirect(colors[0]);
|
||||
}
|
||||
|
||||
void RGBController_ColorfulGPU::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ColorfulGPU::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ColorfulGPU::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_ColorfulGPU::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -19,11 +19,10 @@ public:
|
||||
~RGBController_ColorfulGPU();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
|
||||
@@ -100,7 +100,6 @@ void RGBController_ColorfulTuringGPU::SetupZones()
|
||||
new_zone.leds_min = 1;
|
||||
new_zone.leds_max = 1;
|
||||
new_zone.leds_count = 1;
|
||||
new_zone.matrix_map = nullptr;
|
||||
|
||||
zones.emplace_back(new_zone);
|
||||
|
||||
@@ -110,11 +109,6 @@ void RGBController_ColorfulTuringGPU::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_ColorfulTuringGPU::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_ColorfulTuringGPU::DeviceUpdateLEDs()
|
||||
{
|
||||
switch(modes[active_mode].value)
|
||||
@@ -139,12 +133,12 @@ void RGBController_ColorfulTuringGPU::DeviceUpdateLEDs()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_ColorfulTuringGPU::UpdateZoneLEDs(int /*zone*/)
|
||||
void RGBController_ColorfulTuringGPU::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_ColorfulTuringGPU::UpdateSingleLED(int /*led*/)
|
||||
void RGBController_ColorfulTuringGPU::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user