From a4a3a7b97021934df8cba32a673e8dc74802a08c Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Fri, 7 Jun 2024 11:37:00 -0500 Subject: [PATCH] Update Redragon controller files to new standardized header comment --- .../RGBController_RedragonMouse.cpp | 17 +++++++++------- .../RGBController_RedragonMouse.h | 20 +++++++++++-------- .../RedragonControllerDetect.cpp | 17 +++++++++++++--- .../RedragonMouseController.cpp | 16 ++++++++++++--- .../RedragonMouseController.h | 19 ++++++++++-------- 5 files changed, 60 insertions(+), 29 deletions(-) diff --git a/Controllers/RedragonController/RGBController_RedragonMouse.cpp b/Controllers/RedragonController/RGBController_RedragonMouse.cpp index af903034..c64ab74f 100644 --- a/Controllers/RedragonController/RGBController_RedragonMouse.cpp +++ b/Controllers/RedragonController/RGBController_RedragonMouse.cpp @@ -1,10 +1,13 @@ -/*-----------------------------------------*\ -| RGBController_RedragonMouse.cpp | -| | -| Generic RGB Interface for Redragon Mouse | -| | -| Adam Honse (CalcProgrammer1) 3/25/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_RedragonMouse.cpp | +| | +| RGBController for Redragon mouse | +| | +| Adam Honse (CalcProgrammer1) 25 Mar 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include "RGBController_RedragonMouse.h" diff --git a/Controllers/RedragonController/RGBController_RedragonMouse.h b/Controllers/RedragonController/RGBController_RedragonMouse.h index 9f37888e..a389ec57 100644 --- a/Controllers/RedragonController/RGBController_RedragonMouse.h +++ b/Controllers/RedragonController/RGBController_RedragonMouse.h @@ -1,10 +1,14 @@ -/*-----------------------------------------*\ -| RGBController_RedragonMouse.h | -| | -| Generic RGB Interface for Redragon Mouse | -| | -| Adam Honse (CalcProgrammer1) 3/25/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RGBController_RedragonMouse.h | +| | +| RGBController for Redragon mouse | +| | +| Adam Honse (CalcProgrammer1) 25 Mar 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #pragma once #include "RGBController.h" @@ -18,7 +22,7 @@ public: void SetupZones(); void ResizeZone(int zone, int new_size); - + void DeviceUpdateLEDs(); void UpdateZoneLEDs(int zone); void UpdateSingleLED(int led); diff --git a/Controllers/RedragonController/RedragonControllerDetect.cpp b/Controllers/RedragonController/RedragonControllerDetect.cpp index fe2d561b..9979284b 100644 --- a/Controllers/RedragonController/RedragonControllerDetect.cpp +++ b/Controllers/RedragonController/RedragonControllerDetect.cpp @@ -1,9 +1,20 @@ +/*---------------------------------------------------------*\ +| RedragonControllerDetect.cpp | +| | +| Detector for Redragon devices | +| | +| Adam Honse (CalcProgrammer1) 15 Mar 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#include +#include #include "Detector.h" #include "RedragonMouseController.h" #include "RGBController.h" #include "RGBController_RedragonMouse.h" -#include -#include /*-----------------------------------------------------*\ | Mouse product IDs | @@ -47,4 +58,4 @@ REGISTER_HID_DETECTOR_IP("Redragon M716 Inquisitor", DetectRedragonMice, RE REGISTER_HID_DETECTOR_IP("Redragon M908 Impact", DetectRedragonMice, REDRAGON_MOUSE_VID, REDRAGON_M908_PID, 2, REDRAGON_MOUSE_USAGE_PAGE); REGISTER_HID_DETECTOR_IP("Redragon M602 Griffin", DetectRedragonMice, REDRAGON_MOUSE_VID, REDRAGON_M602_PID, 2, REDRAGON_MOUSE_USAGE_PAGE); REGISTER_HID_DETECTOR_IP("Redragon M808 Storm", DetectRedragonMice, REDRAGON_MOUSE_VID, REDRAGON_M808_PID, 2, REDRAGON_MOUSE_USAGE_PAGE); -REGISTER_HID_DETECTOR_IP("Redragon M801 Sniper", DetectRedragonMice, REDRAGON_MOUSE_VID, REDRAGON_M801_PID, 2, REDRAGON_MOUSE_USAGE_PAGE); +REGISTER_HID_DETECTOR_IP("Redragon M801 Sniper", DetectRedragonMice, REDRAGON_MOUSE_VID, REDRAGON_M801_PID, 2, REDRAGON_MOUSE_USAGE_PAGE); diff --git a/Controllers/RedragonController/RedragonMouseController.cpp b/Controllers/RedragonController/RedragonMouseController.cpp index 53af0a0f..251a2202 100644 --- a/Controllers/RedragonController/RedragonMouseController.cpp +++ b/Controllers/RedragonController/RedragonMouseController.cpp @@ -1,6 +1,16 @@ -#include "RedragonMouseController.h" +/*---------------------------------------------------------*\ +| RedragonMouseController.cpp | +| | +| Driver for Redragon mouse | +| | +| Adam Honse (CalcProgrammer1) 15 Mar 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ #include +#include "RedragonMouseController.h" RedragonMouseController::RedragonMouseController(hid_device* dev_handle, const char* path) { @@ -111,7 +121,7 @@ void RedragonMouseController::SendMouseApply() usb_buf[0x01] = 0xF1; usb_buf[0x02] = 0x02; usb_buf[0x03] = 0x04; - + /*-----------------------------------------------------*\ | Send packet | \*-----------------------------------------------------*/ @@ -145,7 +155,7 @@ void RedragonMouseController::SendWritePacket | Copy in data bytes | \*-----------------------------------------------------*/ memcpy(&usb_buf[0x08], data, data_size); - + /*-----------------------------------------------------*\ | Send packet | \*-----------------------------------------------------*/ diff --git a/Controllers/RedragonController/RedragonMouseController.h b/Controllers/RedragonController/RedragonMouseController.h index c9fbfcac..3c040fc5 100644 --- a/Controllers/RedragonController/RedragonMouseController.h +++ b/Controllers/RedragonController/RedragonMouseController.h @@ -1,11 +1,14 @@ -/*-----------------------------------------*\ -| RedragonMouseController.h | -| | -| Definitions and types for Redragon Mouse | -| lighting controller | -| | -| Adam Honse (CalcProgrammer1) 3/15/2020 | -\*-----------------------------------------*/ +/*---------------------------------------------------------*\ +| RedragonMouseController.h | +| | +| Driver for Redragon mouse | +| | +| Adam Honse (CalcProgrammer1) 15 Mar 2020 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + #pragma once #include