Move and update Logitech G Lightsync controller files to new standardized header comment
This commit is contained in:
parent
94ccb0a3ba
commit
0760e13808
11 changed files with 166 additions and 149 deletions
|
|
@ -1,15 +1,16 @@
|
|||
/*-----------------------------------------*\
|
||||
| LogitechGLightsyncController.cpp |
|
||||
| |
|
||||
| Driver for Logitech G Lightsync |
|
||||
| lighting controllers |
|
||||
| |
|
||||
| TheRogueZeta 04/21/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "LogitechGLightsyncController.h"
|
||||
/*---------------------------------------------------------*\
|
||||
| LogitechGLightsyncController.cpp |
|
||||
| |
|
||||
| Driver for Logitech Lightsync |
|
||||
| |
|
||||
| TheRogueZeta 21 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "LogitechGLightsyncController.h"
|
||||
|
||||
LogitechGLightsyncController::LogitechGLightsyncController(hid_device* dev_cmd_handle, hid_device *dev_handle, const char *path, unsigned char hid_dev_index, unsigned char hid_feature_index, unsigned char hid_fctn_ase_id)
|
||||
{
|
||||
|
|
@ -1,20 +1,21 @@
|
|||
/*-----------------------------------------*\
|
||||
| LogitechGLightsyncController.h |
|
||||
| |
|
||||
| Definitions and types for Logitech |
|
||||
| Lightsync lighting controllers |
|
||||
| |
|
||||
| TheRogueZeta 04/21/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController.h"
|
||||
|
||||
#include <string>
|
||||
#include <hidapi/hidapi.h>
|
||||
#include <memory>
|
||||
/*---------------------------------------------------------*\
|
||||
| LogitechGLightsyncController.h |
|
||||
| |
|
||||
| Driver for Logitech Lightsync |
|
||||
| |
|
||||
| TheRogueZeta 21 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <hidapi/hidapi.h>
|
||||
#include "RGBController.h"
|
||||
|
||||
enum
|
||||
{
|
||||
LOGITECH_G_LIGHTSYNC_MODE_OFF = 0x00,
|
||||
|
|
@ -28,7 +29,7 @@ enum
|
|||
| Values are multiplied by 100 later to give lots of GUI steps. |
|
||||
\*---------------------------------------------------------------------------------------------*/
|
||||
enum
|
||||
{
|
||||
{
|
||||
LOGITECH_G_LIGHTSYNC_SPEED_SLOWEST = 0xC8, /* Slowest speed */
|
||||
LOGITECH_G_LIGHTSYNC_SPEED_NORMAL = 0x32, /* Normal speed */
|
||||
LOGITECH_G_LIGHTSYNC_SPEED_FASTEST = 0x0A, /* Fastest speed */
|
||||
|
|
@ -39,10 +40,10 @@ class LogitechGLightsyncController
|
|||
public:
|
||||
LogitechGLightsyncController(
|
||||
hid_device* dev_cmd_handle,
|
||||
hid_device* dev_handle,
|
||||
const char* path,
|
||||
unsigned char hid_dev_index,
|
||||
unsigned char hid_feature_index,
|
||||
hid_device* dev_handle,
|
||||
const char* path,
|
||||
unsigned char hid_dev_index,
|
||||
unsigned char hid_feature_index,
|
||||
unsigned char hid_fctn_ase_id);
|
||||
LogitechGLightsyncController(
|
||||
hid_device* dev_cmd_handle,
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_LogitechGLightsync.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for |
|
||||
| Logitech G Lightsync Devices |
|
||||
| |
|
||||
| TheRogueZeta 04/21/2021 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_LogitechGLightsync.cpp |
|
||||
| |
|
||||
| RGBController for Logitech Lightsync |
|
||||
| |
|
||||
| TheRogueZeta 21 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_LogitechGLightsync.h"
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| RGBController_LogitechGLightsync.h |
|
||||
| |
|
||||
| RGBController for Logitech Lightsync |
|
||||
| |
|
||||
| TheRogueZeta 21 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "LogitechGLightsyncController.h"
|
||||
|
||||
class RGBController_LogitechGLightsync : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_LogitechGLightsync(LogitechGLightsyncController* controller_ptr);
|
||||
~RGBController_LogitechGLightsync();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
LogitechGLightsyncController* controller;
|
||||
};
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_LogitechGLightsync1zone.cpp|
|
||||
| |
|
||||
| Generic RGB Interface for single zone |
|
||||
| Logitech G Lightsync Devices |
|
||||
| |
|
||||
| TheRogueZeta 04/21/2021 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_LogitechGLightsync1zone.cpp |
|
||||
| |
|
||||
| RGBController for single zone Logitech Lightsync |
|
||||
| |
|
||||
| TheRogueZeta 21 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_LogitechGLightsync1zone.h"
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| RGBController_LogitechGLightsync1zone.h |
|
||||
| |
|
||||
| RGBController for single zone Logitech Lightsync |
|
||||
| |
|
||||
| TheRogueZeta 21 Apr 2021 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "LogitechGLightsyncController.h"
|
||||
|
||||
class RGBController_LogitechGLightsync1zone : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_LogitechGLightsync1zone(LogitechGLightsyncController* controller_ptr);
|
||||
~RGBController_LogitechGLightsync1zone();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
LogitechGLightsyncController* controller;
|
||||
};
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_LogitechGPowerPlay.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for |
|
||||
| Logitech G PowerPlay Wireless Mousemat |
|
||||
| |
|
||||
| TheRogueZeta 8/31/2020 |
|
||||
\*-----------------------------------------*/
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_LogitechGPowerPlay.cpp |
|
||||
| |
|
||||
| RGBController for Logitech G PowerPlay |
|
||||
| |
|
||||
| TheRogueZeta 31 Aug 2020 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_LogitechGPowerPlay.h"
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| RGBController_LogitechGPowerPlay.h |
|
||||
| |
|
||||
| RGBController for Logitech G PowerPlay |
|
||||
| |
|
||||
| TheRogueZeta 31 Aug 2020 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "LogitechGLightsyncController.h"
|
||||
|
||||
class RGBController_LogitechGPowerPlay : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_LogitechGPowerPlay(LogitechGLightsyncController* controller_ptr);
|
||||
~RGBController_LogitechGPowerPlay();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
LogitechGLightsyncController* controller;
|
||||
};
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_LogitechGLightsync.h |
|
||||
| |
|
||||
| Generic RGB Interface for |
|
||||
| Logitech G Lightsync Devices |
|
||||
| |
|
||||
| TheRogueZeta 04/21/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "LogitechGLightsyncController.h"
|
||||
|
||||
class RGBController_LogitechGLightsync : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_LogitechGLightsync(LogitechGLightsyncController* controller_ptr);
|
||||
~RGBController_LogitechGLightsync();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
LogitechGLightsyncController* controller;
|
||||
};
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_LogitechGLightsync1zone.h |
|
||||
| |
|
||||
| Generic RGB Interface for single zone |
|
||||
| Logitech G Lightsync Devices |
|
||||
| |
|
||||
| TheRogueZeta 04/21/2021 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "LogitechGLightsyncController.h"
|
||||
|
||||
class RGBController_LogitechGLightsync1zone : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_LogitechGLightsync1zone(LogitechGLightsyncController* controller_ptr);
|
||||
~RGBController_LogitechGLightsync1zone();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
LogitechGLightsyncController* controller;
|
||||
};
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_LogitechGPowerPlay.h |
|
||||
| |
|
||||
| Generic RGB Interface for |
|
||||
| Logitech G PowerPlay Wireless Mousemat |
|
||||
| |
|
||||
| TheRogueZeta 8/31/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "LogitechGLightsyncController.h"
|
||||
|
||||
class RGBController_LogitechGPowerPlay : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_LogitechGPowerPlay(LogitechGLightsyncController* controller_ptr);
|
||||
~RGBController_LogitechGPowerPlay();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
LogitechGLightsyncController* controller;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue