From 080e40c4d4bdd77937f3577c052071e85e3fa92b Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sun, 19 May 2024 19:53:45 -0500 Subject: [PATCH] Update HyperX keyboard controller files to new standardized header comment --- .../HyperXAlloyElite2Controller.cpp | 23 ++++++++-------- .../HyperXAlloyElite2Controller.h | 23 ++++++++-------- .../RGBController_HyperXAlloyElite2.cpp | 18 +++++++------ .../RGBController_HyperXAlloyElite2.h | 20 +++++++------- .../HyperXAlloyEliteController.cpp | 23 ++++++++-------- .../HyperXAlloyEliteController.h | 23 ++++++++-------- .../RGBController_HyperXAlloyElite.cpp | 18 +++++++------ .../RGBController_HyperXAlloyElite.h | 24 +++++++++-------- .../HyperXAlloyFPSController.cpp | 21 ++++++++------- .../HyperXAlloyFPSController.h | 23 ++++++++-------- .../RGBController_HyperXAlloyFPS.cpp | 18 +++++++------ .../RGBController_HyperXAlloyFPS.h | 24 +++++++++-------- .../HyperXAlloyOrigins60and65Controller.cpp | 21 ++++++++------- .../HyperXAlloyOrigins60and65Controller.h | 24 ++++++++--------- ...GBController_HyperXAlloyOrigins60and65.cpp | 19 ++++++++------ .../RGBController_HyperXAlloyOrigins60and65.h | 21 ++++++++------- .../HyperXAlloyOriginsController.cpp | 21 ++++++++------- .../HyperXAlloyOriginsController.h | 23 ++++++++-------- .../RGBController_HyperXAlloyOrigins.cpp | 18 +++++++------ .../RGBController_HyperXAlloyOrigins.h | 26 ++++++++++--------- .../HyperXAlloyOriginsCoreController.cpp | 23 ++++++++-------- .../HyperXAlloyOriginsCoreController.h | 24 ++++++++--------- .../RGBController_HyperXAlloyOriginsCore.cpp | 19 +++++++------- .../RGBController_HyperXAlloyOriginsCore.h | 26 ++++++++++--------- .../HyperXKeyboardControllerDetect.cpp | 11 +++++++- 25 files changed, 289 insertions(+), 245 deletions(-) diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/HyperXAlloyElite2Controller.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/HyperXAlloyElite2Controller.cpp index 380a5960..50915dd7 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/HyperXAlloyElite2Controller.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/HyperXAlloyElite2Controller.cpp @@ -1,15 +1,16 @@ -/*-----------------------------------------*\ -| HyperXAlloyElite2Controller.cpp | -| | -| Driver for HyperX Alloy Elite2 RGB | -| Keyboard lighting controller | -| | -| KundaPanda (vojdo) 02/04/2021 | -\*-----------------------------------------*/ - -#include "HyperXAlloyElite2Controller.h" +/*---------------------------------------------------------*\ +| HyperXAlloyElite2Controller.cpp | +| | +| Driver for HyperX Alloy Elite 2 keyboard | +| | +| KundaPanda (vojdo) 02 Apr 2021 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include +#include "HyperXAlloyElite2Controller.h" /*-----------------------------------------*\ | Skip these indices in the color output | @@ -131,7 +132,7 @@ void HyperXAlloyElite2Controller::SetLEDsDirect(const std::vector& col | Send packet | \*---------------------------------------------*/ hid_send_feature_report(dev, buf, sizeof(buf)); - + /*---------------------------------------------*\ | Zero out buffer and reset index | \*---------------------------------------------*/ diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/HyperXAlloyElite2Controller.h b/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/HyperXAlloyElite2Controller.h index cf69ac74..9349f1a5 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/HyperXAlloyElite2Controller.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/HyperXAlloyElite2Controller.h @@ -1,18 +1,19 @@ -/*-----------------------------------------*\ -| HyperXAlloyElite2Controller.h | -| | -| Definitions and types for HyperX Alloy | -| Elite2 RGB Keyboard lighting controller | -| | -| KundaPanda (vojdo) 02/04/2021 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| HyperXAlloyElite2Controller.h | +| | +| Driver for HyperX Alloy Elite 2 keyboard | +| | +| KundaPanda (vojdo) 02 Apr 2021 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ -#include "RGBController.h" +#pragma once #include #include - -#pragma once +#include "RGBController.h" class HyperXAlloyElite2Controller { diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/RGBController_HyperXAlloyElite2.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/RGBController_HyperXAlloyElite2.cpp index 3d06f44d..8d3a80dd 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/RGBController_HyperXAlloyElite2.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/RGBController_HyperXAlloyElite2.cpp @@ -1,11 +1,13 @@ -/*-----------------------------------------*\ -| RGBController_HyperXAlloyElite2.cpp | -| | -| Generic RGB Interface for HyperX Alloy | -| Elite2 RGB Keyboard | -| | -| KundaPanda (vojdo) 02/04/2021 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyElite2.cpp | +| | +| RGBController for HyperX Alloy Elite 2 keyboard | +| | +| KundaPanda (vojdo) 02 Apr 2021 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBControllerKeyNames.h" #include "RGBController_HyperXAlloyElite2.h" diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/RGBController_HyperXAlloyElite2.h b/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/RGBController_HyperXAlloyElite2.h index e637db95..425fbf9f 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/RGBController_HyperXAlloyElite2.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyElite2Controller/RGBController_HyperXAlloyElite2.h @@ -1,17 +1,19 @@ -/*-----------------------------------------*\ -| RGBController_HyperXAlloyElite2.h | -| | -| Generic RGB Interface for HyperX Alloy | -| Elite2 RGB Keyboard | -| | -| KundaPanda (vojdo) 02/04/2021 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyElite2.h | +| | +| RGBController for HyperX Alloy Elite 2 keyboard | +| | +| KundaPanda (vojdo) 02 Apr 2021 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once + #include #include #include - #include "RGBController.h" #include "HyperXAlloyElite2Controller.h" diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/HyperXAlloyEliteController.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/HyperXAlloyEliteController.cpp index 703f75c3..1f309994 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/HyperXAlloyEliteController.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/HyperXAlloyEliteController.cpp @@ -1,15 +1,16 @@ -/*-----------------------------------------*\ -| HyperXAlloyEliteController.cpp | -| | -| Driver for HyperX Alloy Elite Keyboard | -| lighting controller | -| | -| Adam Honse (CalcProgrammer1) 1/30/2020 | -\*-----------------------------------------*/ - -#include "HyperXAlloyEliteController.h" +/*---------------------------------------------------------*\ +| HyperXAlloyEliteController.cpp | +| | +| Driver for HyperX Alloy Elite keyboard | +| | +| Adam Honse (CalcProgrammer1) 30 Jan 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include +#include "HyperXAlloyEliteController.h" using namespace std::chrono_literals; @@ -221,7 +222,7 @@ void HyperXAlloyEliteController::SetLEDs(std::vector colors) ); std::this_thread::sleep_for(5ms); - + SendExtendedColor ( 0x01, diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/HyperXAlloyEliteController.h b/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/HyperXAlloyEliteController.h index fd23c984..92fe32ef 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/HyperXAlloyEliteController.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/HyperXAlloyEliteController.h @@ -1,18 +1,19 @@ -/*-----------------------------------------*\ -| HyperXAlloyEliteController.h | -| | -| Definitions and types for HyperX Alloy | -| Elite Keyboard lighting controller | -| | -| Adam Honse (CalcProgrammer1) 1/30/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| HyperXAlloyEliteController.h | +| | +| Driver for HyperX Alloy Elite keyboard | +| | +| Adam Honse (CalcProgrammer1) 30 Jan 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ -#include "RGBController.h" +#pragma once #include #include - -#pragma once +#include "RGBController.h" enum { diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/RGBController_HyperXAlloyElite.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/RGBController_HyperXAlloyElite.cpp index 4da9f97b..ec6e4d1d 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/RGBController_HyperXAlloyElite.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/RGBController_HyperXAlloyElite.cpp @@ -1,11 +1,13 @@ -/*-----------------------------------------*\ -| RGBController_HyperXAlloyElite.cpp | -| | -| Generic RGB Interface for HyperX Alloy | -| Elite Keyboard | -| | -| Adam Honse (CalcProgrammer1) 2/2/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyElite.cpp | +| | +| RGBController for HyperX Alloy Elite keyboard | +| | +| Adam Honse (CalcProgrammer1) 02 Feb 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBControllerKeyNames.h" #include "RGBController_HyperXAlloyElite.h" diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/RGBController_HyperXAlloyElite.h b/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/RGBController_HyperXAlloyElite.h index 89831b4e..b5227b4f 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/RGBController_HyperXAlloyElite.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyEliteController/RGBController_HyperXAlloyElite.h @@ -1,17 +1,19 @@ -/*-----------------------------------------*\ -| RGBController_HyperXAlloyElite.h | -| | -| Generic RGB Interface for HyperX Alloy | -| Elite Keyboard | -| | -| Adam Honse (CalcProgrammer1) 2/2/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyElite.h | +| | +| RGBController for HyperX Alloy Elite keyboard | +| | +| Adam Honse (CalcProgrammer1) 02 Feb 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once + #include #include #include - #include "RGBController.h" #include "HyperXAlloyEliteController.h" @@ -24,7 +26,7 @@ public: void SetupZones(); void ResizeZone(int zone, int new_size); - + void DeviceUpdateLEDs(); void UpdateZoneLEDs(int zone); void UpdateSingleLED(int led); @@ -32,7 +34,7 @@ public: void DeviceUpdateMode(); void KeepaliveThreadFunction(); - + private: HyperXAlloyEliteController* controller; std::atomic keepalive_thread_run; diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/HyperXAlloyFPSController.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/HyperXAlloyFPSController.cpp index 3edb5597..d7c5f7a9 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/HyperXAlloyFPSController.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/HyperXAlloyFPSController.cpp @@ -1,15 +1,16 @@ -/*-----------------------------------------*\ -| HyperXAlloyFPSController.cpp | -| | -| Driver for HyperX Alloy FPS Keyboard | -| lighting controller | -| | -| Adam Honse (CalcProgrammer1) 1/30/2020 | -\*-----------------------------------------*/ - -#include "HyperXAlloyFPSController.h" +/*---------------------------------------------------------*\ +| HyperXAlloyFPSController.cpp | +| | +| Driver for HyperX Alloy FPS keyboard | +| | +| Adam Honse (CalcProgrammer1) 30 Jan 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include +#include "HyperXAlloyFPSController.h" using namespace std::chrono_literals; diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/HyperXAlloyFPSController.h b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/HyperXAlloyFPSController.h index 800f8c65..abc2374d 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/HyperXAlloyFPSController.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/HyperXAlloyFPSController.h @@ -1,18 +1,19 @@ -/*-----------------------------------------*\ -| HyperXAlloyFPSController.h | -| | -| Definitions and types for HyperX Alloy | -| Elite Keyboard lighting controller | -| | -| Adam Honse (CalcProgrammer1) 1/30/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| HyperXAlloyFPSController.h | +| | +| Driver for HyperX Alloy FPS keyboard | +| | +| Adam Honse (CalcProgrammer1) 30 Jan 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ -#include "RGBController.h" +#pragma once #include #include - -#pragma once +#include "RGBController.h" enum { diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/RGBController_HyperXAlloyFPS.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/RGBController_HyperXAlloyFPS.cpp index 2030c7aa..a7c62ca3 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/RGBController_HyperXAlloyFPS.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/RGBController_HyperXAlloyFPS.cpp @@ -1,11 +1,13 @@ -/*-----------------------------------------*\ -| RGBController_HyperXAlloyFPS.cpp | -| | -| Generic RGB Interface for HyperX Alloy | -| FPS Keyboard | -| | -| Adam Honse (CalcProgrammer1) 2/2/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyFPS.cpp | +| | +| RGBController for HyperX Alloy FPS keyboard | +| | +| Adam Honse (CalcProgrammer1) 02 Feb 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBControllerKeyNames.h" #include "RGBController_HyperXAlloyFPS.h" diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/RGBController_HyperXAlloyFPS.h b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/RGBController_HyperXAlloyFPS.h index fa2d5c86..3e2ca76f 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/RGBController_HyperXAlloyFPS.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyFPSController/RGBController_HyperXAlloyFPS.h @@ -1,17 +1,19 @@ -/*-----------------------------------------*\ -| RGBController_HyperXAlloyFPS.h | -| | -| Generic RGB Interface for HyperX Alloy | -| FPS Keyboard | -| | -| Adam Honse (CalcProgrammer1) 2/2/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyFPS.h | +| | +| RGBController for HyperX Alloy FPS keyboard | +| | +| Adam Honse (CalcProgrammer1) 02 Feb 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once + #include #include #include - #include "RGBController.h" #include "HyperXAlloyFPSController.h" @@ -24,7 +26,7 @@ public: void SetupZones(); void ResizeZone(int zone, int new_size); - + void DeviceUpdateLEDs(); void UpdateZoneLEDs(int zone); void UpdateSingleLED(int led); @@ -32,7 +34,7 @@ public: void DeviceUpdateMode(); void KeepaliveThreadFunction(); - + private: HyperXAlloyFPSController* controller; std::atomic keepalive_thread_run; diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/HyperXAlloyOrigins60and65Controller.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/HyperXAlloyOrigins60and65Controller.cpp index 0e724127..69c94386 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/HyperXAlloyOrigins60and65Controller.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/HyperXAlloyOrigins60and65Controller.cpp @@ -1,15 +1,16 @@ -/*-----------------------------------------*\ -| HyperXAlloyOrigins60and65Controller.cpp | -| | -| Driver for HyperX Alloy Origins 60 and | -| 65 RGB Keyboards lighting controller | -| | -| Derek Huber 03/18/2023 | -\*-----------------------------------------*/ - -#include "HyperXAlloyOrigins60and65Controller.h" +/*---------------------------------------------------------*\ +| HyperXAlloyOrigins60and65Controller.cpp | +| | +| Driver for HyperX Alloy Origins 60 and 65 keyboard | +| | +| Derek Huber 18 Mar 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include +#include "HyperXAlloyOrigins60and65Controller.h" HyperXAlloyOrigins60and65Controller::HyperXAlloyOrigins60and65Controller(hid_device* dev_handle, const char* path) { diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/HyperXAlloyOrigins60and65Controller.h b/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/HyperXAlloyOrigins60and65Controller.h index af058522..b19fbd91 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/HyperXAlloyOrigins60and65Controller.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/HyperXAlloyOrigins60and65Controller.h @@ -1,19 +1,19 @@ -/*---------------------------------------*\ -| HyperXAlloyOrigins60and65Controller.h | -| | -| Definitions and types for HyperX | -| Alloy Origins 60 and 65 RGB Keyboards | -| lighting controller | -| | -| Derek Huber 03/18/2023 | -\*---------------------------------------*/ +/*---------------------------------------------------------*\ +| HyperXAlloyOrigins60and65Controller.h | +| | +| Driver for HyperX Alloy Origins 60 and 65 keyboard | +| | +| Derek Huber 18 Mar 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ -#include "RGBController.h" +#pragma once #include #include - -#pragma once +#include "RGBController.h" class HyperXAlloyOrigins60and65Controller { diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/RGBController_HyperXAlloyOrigins60and65.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/RGBController_HyperXAlloyOrigins60and65.cpp index c2c3662c..1a607b7b 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/RGBController_HyperXAlloyOrigins60and65.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/RGBController_HyperXAlloyOrigins60and65.cpp @@ -1,11 +1,14 @@ -/*---------------------------------------------*\ -| RGBController_HyperXAlloyOrigins60and65.cpp | -| | -| Generic RGB Interface for HyperX Alloy | -| Origins 60 and 65 RGB Keyboards | -| | -| Derek Huber 03/18/2023 | -\*---------------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyOrigins60and65.cpp | +| | +| RGBController for HyperX Alloy Origins 60 and 65 | +| keyboard | +| | +| Derek Huber 18 Mar 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBControllerKeyNames.h" #include "RGBController_HyperXAlloyOrigins60and65.h" diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/RGBController_HyperXAlloyOrigins60and65.h b/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/RGBController_HyperXAlloyOrigins60and65.h index f28b7935..cd4b9190 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/RGBController_HyperXAlloyOrigins60and65.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOrigins60and65Controller/RGBController_HyperXAlloyOrigins60and65.h @@ -1,15 +1,18 @@ -/*-------------------------------------------*\ -| RGBController_HyperXAlloyOrigins60and65.h | -| | -| Generic RGB Interface for HyperX Alloy | -| Origins 60 and 65 RGB Keyboards | -| | -| Derek Huber 03/18/2023 | -\*-------------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyOrigins60and65.h | +| | +| RGBController for HyperX Alloy Origins 60 and 65 | +| keyboard | +| | +| Derek Huber 18 Mar 2023 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once -#include +#include #include "RGBController.h" #include "HyperXAlloyOrigins60and65Controller.h" diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/HyperXAlloyOriginsController.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/HyperXAlloyOriginsController.cpp index 6fa11f20..6ab2707d 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/HyperXAlloyOriginsController.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/HyperXAlloyOriginsController.cpp @@ -1,15 +1,16 @@ -/*-----------------------------------------*\ -| HyperXAlloyOriginsController.cpp | -| | -| Driver for HyperX Alloy Origins RGB | -| Keyboard lighting controller | -| | -| Adam Honse (CalcProgrammer1) 7/11/2020 | -\*-----------------------------------------*/ - -#include "HyperXAlloyOriginsController.h" +/*---------------------------------------------------------*\ +| HyperXAlloyOriginsController.cpp | +| | +| Driver for HyperX Alloy Origins keyboard | +| | +| Adam Honse (CalcProgrammer1) 11 Jul 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include +#include "HyperXAlloyOriginsController.h" // Skip these indices in the color output static unsigned int skip_idx[] = { 23, 29, 41, 47, 59, 70, 71, 87, 88, 93, 99, 100, 102, 108, 113, 114, 120, 123, 124 }; diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/HyperXAlloyOriginsController.h b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/HyperXAlloyOriginsController.h index 4a111482..81d8104e 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/HyperXAlloyOriginsController.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/HyperXAlloyOriginsController.h @@ -1,18 +1,19 @@ -/*-----------------------------------------*\ -| HyperXAlloyOriginsController.h | -| | -| Definitions and types for HyperX Alloy | -| Origins RGB Keyboard lighting controller | -| | -| Adam Honse (CalcProgrammer1) 7/11/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| HyperXAlloyOriginsController.h | +| | +| Driver for HyperX Alloy Origins keyboard | +| | +| Adam Honse (CalcProgrammer1) 11 Jul 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ -#include "RGBController.h" +#pragma once #include #include - -#pragma once +#include "RGBController.h" class HyperXAlloyOriginsController { diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/RGBController_HyperXAlloyOrigins.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/RGBController_HyperXAlloyOrigins.cpp index d87ed146..17b9b6c8 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/RGBController_HyperXAlloyOrigins.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/RGBController_HyperXAlloyOrigins.cpp @@ -1,11 +1,13 @@ -/*-----------------------------------------*\ -| RGBController_HyperXAlloyOrigins.cpp | -| | -| Generic RGB Interface for HyperX Alloy | -| Origins RGB Keyboard | -| | -| Adam Honse (CalcProgrammer1) 7/11/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyOrigins.cpp | +| | +| RGBController for HyperX Alloy Origins keyboard | +| | +| Adam Honse (CalcProgrammer1) 11 Jul 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBControllerKeyNames.h" #include "RGBController_HyperXAlloyOrigins.h" diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/RGBController_HyperXAlloyOrigins.h b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/RGBController_HyperXAlloyOrigins.h index ca51fe81..b2d78454 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/RGBController_HyperXAlloyOrigins.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsController/RGBController_HyperXAlloyOrigins.h @@ -1,15 +1,17 @@ -/*-----------------------------------------*\ -| RGBController_HyperXAlloyOrigins.h | -| | -| Generic RGB Interface for HyperX Alloy | -| Origins RGB Keyboard | -| | -| Adam Honse (CalcProgrammer1) 7/11/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyOrigins.h | +| | +| RGBController for HyperX Alloy Origins keyboard | +| | +| Adam Honse (CalcProgrammer1) 11 Jul 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once -#include +#include #include "RGBController.h" #include "HyperXAlloyOriginsController.h" @@ -22,15 +24,15 @@ public: void SetupZones(); void ResizeZone(int zone, int new_size); - + void DeviceUpdateLEDs(); void UpdateZoneLEDs(int zone); void UpdateSingleLED(int led); void DeviceUpdateMode(); - + void KeepaliveThread(); - + private: HyperXAlloyOriginsController* controller; std::thread* keepalive_thread; diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/HyperXAlloyOriginsCoreController.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/HyperXAlloyOriginsCoreController.cpp index 2cb47232..8c8e8fa8 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/HyperXAlloyOriginsCoreController.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/HyperXAlloyOriginsCoreController.cpp @@ -1,16 +1,17 @@ -/*------------------------------------------*\ -| HyperXAlloyOriginsCoreController.cpp | -| | -| Driver for HyperX Alloy Origins Core | -| RGB Keyboard lighting controller | -| | -| Volodymyr Nazarchuk (Vavooon) 4/28/2021 | -| mike white (kamaaina) 6/9/2021 | -\*------------------------------------------*/ - -#include "HyperXAlloyOriginsCoreController.h" +/*---------------------------------------------------------*\ +| HyperXAlloyOriginsCoreController.cpp | +| | +| Driver for HyperX Alloy Origins Core keyboard | +| | +| Volodymyr Nazarchuk (Vavooon) 28 Apr 2021 | +| Mike White (kamaaina) 09 Jun 2021 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include +#include "HyperXAlloyOriginsCoreController.h" // Skip these indices in the color output static unsigned int skip_idx[] = {6, 7, 14, 15, 22, 23, 30, 31, 38, 39, 44, 46, 47, 54, 55, 58, 60, 61, 62, 63, 70, 71, 78, 79, 86, 87, 94, 95, 101, 102, 103, 109, 110, 111, 118, 119}; diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/HyperXAlloyOriginsCoreController.h b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/HyperXAlloyOriginsCoreController.h index 483088b2..a2751428 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/HyperXAlloyOriginsCoreController.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/HyperXAlloyOriginsCoreController.h @@ -1,19 +1,19 @@ -/*------------------------------------------*\ -| HyperXAlloyOriginsCoreController.h | -| | -| Definitions and types for HyperX Alloy | -| Origins Core RGB Keyboard lighting | -| controller | -| | -| Volodymyr Nazarchuk (Vavooon) 4/28/2021 | -\*------------------------------------------*/ +/*---------------------------------------------------------*\ +| HyperXAlloyOriginsCoreController.h | +| | +| Driver for HyperX Alloy Origins Core keyboard | +| | +| Volodymyr Nazarchuk (Vavooon) 28 Apr 2021 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ -#include "RGBController.h" +#pragma once #include #include - -#pragma once +#include "RGBController.h" class HyperXAlloyOriginsCoreController { diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/RGBController_HyperXAlloyOriginsCore.cpp b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/RGBController_HyperXAlloyOriginsCore.cpp index 9e076dc7..4acbbc11 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/RGBController_HyperXAlloyOriginsCore.cpp +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/RGBController_HyperXAlloyOriginsCore.cpp @@ -1,18 +1,19 @@ -/*------------------------------------------*\ -| RGBController_HyperXAlloyOriginsCore.cpp | -| | -| Generic RGB Interface for HyperX Alloy | -| Origins Core RGB Keyboard | -| | -| Volodymyr Nazarchuk (Vavooon) 4/28/2021 | -\*------------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyOriginsCore.cpp | +| | +| RGBController for HyperX Alloy Origins Core keyboard | +| | +| Volodymyr Nazarchuk (Vavooon) 28 Apr 2021 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBControllerKeyNames.h" #include "RGBController_HyperXAlloyOriginsCore.h" using namespace std::chrono_literals; - #define HYPERX_MIN_BRIGHTNESS 0 #define HYPERX_MAX_BRIGHTNESS 255 diff --git a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/RGBController_HyperXAlloyOriginsCore.h b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/RGBController_HyperXAlloyOriginsCore.h index 5479c1f1..826cbc40 100644 --- a/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/RGBController_HyperXAlloyOriginsCore.h +++ b/Controllers/HyperXKeyboardController/HyperXAlloyOriginsCoreController/RGBController_HyperXAlloyOriginsCore.h @@ -1,15 +1,17 @@ -/*------------------------------------------*\ -| RGBController_HyperXAlloyOriginsCore.h | -| | -| Generic RGB Interface for HyperX Alloy | -| Origins Core RGB Keyboard | -| | -| Volodymyr Nazarchuk (Vavooon) 4/28/2021 | -\*------------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXAlloyOriginsCore.h | +| | +| RGBController for HyperX Alloy Origins Core keyboard | +| | +| Volodymyr Nazarchuk (Vavooon) 28 Apr 2021 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once -#include +#include #include "RGBController.h" #include "HyperXAlloyOriginsCoreController.h" @@ -22,15 +24,15 @@ public: void SetupZones(); void ResizeZone(int zone, int new_size); - + void DeviceUpdateLEDs(); void UpdateZoneLEDs(int zone); void UpdateSingleLED(int led); void DeviceUpdateMode(); - + void KeepaliveThread(); - + private: HyperXAlloyOriginsCoreController* controller; std::thread* keepalive_thread; diff --git a/Controllers/HyperXKeyboardController/HyperXKeyboardControllerDetect.cpp b/Controllers/HyperXKeyboardController/HyperXKeyboardControllerDetect.cpp index 8c5667a6..a3feb546 100644 --- a/Controllers/HyperXKeyboardController/HyperXKeyboardControllerDetect.cpp +++ b/Controllers/HyperXKeyboardController/HyperXKeyboardControllerDetect.cpp @@ -1,3 +1,13 @@ +/*---------------------------------------------------------*\ +| HyperXKeyboardControllerDetect.cpp | +| | +| Driver for HyperX keyboards | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#include #include "Detector.h" #include "HyperXAlloyEliteController.h" #include "HyperXAlloyElite2Controller.h" @@ -12,7 +22,6 @@ #include "RGBController_HyperXAlloyOrigins.h" #include "RGBController_HyperXAlloyOriginsCore.h" #include "RGBController_HyperXAlloyOrigins60and65.h" -#include /*-----------------------------------------------------*\ | HyperX keyboard vendor and product IDs |