mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-19 03:56:26 -04:00
Update to add Apex Pro keyboard
This commit is contained in:
@@ -61,7 +61,7 @@ void SteelSeriesApexController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
unsigned char buf[643];
|
||||
int num_keys = 0;
|
||||
|
||||
if(proto_type == APEX_7)
|
||||
if(proto_type == APEX)
|
||||
{
|
||||
num_keys = sizeof(keys) / sizeof(*keys);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ void SteelSeriesApexController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
| Set up Direct packet |
|
||||
\*-----------------------------------------------------*/
|
||||
buf[0x00] = 0;
|
||||
buf[0x01] = APEX7_PACKET_ID_DIRECT;
|
||||
buf[0x01] = APEX_PACKET_ID_DIRECT;
|
||||
buf[0x02] = num_keys;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -87,7 +87,7 @@ void SteelSeriesApexController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
\*-----------------------------------------------------*/
|
||||
for(int i = 0; i < num_keys; i++)
|
||||
{
|
||||
if(proto_type == APEX_7)
|
||||
if(proto_type == APEX)
|
||||
{
|
||||
buf[(i*4)+3] = keys[i];
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
enum
|
||||
{
|
||||
APEX7_PACKET_ID_DIRECT = 0x3a, /* Direct mode */
|
||||
APEX_PACKET_ID_DIRECT = 0x3a, /* Direct mode */
|
||||
};
|
||||
|
||||
class SteelSeriesApexController
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
\*-----------------------------------------------------*/
|
||||
#define STEELSERIES_APEX_7_PID 0x1612
|
||||
#define STEELSERIES_APEX_7_TKL_PID 0x1618
|
||||
#define STEELSERIES_APEX_PRO_PID 0x1610
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -75,8 +76,9 @@ static const steelseries_device device_list[] =
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------*\
|
||||
| Keyboards |
|
||||
\*-----------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
{ STEELSERIES_VID, STEELSERIES_APEX_7_PID, 1, DEVICE_TYPE_KEYBOARD, APEX_7, "SteelSeries Apex 7" },
|
||||
{ STEELSERIES_VID, STEELSERIES_APEX_7_TKL_PID, 1, DEVICE_TYPE_KEYBOARD, APEX_7_TKL, "SteelSeries Apex 7 TKL" },
|
||||
{ STEELSERIES_VID, STEELSERIES_APEX_7_PID, 1, DEVICE_TYPE_KEYBOARD, APEX, "SteelSeries Apex 7" },
|
||||
{ STEELSERIES_VID, STEELSERIES_APEX_7_TKL_PID, 1, DEVICE_TYPE_KEYBOARD, APEX_TKL, "SteelSeries Apex 7 TKL" },
|
||||
{ STEELSERIES_VID, STEELSERIES_APEX_PRO_PID, 1, DEVICE_TYPE_KEYBOARD, APEX, "SteelSeries Apex Pro" },
|
||||
};
|
||||
|
||||
/******************************************************************************************\
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef enum
|
||||
RIVAL_100 = 0x00,
|
||||
RIVAL_300 = 0x01,
|
||||
SIBERIA_350 = 0x03,
|
||||
APEX_7 = 0x04,
|
||||
APEX_7_TKL = 0x05,
|
||||
APEX = 0x04,
|
||||
APEX_TKL = 0x05,
|
||||
} steelseries_type;
|
||||
|
||||
|
||||
@@ -263,9 +263,9 @@ RGBController_SteelSeriesApex::RGBController_SteelSeriesApex(SteelSeriesApexCont
|
||||
{
|
||||
steelseries = steelseries_ptr;
|
||||
|
||||
name = "SteelSeries Apex 7 RGB Keyboard";
|
||||
name = "SteelSeries Apex RGB Keyboard";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
description = "SteelSeries Apex 7 RGB Device";
|
||||
description = "SteelSeries Apex RGB Device";
|
||||
|
||||
proto_type = steelseries->proto_type;
|
||||
|
||||
@@ -297,7 +297,7 @@ void RGBController_SteelSeriesApex::SetupZones()
|
||||
new_zone.name = zone_names[zone_idx];
|
||||
new_zone.type = zone_types[zone_idx];
|
||||
|
||||
if(proto_type == APEX_7)
|
||||
if(proto_type == APEX)
|
||||
{
|
||||
new_zone.leds_min = zone_sizes[zone_idx];
|
||||
new_zone.leds_max = zone_sizes[zone_idx];
|
||||
@@ -314,7 +314,7 @@ void RGBController_SteelSeriesApex::SetupZones()
|
||||
{
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 6;
|
||||
if(proto_type == APEX_7)
|
||||
if(proto_type == APEX)
|
||||
{
|
||||
new_zone.matrix_map->width = 23;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
@@ -332,7 +332,7 @@ void RGBController_SteelSeriesApex::SetupZones()
|
||||
|
||||
zones.push_back(new_zone);
|
||||
|
||||
if(proto_type == APEX_7)
|
||||
if(proto_type == APEX)
|
||||
{
|
||||
total_led_count += zone_sizes[zone_idx];
|
||||
}
|
||||
@@ -345,7 +345,7 @@ void RGBController_SteelSeriesApex::SetupZones()
|
||||
for(unsigned int led_idx = 0; led_idx < total_led_count; led_idx++)
|
||||
{
|
||||
led new_led;
|
||||
if(proto_type == APEX_7)
|
||||
if(proto_type == APEX)
|
||||
{
|
||||
new_led.name = led_names[led_idx];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user