Publish curated LumaOps source from c85ee9ef8f1454f5c305398902afbb9e6738de40
Managed validation / full (push) Failing after 8s
Managed validation / full (push) Failing after 8s
This commit is contained in:
1 parent
91f8b3e3c1
commit
def7920856
2271 files changed
+501225
-501178
No files matched your search
+52
-52
@@ -1,52 +1,52 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| SonyDualSenseController.h |
|
||||
| |
|
||||
| Driver for Sony DualSense |
|
||||
| |
|
||||
| Flora Aubry 01 Jul 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <hidapi.h>
|
||||
#include "RGBController.h"
|
||||
|
||||
#define SONY_DUALSENSE_LIGHTBAR_LED_COUNT 1
|
||||
#define SONY_DUALSENSE_PLAYER_LED_COUNT 5
|
||||
#define SONY_DUALSENSE_BT_PACKET_SIZE 78
|
||||
#define SONY_DUALSENSE_USB_PACKET_SIZE 48
|
||||
|
||||
enum
|
||||
{
|
||||
SONY_DUALSENSE_DIRECT_MODE_VALUE = 0x01,
|
||||
SONY_DUALSENSE_MIC_OFF_MODE_VALUE = 0x00,
|
||||
SONY_DUALSENSE_MIC_PULSE_MODE_VALUE = 0x02,
|
||||
SONY_DUALSENSE_BRIGHTNESS_MIN = 0x00,
|
||||
SONY_DUALSENSE_BRIGHTNESS_MAX = 0x02,
|
||||
SONY_DUALSENSE_DEFAULT_BRIGHTNESS = 0x01
|
||||
};
|
||||
|
||||
class SonyDualSenseController
|
||||
{
|
||||
public:
|
||||
SonyDualSenseController(hid_device * device_handle, const char * device_path, bool is_bluetooth, std::string dev_name);
|
||||
~SonyDualSenseController();
|
||||
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SetColors(std::vector<RGBColor> colors, unsigned char brightness, unsigned char mode_value);
|
||||
bool IsBluetooth();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
bool is_bluetooth;
|
||||
};
|
||||
/*---------------------------------------------------------*\
|
||||
| SonyDualSenseController.h |
|
||||
| |
|
||||
| Driver for Sony DualSense |
|
||||
| |
|
||||
| Flora Aubry 01 Jul 2022 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <hidapi.h>
|
||||
#include "RGBController.h"
|
||||
|
||||
#define SONY_DUALSENSE_LIGHTBAR_LED_COUNT 1
|
||||
#define SONY_DUALSENSE_PLAYER_LED_COUNT 5
|
||||
#define SONY_DUALSENSE_BT_PACKET_SIZE 78
|
||||
#define SONY_DUALSENSE_USB_PACKET_SIZE 48
|
||||
|
||||
enum
|
||||
{
|
||||
SONY_DUALSENSE_DIRECT_MODE_VALUE = 0x01,
|
||||
SONY_DUALSENSE_MIC_OFF_MODE_VALUE = 0x00,
|
||||
SONY_DUALSENSE_MIC_PULSE_MODE_VALUE = 0x02,
|
||||
SONY_DUALSENSE_BRIGHTNESS_MIN = 0x00,
|
||||
SONY_DUALSENSE_BRIGHTNESS_MAX = 0x02,
|
||||
SONY_DUALSENSE_DEFAULT_BRIGHTNESS = 0x01
|
||||
};
|
||||
|
||||
class SonyDualSenseController
|
||||
{
|
||||
public:
|
||||
SonyDualSenseController(hid_device * device_handle, const char * device_path, bool is_bluetooth, std::string dev_name);
|
||||
~SonyDualSenseController();
|
||||
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SetColors(std::vector<RGBColor> colors, unsigned char brightness, unsigned char mode_value);
|
||||
bool IsBluetooth();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
bool is_bluetooth;
|
||||
};
|
||||
Reference in new issue
Block a user