From 056485fabff0c60e969abe636703a5222cdfa6ab Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Fri, 24 May 2024 13:57:38 -0500 Subject: [PATCH] Update HyperX mousemat controller files to new standardized header comment --- .../HyperXMousematController.cpp | 25 +++++++++-------- .../HyperXMousematController.h | 28 +++++++++---------- .../HyperXMousematControllerDetect.cpp | 14 ++++++++-- .../RGBController_HyperXMousemat.cpp | 18 ++++++------ .../RGBController_HyperXMousemat.h | 24 ++++++++-------- 5 files changed, 62 insertions(+), 47 deletions(-) diff --git a/Controllers/HyperXMousematController/HyperXMousematController.cpp b/Controllers/HyperXMousematController/HyperXMousematController.cpp index f1dba85a..8c1dcc92 100644 --- a/Controllers/HyperXMousematController/HyperXMousematController.cpp +++ b/Controllers/HyperXMousematController/HyperXMousematController.cpp @@ -1,15 +1,16 @@ -/*-----------------------------------------*\ -| HyperXMousematController.cpp | -| | -| Driver for HyperX Mousemat lighting | -| controller | -| | -| Adam Honse (CalcProgrammer1) 10/25/2020 | -\*-----------------------------------------*/ - -#include "HyperXMousematController.h" +/*---------------------------------------------------------*\ +| HyperXMousematController.cpp | +| | +| Driver for HyperX mousemat | +| | +| Adam Honse (CalcProgrammer1) 25 Oct 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include +#include "HyperXMousematController.h" HyperXMousematController::HyperXMousematController(hidapi_wrapper hid_wrapper, hid_device* dev_handle, const char* path) { @@ -83,7 +84,7 @@ void HyperXMousematController::SendDirect | Set up Select Profile packet | \*-----------------------------------------------------*/ buf[0x00] = 0x00; - + for(int i = 0; i < 16; i++) { buf[(i * 4) + 1] = 0x81; @@ -106,7 +107,7 @@ void HyperXMousematController::SendDirect | Set up Select Profile packet | \*-----------------------------------------------------*/ buf[0x00] = 0x00; - + for(int i = 0; i < 16; i++) { buf[(i * 4) + 1] = 0x81; diff --git a/Controllers/HyperXMousematController/HyperXMousematController.h b/Controllers/HyperXMousematController/HyperXMousematController.h index df350900..8e3ce3fa 100644 --- a/Controllers/HyperXMousematController/HyperXMousematController.h +++ b/Controllers/HyperXMousematController/HyperXMousematController.h @@ -1,20 +1,20 @@ -/*-----------------------------------------*\ -| HyperXMousematController.h | -| | -| Definitions and types for HyperX | -| mousemat lighting controller | -| | -| Adam Honse (CalcProgrammer1) 10/25/2020 | -\*-----------------------------------------*/ - -#include "RGBController.h" - -#include - -#include "hidapi_wrapper.h" +/*---------------------------------------------------------*\ +| HyperXMousematController.h | +| | +| Driver for HyperX mousemat | +| | +| Adam Honse (CalcProgrammer1) 25 Oct 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once +#include +#include "RGBController.h" +#include "hidapi_wrapper.h" + class HyperXMousematController { public: diff --git a/Controllers/HyperXMousematController/HyperXMousematControllerDetect.cpp b/Controllers/HyperXMousematController/HyperXMousematControllerDetect.cpp index 505beb6f..c88ca3bf 100644 --- a/Controllers/HyperXMousematController/HyperXMousematControllerDetect.cpp +++ b/Controllers/HyperXMousematController/HyperXMousematControllerDetect.cpp @@ -1,9 +1,19 @@ +/*---------------------------------------------------------*\ +| HyperXMousematControllerDetect.cpp | +| | +| Detector for HyperX mousemat | +| | +| Adam Honse (CalcProgrammer1) 25 Oct 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#include #include "Detector.h" #include "HyperXMousematController.h" #include "RGBController.h" #include "RGBController_HyperXMousemat.h" -#include - #include "hidapi_wrapper.h" /*-----------------------------------------------------*\ diff --git a/Controllers/HyperXMousematController/RGBController_HyperXMousemat.cpp b/Controllers/HyperXMousematController/RGBController_HyperXMousemat.cpp index ff4e0ca5..685aa669 100644 --- a/Controllers/HyperXMousematController/RGBController_HyperXMousemat.cpp +++ b/Controllers/HyperXMousematController/RGBController_HyperXMousemat.cpp @@ -1,11 +1,13 @@ -/*-----------------------------------------*\ -| RGBController_HyperXMousemat.cpp | -| | -| Generic RGB Interface for HyperX | -| mousemat | -| | -| Adam Honse (CalcProgrammer1) 10/25/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXMousemat.cpp | +| | +| RGBController for HyperX mousemat | +| | +| Adam Honse (CalcProgrammer1) 25 Oct 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBController_HyperXMousemat.h" diff --git a/Controllers/HyperXMousematController/RGBController_HyperXMousemat.h b/Controllers/HyperXMousematController/RGBController_HyperXMousemat.h index 3efa17c5..e10af160 100644 --- a/Controllers/HyperXMousematController/RGBController_HyperXMousemat.h +++ b/Controllers/HyperXMousematController/RGBController_HyperXMousemat.h @@ -1,15 +1,17 @@ -/*-----------------------------------------*\ -| RGBController_HyperXMousemat.h | -| | -| Generic RGB Interface for HyperX | -| mousemat | -| | -| Adam Honse (CalcProgrammer1) 10/25/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_HyperXMousemat.h | +| | +| RGBController for HyperX mousemat | +| | +| Adam Honse (CalcProgrammer1) 25 Oct 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #pragma once -#include +#include #include "RGBController.h" #include "HyperXMousematController.h" @@ -22,7 +24,7 @@ public: void SetupZones(); void ResizeZone(int zone, int new_size); - + void DeviceUpdateLEDs(); void UpdateZoneLEDs(int zone); void UpdateSingleLED(int led); @@ -30,7 +32,7 @@ public: void DeviceUpdateMode(); void KeepaliveThread(); - + private: HyperXMousematController* controller; std::thread* keepalive_thread;