Update Cougar controller files to new standardized header comment
This commit is contained in:
parent
da8469f478
commit
1e53aae676
9 changed files with 100 additions and 72 deletions
|
|
@ -1,6 +1,14 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| CougarControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Cougar devices |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "RGBController.h"
|
||||
|
||||
#include "RGBController_CougarKeyboard.h"
|
||||
#include "RGBController_CougarRevengerST.h"
|
||||
|
||||
|
|
@ -29,7 +37,6 @@ void DetectCougarRevengerSTControllers(hid_device_info* info, const std::string&
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void DetectCougar700kEvo(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
|
@ -44,6 +51,5 @@ void DetectCougar700kEvo(hid_device_info* info, const std::string& name)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
REGISTER_HID_DETECTOR_IPU("Cougar 700K EVO Gaming Keyboard", DetectCougar700kEvo, COUGAR_VID_2, COUGAR_700K_EVO_PID, 3, 0xFF00, 1);
|
||||
REGISTER_HID_DETECTOR_IPU("Cougar Revenger ST", DetectCougarRevengerSTControllers, COUGAR_VID, COUGAR_REVENGER_ST_PID, 0, 0x0001, 2);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
/*-------------------------------------------------------------------*\
|
||||
| CougarKeyboardController.cpp |
|
||||
| |
|
||||
| Driver for CougarKeyboard USB Controller |
|
||||
| |
|
||||
| Chris M (DrNo) 5 Apr 2022 |
|
||||
\*-------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| CougarKeyboardController.cpp |
|
||||
| |
|
||||
| Driver for Cougar keyboard |
|
||||
| |
|
||||
| Chris M (DrNo) 05 Apr 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "CougarKeyboardController.h"
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
/*-------------------------------------------------------------------*\
|
||||
| CougarKeyboardController.h |
|
||||
| |
|
||||
| Driver for CougarKeyboard USB Controller |
|
||||
| |
|
||||
| Chris M (DrNo) 5 Apr 2022 |
|
||||
\*-------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| CougarKeyboardController.h |
|
||||
| |
|
||||
| Driver for Cougar keyboard |
|
||||
| |
|
||||
| Chris M (DrNo) 05 Apr 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <hidapi/hidapi.h>
|
||||
#include "RGBController.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
#define COUGARKEYBOARDCONTROLLER_WRITE_PACKET_SIZE 65 //Buffer requires a prepended ReportID hence + 1
|
||||
#define HID_MAX_STR 255
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CougarKeyboard.cpp |
|
||||
| |
|
||||
| Driver for CougarKeyboard USB Controller |
|
||||
| |
|
||||
| Chris M (DrNo) 5 Apr 2022 |
|
||||
\*-------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_CougarKeyboard.cpp |
|
||||
| |
|
||||
| RGBController for Cougar keyboard |
|
||||
| |
|
||||
| Chris M (DrNo) 05 Apr 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#define NA 0xFFFFFFFF
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,20 @@
|
|||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_CougarKeyboardController.h |
|
||||
| |
|
||||
| Driver for CougarKeyboard USB Controller |
|
||||
| |
|
||||
| Chris M (DrNo) 5 Apr 2022 |
|
||||
\*-------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_CougarKeyboard.h |
|
||||
| |
|
||||
| RGBController for Cougar keyboard |
|
||||
| |
|
||||
| Chris M (DrNo) 05 Apr 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "LogManager.h"
|
||||
#include "RGBController.h"
|
||||
#include "CougarKeyboardController.h"
|
||||
#include <vector>
|
||||
|
||||
class RGBController_CougarKeyboard : public RGBController
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
/*-----------------------------------------*\
|
||||
| CougarRevengerSTController.cpp |
|
||||
| |
|
||||
| Driver for Cougar Revenger ST lighting |
|
||||
| controller |
|
||||
| |
|
||||
| Guimard Morgan (morg) 3/17/2022 |
|
||||
\*-----------------------------------------*/
|
||||
#include "CougarRevengerSTController.h"
|
||||
/*---------------------------------------------------------*\
|
||||
| CougarRevengerSTController.cpp |
|
||||
| |
|
||||
| Driver for Cougar Revenger ST |
|
||||
| |
|
||||
| Morgan Guimard (morg) 17 Mar 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <string.h>
|
||||
#include "CougarRevengerSTController.h"
|
||||
|
||||
CougarRevengerSTController::CougarRevengerSTController(hid_device* dev_handle, const hid_device_info& info)
|
||||
{
|
||||
|
|
@ -81,7 +84,7 @@ void CougarRevengerSTController::SetDirect(unsigned char zone, RGBColor color, u
|
|||
}
|
||||
|
||||
void CougarRevengerSTController::SetModeData(unsigned char zone, unsigned char mode_value, std::vector<RGBColor> colors, unsigned char brightness, unsigned char speed)
|
||||
{
|
||||
{
|
||||
unsigned char usb_buf[PACKET_DATA_LENGTH];
|
||||
|
||||
const cougar_mode& m = modes_mapping.at(mode_value);
|
||||
|
|
@ -195,7 +198,7 @@ void CougarRevengerSTController::ActivateMode(unsigned char zone, unsigned char
|
|||
}
|
||||
|
||||
void CougarRevengerSTController::Apply()
|
||||
{
|
||||
{
|
||||
unsigned char usb_buf[PACKET_DATA_LENGTH];
|
||||
memset(usb_buf, 0x00, PACKET_DATA_LENGTH);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
/*-----------------------------------------*\
|
||||
| CougarRevengerSTController.h |
|
||||
| |
|
||||
| Driver for Cougar Revenger ST lighting |
|
||||
| controller - header file |
|
||||
| |
|
||||
| Guimard Morgan (morg) 3/17/2022 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| CougarRevengerSTController.h |
|
||||
| |
|
||||
| Driver for Cougar Revenger ST |
|
||||
| |
|
||||
| Morgan Guimard (morg) 17 Mar 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_CougarRevengerST.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenRGB |
|
||||
| Cougar Revenger ST USB Driver |
|
||||
| |
|
||||
| Guimard Morgan (morg) 3/17/2022 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_CougarRevengerST.h"
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_CougarRevengerST.cpp |
|
||||
| |
|
||||
| RGBController for Cougar Revenger ST |
|
||||
| |
|
||||
| Morgan Guimard (morg) 17 Mar 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include "RGBController_CougarRevengerST.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Cougar Revenger ST
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_CougarRevengerST.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenRGB |
|
||||
| Cougar Revenger ST USB Driver |
|
||||
| |
|
||||
| Guimard Morgan (morg) 3/17/2022 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_CougarRevengerST.h |
|
||||
| |
|
||||
| RGBController for Cougar Revenger ST |
|
||||
| |
|
||||
| Morgan Guimard (morg) 17 Mar 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
@ -20,7 +22,7 @@ public:
|
|||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue