mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-01 11:47:56 -05:00
+ Logitech detection and set up includes debug logging for troubleshooting + Adding a pre check to LogitechLightspeedController::GetSerialString() * Rearranging check logic to ensure that all usages per device are bundled * Adding PID check to usage bundle to ensure we don't roll into the next device in hid_device_info - Code cleanup to remove dev_use1 post detection & decoupling the bundled usages for wired lightspeed devices * Changing wired lightspeed devices to REGISTER_HID_DETECTOR_IPU to target the correct FAP long message usage + Adding device validity check isValid() from @cheerpipe + Adding wireless check into connected() prior to initialising device + Adding the getDeviceFeatureList() back into the Logitech Lightspeed device set up + Changed getRGBconfig() for more robust detection + Adding Powerplay Mat virtual PID for Linux + Adding Logitech G733 for testing @ I=2 P=0xFF43 U=514 + Adding LOGITECH_POWERPLAY_MAT_VIRTUAL_PID to Linux detection + Adding LOGITECH_POWERPLAY_MAT_VIRTUAL_PID and LOGITECH_G733_PID to 60-openrgb.rules + Adding LOGITECH_DEVICE_TYPE mapping and extending validity to include new HEADSET type
65 lines
2.2 KiB
C++
65 lines
2.2 KiB
C++
/*-----------------------------------------*\
|
|
| LogitechLightspeedController.h |
|
|
| |
|
|
| Definitions and types for Logitech G |
|
|
| Lightsync Wireless Gaming Mice lighting |
|
|
| controller |
|
|
| |
|
|
| TheRogueZeta 8/5/2020 |
|
|
\*-----------------------------------------*/
|
|
|
|
#include "RGBController.h"
|
|
#include "LogManager.h"
|
|
#include "LogitechProtocolCommon.h"
|
|
|
|
#include <string>
|
|
#include <hidapi/hidapi.h>
|
|
|
|
#pragma once
|
|
|
|
enum
|
|
{
|
|
LOGITECH_G_PRO_WIRELESS_MODE_OFF = 0x00,
|
|
LOGITECH_G_PRO_WIRELESS_MODE_STATIC = 0x01,
|
|
LOGITECH_G_PRO_WIRELESS_MODE_CYCLE = 0x02,
|
|
LOGITECH_G_PRO_WIRELESS_MODE_BREATHING = 0x03,
|
|
};
|
|
|
|
/*---------------------------------------------------------------------------------------------*\
|
|
| Speed is 1000 for fast and 20000 for slow. |
|
|
| Values are multiplied by 100 later to give lots of GUI steps. |
|
|
\*---------------------------------------------------------------------------------------------*/
|
|
enum
|
|
{
|
|
LOGITECH_G_PRO_WIRELESS_SPEED_SLOWEST = 0xC8, /* Slowest speed */
|
|
LOGITECH_G_PRO_WIRELESS_SPEED_NORMAL = 0x32, /* Normal speed */
|
|
LOGITECH_G_PRO_WIRELESS_SPEED_FASTEST = 0x0A, /* Fastest speed */
|
|
};
|
|
|
|
class LogitechLightspeedController
|
|
{
|
|
public:
|
|
LogitechLightspeedController(hid_device* dev_handle, const char* path);
|
|
~LogitechLightspeedController();
|
|
|
|
logitech_device* lightspeed;
|
|
|
|
std::string GetDeviceLocation();
|
|
std::string GetSerialString();
|
|
|
|
void SendMouseMode
|
|
(
|
|
unsigned char mode,
|
|
unsigned short speed,
|
|
unsigned char zone,
|
|
unsigned char red,
|
|
unsigned char green,
|
|
unsigned char blue
|
|
// unsigned char brightness
|
|
);
|
|
|
|
private:
|
|
hid_device* dev;
|
|
std::string location;
|
|
};
|