Move and update Logitech G560 controller files to new standardized header comment
This commit is contained in:
parent
6c30e92b21
commit
433ac0b8ce
5 changed files with 71 additions and 67 deletions
|
|
@ -1,18 +1,19 @@
|
||||||
/*-----------------------------------------*\
|
/*---------------------------------------------------------*\
|
||||||
| LogitechG560Controller.cpp |
|
| LogitechG560Controller.cpp |
|
||||||
| |
|
| |
|
||||||
| Driver for Logitech G560 RGB Speaker |
|
| Driver for Logitech G560 |
|
||||||
| Charging System |
|
| |
|
||||||
| |
|
| Cheerpipe 28 Oct 2020 |
|
||||||
| Cheerpipe 10/28/2020 |
|
| based on TheRogueZeta 31 Aug 2020 |
|
||||||
| Based on |
|
| |
|
||||||
| TheRogueZeta 8/31/2020 |
|
| This file is part of the OpenRGB project |
|
||||||
\*-----------------------------------------*/
|
| SPDX-License-Identifier: GPL-2.0-only |
|
||||||
|
\*---------------------------------------------------------*/
|
||||||
|
|
||||||
#include "LogitechG560Controller.h"
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include "LogitechG560Controller.h"
|
||||||
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
/*-----------------------------------------*\
|
/*---------------------------------------------------------*\
|
||||||
| LogitechG560Controller.h |
|
| LogitechG560Controller.h |
|
||||||
| |
|
| |
|
||||||
| Definitions and types for Logitech G560 |
|
| Driver for Logitech G560 |
|
||||||
| RGB Speaker |
|
| |
|
||||||
| |
|
| Cheerpipe 28 Oct 2020 |
|
||||||
| Cheerpipe 10/28/2020 |
|
| based on TheRogueZeta 31 Aug 2020 |
|
||||||
| Based on |
|
| |
|
||||||
| TheRogueZeta 8/31/2020 |
|
| This file is part of the OpenRGB project |
|
||||||
\*-----------------------------------------*/
|
| SPDX-License-Identifier: GPL-2.0-only |
|
||||||
|
\*---------------------------------------------------------*/
|
||||||
|
|
||||||
#include "RGBController.h"
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <hidapi/hidapi.h>
|
#include <hidapi/hidapi.h>
|
||||||
|
#include "RGBController.h"
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define LOGI_G560_LED_PACKET_SIZE 20
|
#define LOGI_G560_LED_PACKET_SIZE 20
|
||||||
#define LOGI_G560_LED_COMMAND_SEND_RETRIES 3
|
#define LOGI_G560_LED_COMMAND_SEND_RETRIES 3
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
/*-----------------------------------------*\
|
/*---------------------------------------------------------*\
|
||||||
| RGBController_LogitechG560.cpp |
|
| RGBController_LogitechG560.cpp |
|
||||||
| |
|
| |
|
||||||
| Generic RGB Interface for |
|
| RGBController for Logitech G560 |
|
||||||
| Logitech G560 RGB Speaker |
|
| |
|
||||||
| |
|
| Cheerpipe 28 Oct 2020 |
|
||||||
| Cheerpipe 10/28/2020 |
|
| based on TheRogueZeta 31 Aug 2020 |
|
||||||
| Based on |
|
| |
|
||||||
| TheRogueZeta 8/31/2020 |
|
| This file is part of the OpenRGB project |
|
||||||
\*-----------------------------------------*/
|
| SPDX-License-Identifier: GPL-2.0-only |
|
||||||
|
\*---------------------------------------------------------*/
|
||||||
|
|
||||||
#include "RGBController_LogitechG560.h"
|
#include "RGBController_LogitechG560.h"
|
||||||
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*---------------------------------------------------------*\
|
||||||
|
| RGBController_LogitechG560.h |
|
||||||
|
| |
|
||||||
|
| RGBController for Logitech G560 |
|
||||||
|
| |
|
||||||
|
| Cheerpipe 28 Oct 2020 |
|
||||||
|
| based on 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 "LogitechG560Controller.h"
|
||||||
|
|
||||||
|
class RGBController_LogitechG560 : public RGBController
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RGBController_LogitechG560(LogitechG560Controller* controller_ptr);
|
||||||
|
|
||||||
|
void SetupZones();
|
||||||
|
|
||||||
|
void ResizeZone(int zone, int new_size);
|
||||||
|
|
||||||
|
void DeviceUpdateLEDs();
|
||||||
|
void UpdateZoneLEDs(int zone);
|
||||||
|
void UpdateSingleLED(int led);
|
||||||
|
|
||||||
|
void DeviceUpdateMode();
|
||||||
|
|
||||||
|
private:
|
||||||
|
LogitechG560Controller* controller;
|
||||||
|
};
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
/*-----------------------------------------*\
|
|
||||||
| RGBController_LogitechG560.h |
|
|
||||||
| |
|
|
||||||
| Generic RGB Interface for |
|
|
||||||
| G560 RGB Speaker |
|
|
||||||
| |
|
|
||||||
| Cheerpipe 10/28/2020 |
|
|
||||||
| Based on |
|
|
||||||
| TheRogueZeta 8/31/2020 |
|
|
||||||
\*-----------------------------------------*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "RGBController.h"
|
|
||||||
#include "LogitechG560Controller.h"
|
|
||||||
|
|
||||||
class RGBController_LogitechG560 : public RGBController
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
RGBController_LogitechG560(LogitechG560Controller* controller_ptr);
|
|
||||||
|
|
||||||
void SetupZones();
|
|
||||||
|
|
||||||
void ResizeZone(int zone, int new_size);
|
|
||||||
|
|
||||||
void DeviceUpdateLEDs();
|
|
||||||
void UpdateZoneLEDs(int zone);
|
|
||||||
void UpdateSingleLED(int led);
|
|
||||||
|
|
||||||
void DeviceUpdateMode();
|
|
||||||
|
|
||||||
private:
|
|
||||||
LogitechG560Controller* controller;
|
|
||||||
};
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue