Skip to content

Commit 09fae4d

Browse files
Remove unused zones from Alloy FPS controller
1 parent 98d7224 commit 09fae4d

File tree

2 files changed

+5
-51
lines changed

2 files changed

+5
-51
lines changed

Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ static unsigned int keys[] = {0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x
2323
0x7F, 0x81, 0x84, 0x85, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x91,
2424
0x94, 0x95 };
2525

26-
static unsigned int extended_red[] = {0x08, 0x48, 0x88, 0x09, 0x89, 0x0A, 0x8A, 0x0B, 0x8B, 0x0C, 0x8C, 0x0D, 0x8D, 0x0E, 0x8F, 0x8E, 0x0F, 0x4F, 0x92, 0x13, 0x93, 0x12 };
27-
static unsigned int extended_grn[] = {0x29, 0x28, 0x78, 0x19, 0x79, 0x1A, 0x7A, 0x1B, 0x7B, 0x1C, 0x7C, 0x1D, 0x7D, 0x1E, 0x6E, 0x7E, 0x1F, 0x6F, 0x82, 0x23, 0x83, 0x22 };
28-
static unsigned int extended_blu[] = {0x39, 0x38, 0x68, 0x3A, 0x69, 0x2A, 0x6A, 0x2B, 0x6B, 0x2C, 0x6C, 0x2D, 0x6D, 0x2E, 0x5E, 0x5D, 0x2F, 0x5F, 0x72, 0x33, 0x73, 0x32 };
29-
3026
HyperXAlloyFPSController::HyperXAlloyFPSController(hid_device* dev_handle, const char* path)
3127
{
3228
dev = dev_handle;
@@ -137,13 +133,6 @@ void HyperXAlloyFPSController::SetLEDsDirect(std::vector<RGBColor> colors)
137133
blu_color_data[i] = RGBGetBValue(colors[i]);
138134
}
139135

140-
for(std::size_t i = 0; i < 22; i++)
141-
{
142-
ext_color_data[extended_red[i]] = RGBGetRValue(colors[i + 106]);
143-
ext_color_data[extended_grn[i]] = RGBGetGValue(colors[i + 106]);
144-
ext_color_data[extended_blu[i]] = RGBGetBValue(colors[i + 106]);
145-
}
146-
147136
SendDirect
148137
(
149138
HYPERX_ALLOY_FPS_COLOR_CHANNEL_RED,
@@ -188,13 +177,6 @@ void HyperXAlloyFPSController::SetLEDs(std::vector<RGBColor> colors)
188177
blu_color_data[i] = RGBGetBValue(colors[i]);
189178
}
190179

191-
for(std::size_t i = 0; i < 22; i++)
192-
{
193-
ext_color_data[extended_red[i]] = RGBGetRValue(colors[i + 106]);
194-
ext_color_data[extended_grn[i]] = RGBGetGValue(colors[i + 106]);
195-
ext_color_data[extended_blu[i]] = RGBGetBValue(colors[i + 106]);
196-
}
197-
198180
SendColor
199181
(
200182
0x01,

Controllers/HyperXKeyboardController/RGBController_HyperXAlloyFPS.cpp

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,17 @@ static unsigned int matrix_map[6][23] =
2424

2525
static const char* zone_names[] =
2626
{
27-
"Keyboard",
28-
"RGB Strip",
29-
"Media Keys"
27+
"Keyboard"
3028
};
3129

3230
static zone_type zone_types[] =
3331
{
34-
ZONE_TYPE_MATRIX,
35-
ZONE_TYPE_LINEAR,
36-
ZONE_TYPE_SINGLE
32+
ZONE_TYPE_MATRIX
3733
};
3834

3935
static const unsigned int zone_sizes[] =
4036
{
41-
106,
42-
18,
43-
4
37+
106
4438
};
4539

4640
static const char *led_names[] =
@@ -150,29 +144,7 @@ static const char *led_names[] =
150144
"Key: Up Arrow",
151145
"Key: Number Pad 5",
152146
"Key: Number Pad Enter",
153-
"Key: Number Pad .",
154-
"RGB Strip 1",
155-
"RGB Strip 2",
156-
"RGB Strip 3",
157-
"RGB Strip 4",
158-
"RGB Strip 5",
159-
"RGB Strip 6",
160-
"RGB Strip 7",
161-
"RGB Strip 8",
162-
"RGB Strip 9",
163-
"RGB Strip 10",
164-
"RGB Strip 11",
165-
"RGB Strip 12",
166-
"RGB Strip 13",
167-
"RGB Strip 14",
168-
"RGB Strip 15",
169-
"RGB Strip 16",
170-
"RGB Strip 17",
171-
"RGB Strip 18",
172-
"Key: Media Previous",
173-
"Key: Media Play/Pause",
174-
"Key: Media Next",
175-
"Key: Media Mute"
147+
"Key: Number Pad ."
176148
};
177149

178150
RGBController_HyperXAlloyFPS::RGBController_HyperXAlloyFPS(HyperXAlloyFPSController* hyperx_ptr)
@@ -261,7 +233,7 @@ void RGBController_HyperXAlloyFPS::SetupZones()
261233
| Set up zones |
262234
\*---------------------------------------------------------*/
263235
unsigned int total_led_count = 0;
264-
for(unsigned int zone_idx = 0; zone_idx < 3; zone_idx++)
236+
for(unsigned int zone_idx = 0; zone_idx < 1; zone_idx++)
265237
{
266238
zone new_zone;
267239
new_zone.name = zone_names[zone_idx];

0 commit comments

Comments
 (0)