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;