From 09fae4d944bd187f1169889f8fb40040efe260c5 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Fri, 8 Oct 2021 21:12:54 -0500 Subject: [PATCH] Remove unused zones from Alloy FPS controller --- .../HyperXAlloyFPSController.cpp | 18 --------- .../RGBController_HyperXAlloyFPS.cpp | 38 +++---------------- 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp index 6731350a..e392ddef 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController.cpp @@ -23,10 +23,6 @@ static unsigned int keys[] = {0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x 0x7F, 0x81, 0x84, 0x85, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x91, 0x94, 0x95 }; -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 }; -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 }; -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 }; - HyperXAlloyFPSController::HyperXAlloyFPSController(hid_device* dev_handle, const char* path) { dev = dev_handle; @@ -137,13 +133,6 @@ void HyperXAlloyFPSController::SetLEDsDirect(std::vector colors) blu_color_data[i] = RGBGetBValue(colors[i]); } - for(std::size_t i = 0; i < 22; i++) - { - ext_color_data[extended_red[i]] = RGBGetRValue(colors[i + 106]); - ext_color_data[extended_grn[i]] = RGBGetGValue(colors[i + 106]); - ext_color_data[extended_blu[i]] = RGBGetBValue(colors[i + 106]); - } - SendDirect ( HYPERX_ALLOY_FPS_COLOR_CHANNEL_RED, @@ -188,13 +177,6 @@ void HyperXAlloyFPSController::SetLEDs(std::vector colors) blu_color_data[i] = RGBGetBValue(colors[i]); } - for(std::size_t i = 0; i < 22; i++) - { - ext_color_data[extended_red[i]] = RGBGetRValue(colors[i + 106]); - ext_color_data[extended_grn[i]] = RGBGetGValue(colors[i + 106]); - ext_color_data[extended_blu[i]] = RGBGetBValue(colors[i + 106]); - } - SendColor ( 0x01, diff --git a/Controllers/HyperXKeyboardController/RGBController_HyperXAlloyFPS.cpp b/Controllers/HyperXKeyboardController/RGBController_HyperXAlloyFPS.cpp index 2e50d46e..b09efaf2 100644 --- a/Controllers/HyperXKeyboardController/RGBController_HyperXAlloyFPS.cpp +++ b/Controllers/HyperXKeyboardController/RGBController_HyperXAlloyFPS.cpp @@ -24,23 +24,17 @@ static unsigned int matrix_map[6][23] = static const char* zone_names[] = { - "Keyboard", - "RGB Strip", - "Media Keys" + "Keyboard" }; static zone_type zone_types[] = { - ZONE_TYPE_MATRIX, - ZONE_TYPE_LINEAR, - ZONE_TYPE_SINGLE + ZONE_TYPE_MATRIX }; static const unsigned int zone_sizes[] = { - 106, - 18, - 4 + 106 }; static const char *led_names[] = @@ -150,29 +144,7 @@ static const char *led_names[] = "Key: Up Arrow", "Key: Number Pad 5", "Key: Number Pad Enter", - "Key: Number Pad .", - "RGB Strip 1", - "RGB Strip 2", - "RGB Strip 3", - "RGB Strip 4", - "RGB Strip 5", - "RGB Strip 6", - "RGB Strip 7", - "RGB Strip 8", - "RGB Strip 9", - "RGB Strip 10", - "RGB Strip 11", - "RGB Strip 12", - "RGB Strip 13", - "RGB Strip 14", - "RGB Strip 15", - "RGB Strip 16", - "RGB Strip 17", - "RGB Strip 18", - "Key: Media Previous", - "Key: Media Play/Pause", - "Key: Media Next", - "Key: Media Mute" + "Key: Number Pad ." }; RGBController_HyperXAlloyFPS::RGBController_HyperXAlloyFPS(HyperXAlloyFPSController* hyperx_ptr) @@ -261,7 +233,7 @@ void RGBController_HyperXAlloyFPS::SetupZones() | Set up zones | \*---------------------------------------------------------*/ unsigned int total_led_count = 0; - for(unsigned int zone_idx = 0; zone_idx < 3; zone_idx++) + for(unsigned int zone_idx = 0; zone_idx < 1; zone_idx++) { zone new_zone; new_zone.name = zone_names[zone_idx];