Enumerate Wireless connected Logitech Lightspeed (Unifying) devices
+ Added common library for Logitech Protocol
+ Moved wireless detection to the LogitechProtocolCommon.cpp
+ Adding Direct Mode to the wireless control
+ Copying the mutex from Lightsync controller to avoid interference
+ Adding LED count info to controller constructor
+ Created a new Logitech class
+ Added Feature list enumeration
+ Added DeviceName detection from device
* Changed LogitechGProWirelessController to accomodate generic devices
* LED count from device is now used in RGBController setup
+ Adding Windows specific detection as Linux Kernel handles this already.
+ Adding virtual PIDS for wireless detection
* LOGITECH G403
* LOGITECH G502
* LOGITECH G703
* LOGITECH G900
* LOGITECH G903
* LOGITECH GPRO
+ Adding Logitech G900 Wired Gaming Mouse PID
+ Adding other all lightspeed mice to wired detector for testing
* Genericised and optimised code paths
* Speed up wireless detection
Commit amended for code style by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
parent
d8252281ce
commit
259ba898b0
9 changed files with 1353 additions and 107 deletions
|
|
@ -0,0 +1,62 @@
|
|||
/*-----------------------------------------*\
|
||||
| LogitechGProWirelessController.h |
|
||||
| |
|
||||
| Definitions and types for Logitech G Pro |
|
||||
| Wireless Gaming Mouse lighting controller|
|
||||
| |
|
||||
| TheRogueZeta 8/5/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController.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 LogitechGProWirelessController
|
||||
{
|
||||
public:
|
||||
LogitechGProWirelessController(hid_device* dev_handle, const char* path);
|
||||
~LogitechGProWirelessController();
|
||||
|
||||
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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue