Compare commits
41
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c1ec2f187 | ||
|
|
7dadc8d9ee | ||
|
|
cd7146d611 | ||
|
|
853833d18a | ||
|
|
c500803d95 | ||
|
|
68a92d0219 | ||
|
|
5221d93fc0 | ||
|
|
22deb13ac0 | ||
|
|
58b875d5ed | ||
|
|
12f5d6070f | ||
|
|
5e0b1fa3cc | ||
|
|
1ee3a7c3e2 | ||
|
|
43c13db970 | ||
|
|
b5818d22af | ||
|
|
fd7a5fc057 | ||
|
|
5af1ca9363 | ||
|
|
c4d096e60c | ||
|
|
174b0743a9 | ||
|
|
4b50533560 | ||
|
|
1555dae1c8 | ||
|
|
8b5717470a | ||
|
|
38b2cf03b0 | ||
|
|
1293b07c9e | ||
|
|
aa4c41ddf7 | ||
|
|
628f423171 | ||
|
|
a9d179f93a | ||
|
|
4955dc0844 | ||
|
|
3f66f0d67a | ||
|
|
bc7ab5170a | ||
|
|
d61649f748 | ||
|
|
9a33a78574 | ||
|
|
030c0c60f3 | ||
|
|
19ff834d99 | ||
|
|
400a078a05 | ||
|
|
618bebc46b | ||
|
|
dee23ec52e | ||
|
|
baca85b8cd | ||
|
|
00b1cfcb3b | ||
|
|
a9dbf5ef70 | ||
|
|
a0b1153ec3 | ||
|
|
39a5e0eba0 |
@@ -11,7 +11,7 @@ using namespace std::chrono_literals;
|
||||
/*----------------------------------------------------------------------*\
|
||||
| This list contains the available SMBus addresses for mapping Aura RAM |
|
||||
\*----------------------------------------------------------------------*/
|
||||
#define AURA_RAM_ADDRESS_COUNT 22
|
||||
#define AURA_RAM_ADDRESS_COUNT 23
|
||||
|
||||
static const unsigned char aura_ram_addresses[] =
|
||||
{
|
||||
@@ -34,6 +34,7 @@ static const unsigned char aura_ram_addresses[] =
|
||||
0x66,
|
||||
0x67,
|
||||
0x39,
|
||||
0x3A,
|
||||
0x3B,
|
||||
0x3C,
|
||||
0x3D
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/*-----------------------------------------*\
|
||||
| GalaxGPUController.cpp |
|
||||
| |
|
||||
| Driver for Galax / KFA2 RGB on GPUs |
|
||||
| |
|
||||
| Niels Westphal (crashniels) 12.07.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "GalaxGPUController.h"
|
||||
#include <cstring>
|
||||
|
||||
GalaxGPUController::GalaxGPUController(i2c_smbus_interface* bus, galax_gpu_dev_id dev)
|
||||
{
|
||||
this->bus = bus;
|
||||
this->dev = dev;
|
||||
|
||||
strcpy(device_name, "Galax RTX GPU"); // Would be nice to get the actual GPU name. Using this as a placeholder.
|
||||
}
|
||||
|
||||
GalaxGPUController::~GalaxGPUController()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::string GalaxGPUController::GetDeviceName()
|
||||
{
|
||||
return(device_name);
|
||||
}
|
||||
|
||||
std::string GalaxGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
return_string.append(addr);
|
||||
return(return_string);
|
||||
}
|
||||
|
||||
unsigned char GalaxGPUController::GetLEDRed()
|
||||
{
|
||||
return(GalaxGPURegisterRead(GALAX_RED_REGISTER));
|
||||
}
|
||||
|
||||
unsigned char GalaxGPUController::GetLEDGreen()
|
||||
{
|
||||
return(GalaxGPURegisterRead(GALAX_GREEN_REGISTER));
|
||||
}
|
||||
|
||||
unsigned char GalaxGPUController::GetLEDBlue()
|
||||
{
|
||||
return(GalaxGPURegisterRead(GALAX_BLUE_REGISTER));
|
||||
}
|
||||
|
||||
void GalaxGPUController::SetLEDColorsDirect(unsigned char red, unsigned char green, unsigned char blue) // Direct Mode is just Static Mode without applying color changes
|
||||
{
|
||||
GalaxGPURegisterWrite(GALAX_RED_REGISTER, red);
|
||||
GalaxGPURegisterWrite(GALAX_GREEN_REGISTER, green);
|
||||
GalaxGPURegisterWrite(GALAX_BLUE_REGISTER, blue);
|
||||
}
|
||||
|
||||
void GalaxGPUController::SetLEDColorsEffect(unsigned char red, unsigned char green, unsigned char blue)
|
||||
{
|
||||
GalaxGPURegisterWrite(GALAX_RED_REGISTER, red);
|
||||
GalaxGPURegisterWrite(GALAX_GREEN_REGISTER, green);
|
||||
GalaxGPURegisterWrite(GALAX_BLUE_REGISTER, blue);
|
||||
}
|
||||
|
||||
void GalaxGPUController::SetMode(unsigned char mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case 1:
|
||||
GalaxGPURegisterWrite(GALAX_MODE_REGISTER_1, GALAX_MODE_STATIC_VALUE_1);
|
||||
GalaxGPURegisterWrite(GALAX_MODE_REGISTER_2, GALAX_MODE_STATIC_VALUE_2);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
GalaxGPURegisterWrite(GALAX_MODE_REGISTER_1, GALAX_MODE_BREATHING_VALUE_1);
|
||||
GalaxGPURegisterWrite(GALAX_MODE_REGISTER_2, GALAX_MODE_BREATHING_VALUE_2);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
GalaxGPURegisterWrite(GALAX_MODE_REGISTER_1, GALAX_MODE_RAINBOW_VALUE_1);
|
||||
GalaxGPURegisterWrite(GALAX_MODE_REGISTER_2, GALAX_MODE_RAINBOW_VALUE_2);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
GalaxGPURegisterWrite(GALAX_MODE_REGISTER_1, GALAX_MODE_CYCLE_BREATHING_VALUE_1);
|
||||
GalaxGPURegisterWrite(GALAX_MODE_REGISTER_2, GALAX_MODE_CYCLE_BREATHING_VALUE_2);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned char GalaxGPUController::GalaxGPURegisterRead(unsigned char reg)
|
||||
{
|
||||
return(bus->i2c_smbus_read_byte_data(dev, reg));
|
||||
}
|
||||
|
||||
void GalaxGPUController::GalaxGPURegisterWrite(unsigned char reg, unsigned char val)
|
||||
{
|
||||
bus->i2c_smbus_write_byte_data(dev, reg, val);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*-----------------------------------------*\
|
||||
| GalaxGPUController.h |
|
||||
| |
|
||||
| Driver for Galax / KFA2 RGB on GPUs |
|
||||
| |
|
||||
| Niels Westphal (crashniels) 12.07.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include <string>
|
||||
#include "i2c_smbus.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef unsigned char galax_gpu_dev_id;
|
||||
|
||||
enum
|
||||
{
|
||||
/* RGB Registers */
|
||||
GALAX_RED_REGISTER = 0x02, /* Red Register */
|
||||
GALAX_GREEN_REGISTER = 0x03, /* Green Register */
|
||||
GALAX_BLUE_REGISTER = 0x04, /* Blue Register */
|
||||
/* MODE Registers */
|
||||
GALAX_MODE_REGISTER_1 = 0x05, /* Mode Register 1 */
|
||||
GALAX_MODE_REGISTER_2 = 0x06, /* Mode Register 2 */
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
/* Static Mode Values */
|
||||
GALAX_MODE_STATIC_VALUE_1 = 0x00,
|
||||
GALAX_MODE_STATIC_VALUE_2 = 0x01,
|
||||
/* Breathing Mode Values */
|
||||
GALAX_MODE_BREATHING_VALUE_1 = 0x04,
|
||||
GALAX_MODE_BREATHING_VALUE_2 = 0x00,
|
||||
/* Rainbow Mode Values */
|
||||
GALAX_MODE_RAINBOW_VALUE_1 = 0x84,
|
||||
GALAX_MODE_RAINBOW_VALUE_2 = 0x02,
|
||||
/* Cycle Breathing Mode Values */
|
||||
GALAX_MODE_CYCLE_BREATHING_VALUE_1 = 0x84,
|
||||
GALAX_MODE_CYCLE_BREATHING_VALUE_2 = 0x40,
|
||||
};
|
||||
|
||||
class GalaxGPUController
|
||||
{
|
||||
public:
|
||||
GalaxGPUController(i2c_smbus_interface* bus, galax_gpu_dev_id);
|
||||
~GalaxGPUController();
|
||||
|
||||
std::string GetDeviceName();
|
||||
std::string GetDeviceLocation();
|
||||
unsigned char GetLEDRed();
|
||||
unsigned char GetLEDGreen();
|
||||
unsigned char GetLEDBlue();
|
||||
void SetLEDColorsDirect(unsigned char red, unsigned char green, unsigned char blue);
|
||||
void SetLEDColorsEffect(unsigned char red, unsigned char green, unsigned char blue);
|
||||
void SetMode(unsigned char mode);
|
||||
|
||||
unsigned char GalaxGPURegisterRead(unsigned char reg);
|
||||
void GalaxGPURegisterWrite(unsigned char reg, unsigned char val);
|
||||
|
||||
bool direct = false; // Temporary solution to check if we are in "Direct" mode
|
||||
|
||||
private:
|
||||
char device_name[16];
|
||||
i2c_smbus_interface * bus;
|
||||
galax_gpu_dev_id dev;
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
/*-----------------------------------------*\
|
||||
| GalaxGPUControllerDetect.cpp |
|
||||
| |
|
||||
| Driver for Galax / KFA2 RGB on GPUs |
|
||||
| |
|
||||
| Niels Westphal (crashniels) 12.07.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "GalaxGPUController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_GalaxGPU.h"
|
||||
#include "i2c_smbus.h"
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* TestForGalaxGPUController *
|
||||
* *
|
||||
* Tests the given address to see if a Galax GPU controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
bool TestForGalaxGPUController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
bool pass = false;
|
||||
|
||||
unsigned char res = bus->i2c_smbus_read_byte_data(address, 0x00);
|
||||
unsigned char res2 = bus->i2c_smbus_read_byte_data(address, 0x01);
|
||||
if(res == 0x27 && res2 == 0x10)
|
||||
{
|
||||
pass = true;
|
||||
}
|
||||
|
||||
return(pass);
|
||||
|
||||
} /* TestForGalaxGPUController() */
|
||||
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectGalaxGPUControllers *
|
||||
* *
|
||||
* Detect Galax GPU controllers on the enumerated I2C busses. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectGalaxGPUControllers(std::vector<i2c_smbus_interface*> &busses, std::vector<RGBController*> &rgb_controllers)
|
||||
{
|
||||
GalaxGPUController* new_GalaxGPU;
|
||||
RGBController_GalaxGPU* new_controller;
|
||||
|
||||
for (unsigned int bus = 0; bus < busses.size(); bus++)
|
||||
{
|
||||
// Check for GALAX controller at 0x23
|
||||
if (TestForGalaxGPUController(busses[bus], 0x23))
|
||||
{
|
||||
new_GalaxGPU = new GalaxGPUController(busses[bus], 0x23);
|
||||
new_controller = new RGBController_GalaxGPU(new_GalaxGPU);
|
||||
rgb_controllers.push_back(new_controller);
|
||||
}
|
||||
}
|
||||
|
||||
} /* DetectGalaxGPUControllers() */
|
||||
@@ -0,0 +1,76 @@
|
||||
#include "HyperXPulsefireSurgeController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_HyperXPulsefireSurge.h"
|
||||
#include <vector>
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| HyperX keyboard vendor IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
#define HYPERX_VID 0x0951
|
||||
#define HYPERX_PULSEFIRE_SURGE_PID 0x16D3
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short usb_vid;
|
||||
unsigned short usb_pid;
|
||||
unsigned char usb_interface;
|
||||
const char * name;
|
||||
} hyperx_device;
|
||||
|
||||
#define HYPERX_NUM_DEVICES (sizeof(device_list) / sizeof(device_list[ 0 ]))
|
||||
|
||||
static const hyperx_device device_list[] =
|
||||
{
|
||||
/*-----------------------------------------------------------------------------------------------------*\
|
||||
| Mice |
|
||||
\*-----------------------------------------------------------------------------------------------------*/
|
||||
{ HYPERX_VID, HYPERX_PULSEFIRE_SURGE_PID, 1, "HyperX Pulsefire Surge" },
|
||||
};
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectHyperXMouseControllers *
|
||||
* *
|
||||
* Tests the USB address to see if a HyperX Mouse controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectHyperXMouseControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
{
|
||||
hid_device_info* info;
|
||||
hid_device* dev = NULL;
|
||||
|
||||
hid_init();
|
||||
|
||||
for(std::size_t device_idx = 0; device_idx < HYPERX_NUM_DEVICES; device_idx++)
|
||||
{
|
||||
dev = NULL;
|
||||
|
||||
info = hid_enumerate(device_list[device_idx].usb_vid, device_list[device_idx].usb_pid);
|
||||
|
||||
//Look for HyperX RGB Peripheral
|
||||
while(info)
|
||||
{
|
||||
if((info->vendor_id == device_list[device_idx].usb_vid)
|
||||
&&(info->product_id == device_list[device_idx].usb_pid)
|
||||
&&(info->interface_number == device_list[device_idx].usb_interface))
|
||||
{
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if( dev )
|
||||
{
|
||||
HyperXPulsefireSurgeController* controller = new HyperXPulsefireSurgeController(dev);
|
||||
|
||||
RGBController_HyperXPulsefireSurge* rgb_controller = new RGBController_HyperXPulsefireSurge(controller);
|
||||
|
||||
rgb_controller->name = device_list[device_idx].name;
|
||||
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
info = info->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*-----------------------------------------*\
|
||||
| HyperXPulsefireSurgeController.cpp |
|
||||
| |
|
||||
| Driver for HyperX Pulsefire Surge |
|
||||
| lighting controller |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 7/25/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "HyperXPulsefireSurgeController.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
HyperXPulsefireSurgeController::HyperXPulsefireSurgeController(hid_device* dev_handle)
|
||||
{
|
||||
dev = dev_handle;
|
||||
}
|
||||
|
||||
HyperXPulsefireSurgeController::~HyperXPulsefireSurgeController()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*-----------------------------------------*\
|
||||
| HyperXPulsefireSurgeController.h |
|
||||
| |
|
||||
| Definitions and types for HyperX |
|
||||
| Pulsefire Surge lighting controller |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 7/25/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController.h"
|
||||
|
||||
#include <string>
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
class HyperXPulsefireSurgeController
|
||||
{
|
||||
public:
|
||||
HyperXPulsefireSurgeController(hid_device* dev_handle);
|
||||
~HyperXPulsefireSurgeController();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
};
|
||||
@@ -12,8 +12,6 @@ MSIGPUController::MSIGPUController(i2c_smbus_interface* bus)
|
||||
{
|
||||
this->bus = bus;
|
||||
this->dev = 0x68;
|
||||
|
||||
strcpy(device_name, "MSI RTX GPU");
|
||||
}
|
||||
|
||||
MSIGPUController::~MSIGPUController()
|
||||
@@ -21,11 +19,6 @@ MSIGPUController::~MSIGPUController()
|
||||
|
||||
}
|
||||
|
||||
std::string MSIGPUController::GetDeviceName()
|
||||
{
|
||||
return(device_name);
|
||||
}
|
||||
|
||||
std::string MSIGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
|
||||
@@ -60,7 +60,6 @@ public:
|
||||
MSIGPUController(i2c_smbus_interface* bus);
|
||||
~MSIGPUController();
|
||||
|
||||
std::string GetDeviceName();
|
||||
std::string GetDeviceLocation();
|
||||
|
||||
void SetRGB1(unsigned char red, unsigned char green, unsigned char blue);
|
||||
@@ -73,7 +72,6 @@ public:
|
||||
void MSIGPURegisterWrite(unsigned char reg, unsigned char val);
|
||||
|
||||
private:
|
||||
char device_name[16];
|
||||
i2c_smbus_interface * bus;
|
||||
msi_gpu_dev_id dev;
|
||||
};
|
||||
|
||||
@@ -13,61 +13,67 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* IsMSIGPUController *
|
||||
* *
|
||||
* Compare PCI IDs *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
/*-----------------------------------------------------*\
|
||||
| NVidia vendor ID |
|
||||
\*-----------------------------------------------------*/
|
||||
#define NVIDIA_VEN 0x10DE
|
||||
|
||||
bool IsMSIGPUController(i2c_smbus_interface* bus)
|
||||
/*-----------------------------------------------------*\
|
||||
| NVidia device IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
#define NVIDIA_RTX2060_DEV 0x1F08
|
||||
#define NVIDIA_RTX2060S_DEV 0x1F06
|
||||
#define NVIDIA_RTX2070_DEV 0x1F02
|
||||
#define NVIDIA_RTX2070S_DEV 0x1E84
|
||||
#define NVIDIA_RTX2080_DEV 0x1E87
|
||||
#define NVIDIA_RTX2080S_DEV 0x1E81
|
||||
#define NVIDIA_RTX2080TI_DEV 0x1E07
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| MSI sub-vendor ID |
|
||||
\*-----------------------------------------------------*/
|
||||
#define MSI_SUB_VEN 0x1462
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| MSI sub-device IDs |
|
||||
\*-----------------------------------------------------*/
|
||||
#define MSI_RTX2060S_GAMING_X_SUB_DEV 0xC752
|
||||
#define MSI_RTX2070S_GAMING_X_SUB_DEV 0x373e
|
||||
#define MSI_RTX2070S_GAMING_X_TRIO_SUB_DEV 0xC726
|
||||
#define MSI_RTX2080_GAMING_X_TRIO_SUB_DEV 0x3726
|
||||
#define MSI_RTX2080S_GAMING_X_TRIO_SUB_DEV 0xC724
|
||||
#define MSI_RTX2080TI_GAMING_X_TRIO_SUB_DEV 0x3715
|
||||
#define MSI_RTX2060_GAMING_Z_6G_SUB_DEV 0x3754
|
||||
#define MSI_RTX2070_ARMOR_SUB_DEV 0x3734
|
||||
#define MSI_RTX2060S_ARMOR_OC_SUB_DEV 0xC754
|
||||
#define MSI_RTX2080_SEA_HAWK_EK_X_SUB_DEV 0x3728
|
||||
#define MSI_RTX2080TI_SEA_HAWK_EK_X_SUB_DEV 0x3717
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool pass = false;
|
||||
int pci_vendor;
|
||||
int pci_device;
|
||||
int pci_subsystem_vendor;
|
||||
int pci_subsystem_device;
|
||||
const char * name;
|
||||
} msi_gpu_pci_device;
|
||||
|
||||
if (bus->port_id != 1)
|
||||
{
|
||||
return(pass);
|
||||
}
|
||||
#define MSI_GPU_NUM_DEVICES (sizeof(device_list) / sizeof(device_list[ 0 ]))
|
||||
|
||||
// MSI RTX 2080S Gaming X Trio
|
||||
if (bus->pci_device == 0x1e81 &&
|
||||
bus->pci_vendor == 0x10de &&
|
||||
bus->pci_subsystem_device == 0xc724 &&
|
||||
bus->pci_subsystem_vendor == 0x1462)
|
||||
{
|
||||
pass = true;
|
||||
}
|
||||
|
||||
// MSI RTX 2070S Gaming X Trio
|
||||
if (bus->pci_device == 0x1e84 &&
|
||||
bus->pci_vendor == 0x10de &&
|
||||
bus->pci_subsystem_device == 0xc726 &&
|
||||
bus->pci_subsystem_vendor == 0x1462)
|
||||
{
|
||||
pass = true;
|
||||
}
|
||||
|
||||
// MSI RTX 2080 Ti Sea Hawk EK X
|
||||
if (bus->pci_device == 0x1e07 &&
|
||||
bus->pci_vendor == 0x10de &&
|
||||
bus->pci_subsystem_device == 0x3717 &&
|
||||
bus->pci_subsystem_vendor == 0x1462)
|
||||
{
|
||||
pass = true;
|
||||
}
|
||||
|
||||
// MSI RTX 2070 ARMOR
|
||||
if (bus->pci_device == 0x1f02 &&
|
||||
bus->pci_vendor == 0x10de &&
|
||||
bus->pci_subsystem_device == 0x3734 &&
|
||||
bus->pci_subsystem_vendor == 0x1462)
|
||||
{
|
||||
pass = true;
|
||||
}
|
||||
|
||||
return(pass);
|
||||
} /* IsMSIGPUController() */
|
||||
static const msi_gpu_pci_device device_list[] =
|
||||
{
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060S_DEV, MSI_SUB_VEN, MSI_RTX2060S_GAMING_X_SUB_DEV, "MSI GeForce RTX 2060 Super Gaming X" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070S_DEV, MSI_SUB_VEN, MSI_RTX2070S_GAMING_X_SUB_DEV, "MSI GeForce RTX 2070 Super Gaming X" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070S_DEV, MSI_SUB_VEN, MSI_RTX2070S_GAMING_X_TRIO_SUB_DEV, "MSI GeForce RTX 2070 Super Gaming X Trio" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080_DEV, MSI_SUB_VEN, MSI_RTX2080_GAMING_X_TRIO_SUB_DEV, "MSI GeForce RTX 2080 Gaming X Trio" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080S_DEV, MSI_SUB_VEN, MSI_RTX2080S_GAMING_X_TRIO_SUB_DEV, "MSI GeForce RTX 2080 Super Gaming X Trio" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080TI_DEV, MSI_SUB_VEN, MSI_RTX2080TI_GAMING_X_TRIO_SUB_DEV, "MSI GeForce RTX 2080Ti Gaming X Trio" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060_DEV, MSI_SUB_VEN, MSI_RTX2060_GAMING_Z_6G_SUB_DEV, "MSI GeForce RTX 2060 Gaming Z 6G" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2060S_DEV, MSI_SUB_VEN, MSI_RTX2060S_ARMOR_OC_SUB_DEV, "MSI GeForce RTX 2060 Super ARMOR OC" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2070_DEV, MSI_SUB_VEN, MSI_RTX2070_ARMOR_SUB_DEV, "MSI GeForce RTX 2070 ARMOR" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080_DEV, MSI_SUB_VEN, MSI_RTX2080_SEA_HAWK_EK_X_SUB_DEV, "MSI GeForce RTX 2080 Sea Hawk EK X" },
|
||||
{ NVIDIA_VEN, NVIDIA_RTX2080TI_DEV, MSI_SUB_VEN, MSI_RTX2080TI_SEA_HAWK_EK_X_SUB_DEV, "MSI GeForce RTX 2080Ti Sea Hawk EK X" },
|
||||
};
|
||||
|
||||
|
||||
/******************************************************************************************\
|
||||
@@ -85,11 +91,23 @@ void DetectMSIGPUControllers(std::vector<i2c_smbus_interface*> &busses, std::vec
|
||||
|
||||
for (unsigned int bus = 0; bus < busses.size(); bus++)
|
||||
{
|
||||
if (IsMSIGPUController(busses[bus]))
|
||||
for(unsigned int dev_idx = 0; dev_idx < MSI_GPU_NUM_DEVICES; dev_idx++)
|
||||
{
|
||||
new_msi_gpu = new MSIGPUController(busses[bus]);
|
||||
new_controller = new RGBController_MSIGPU(new_msi_gpu);
|
||||
rgb_controllers.push_back(new_controller);
|
||||
if (busses[bus]->port_id != 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(busses[bus]->pci_vendor == device_list[dev_idx].pci_vendor &&
|
||||
busses[bus]->pci_device == device_list[dev_idx].pci_device &&
|
||||
busses[bus]->pci_subsystem_vendor == device_list[dev_idx].pci_subsystem_vendor &&
|
||||
busses[bus]->pci_subsystem_device == device_list[dev_idx].pci_subsystem_device)
|
||||
{
|
||||
new_msi_gpu = new MSIGPUController(busses[bus]);
|
||||
new_controller = new RGBController_MSIGPU(new_msi_gpu);
|
||||
new_controller->name = device_list[dev_idx].name;
|
||||
rgb_controllers.push_back(new_controller);
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* DetectMSIGPUControllers() */
|
||||
|
||||
@@ -29,14 +29,15 @@ static LEDCount LedCountToEnum(unsigned int c)
|
||||
|
||||
RGBFusion2USBController::RGBFusion2USBController(hid_device* handle, const char *path, std::string mb_name) : dev(handle)
|
||||
{
|
||||
int res = 0;
|
||||
char text[64] {};
|
||||
unsigned char buffer[64] {};
|
||||
|
||||
if( dev ) {
|
||||
int res = 0;
|
||||
char text[64] = { 0x00 };
|
||||
unsigned char buffer[64] = { 0x00 };
|
||||
|
||||
if( dev )
|
||||
{
|
||||
SetCalibration();
|
||||
|
||||
name = mb_name;
|
||||
// hid report read needs 0x60 packet or it gives IO error
|
||||
SendPacket(0x60, 0x00);
|
||||
|
||||
@@ -46,9 +47,8 @@ RGBFusion2USBController::RGBFusion2USBController(hid_device* handle, const char
|
||||
{
|
||||
report = *reinterpret_cast<IT8297Report*>(buffer);
|
||||
|
||||
name = mb_name;
|
||||
description = std::string(report.str_product, 32);
|
||||
description.erase(std::find(name.begin(), name.end(), '\0'), name.end());
|
||||
//description.erase(std::find(description.begin(), description.end(), '\0'), name.end());
|
||||
|
||||
snprintf(text, 11, "0x%08X", report.fw_ver);
|
||||
version = text;
|
||||
@@ -56,7 +56,6 @@ RGBFusion2USBController::RGBFusion2USBController(hid_device* handle, const char
|
||||
snprintf(text, 11, "0x%08X", report.chip_id);
|
||||
chip_id = text;
|
||||
}
|
||||
|
||||
loc = path;
|
||||
|
||||
EnableBeat(false);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#define IT8297_VID 0x048D
|
||||
#define IT8297_IFC 0
|
||||
#define IT8297_U 0xCC
|
||||
#define IT8297_UPG 0xFF89
|
||||
#define COUNT_RGBFUSION2_PIDS (sizeof(RGBFusion2_pids) / sizeof(RGBFusion2_pids[ 0 ]))
|
||||
|
||||
@@ -43,11 +44,12 @@ void DetectRGBFusion2USBControllers(std::vector<RGBController*> &rgb_controllers
|
||||
while(info)
|
||||
{
|
||||
if((info->vendor_id == IT8297_VID)
|
||||
&& (info->interface_number == IT8297_IFC)
|
||||
#ifdef USE_HID_USAGE
|
||||
&&(info->product_id == tmpPID)
|
||||
&&(info->usage == IT8297_U) //Usage and usage page required to get the correct interface
|
||||
&&(info->usage_page == IT8297_UPG))
|
||||
#else
|
||||
&&(info->interface_number == IT8297_IFC) //Interface is only valid on Windows where there is > 1 interface
|
||||
&&(info->product_id == tmpPID))
|
||||
#endif
|
||||
{
|
||||
@@ -57,6 +59,7 @@ void DetectRGBFusion2USBControllers(std::vector<RGBController*> &rgb_controllers
|
||||
RGBFusion2USBController * controller = new RGBFusion2USBController(dev, info->path, MB_info.getMainboard());
|
||||
RGBController_RGBFusion2USB * rgb_controller = new RGBController_RGBFusion2USB(controller);
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
break;
|
||||
}
|
||||
}
|
||||
info = info->next;
|
||||
|
||||
@@ -49,7 +49,7 @@ void SteelSeriesApexController::SetMode
|
||||
|
||||
void SteelSeriesApexController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
{
|
||||
unsigned char buf[642];
|
||||
unsigned char buf[643];
|
||||
int num_keys = sizeof(keys)/sizeof(*keys);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -60,24 +60,25 @@ void SteelSeriesApexController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up Direct packet |
|
||||
\*-----------------------------------------------------*/
|
||||
buf[0x00] = APEX7_PACKET_ID_DIRECT;
|
||||
buf[0x01] = num_keys;
|
||||
buf[0x00] = 0;
|
||||
buf[0x01] = APEX7_PACKET_ID_DIRECT;
|
||||
buf[0x02] = num_keys;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Fill in color data |
|
||||
\*-----------------------------------------------------*/
|
||||
for(int i = 0; i < num_keys; i++)
|
||||
{
|
||||
buf[(i*4)+2] = keys[i];
|
||||
buf[(i*4)+3] = RGBGetRValue(colors[i]);
|
||||
buf[(i*4)+4] = RGBGetGValue(colors[i]);
|
||||
buf[(i*4)+5] = RGBGetBValue(colors[i]);
|
||||
buf[(i*4)+3] = keys[i];
|
||||
buf[(i*4)+4] = RGBGetRValue(colors[i]);
|
||||
buf[(i*4)+5] = RGBGetGValue(colors[i]);
|
||||
buf[(i*4)+6] = RGBGetBValue(colors[i]);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_send_feature_report(dev, buf, 642);
|
||||
hid_send_feature_report(dev, buf, 643);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------*\
|
||||
@@ -89,28 +90,15 @@ void SteelSeriesApexController::SelectProfile
|
||||
unsigned char profile
|
||||
)
|
||||
{
|
||||
unsigned char buf[64];
|
||||
unsigned char buf[65];
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Zero out buffer, set up first packet and send |
|
||||
| Zero out buffer, set up packet and send |
|
||||
\*-----------------------------------------------------*/
|
||||
memset(buf, 0x00, sizeof(buf));
|
||||
buf[0x00] = 0x69;
|
||||
hid_send_feature_report(dev, buf, 64);
|
||||
buf[0x00] = 0;
|
||||
buf[0x01] = 0x89;
|
||||
buf[0x02] = profile;
|
||||
hid_send_feature_report(dev, buf, 65);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Zero out buffer, set up second packet and send |
|
||||
\*-----------------------------------------------------*/
|
||||
memset(buf, 0x00, sizeof(buf));
|
||||
buf[0x00] = 0x89;
|
||||
buf[0x01] = profile;
|
||||
hid_send_feature_report(dev, buf, 64);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Zero out buffer, set up third packet and send |
|
||||
\*-----------------------------------------------------*/
|
||||
memset(buf, 0x00, sizeof(buf));
|
||||
buf[0x00] = 0x41;
|
||||
hid_send_feature_report(dev, buf, 64);
|
||||
|
||||
}
|
||||
|
||||
@@ -425,6 +425,7 @@ void DetectRGBFusion2SMBusControllers(std::vector<i2c_smbus_interface*>& busses,
|
||||
void DetectRGBFusion2DRAMControllers(std::vector<i2c_smbus_interface*>& busses, std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectMSIGPUControllers(std::vector<i2c_smbus_interface*>& busses, std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectSapphireGPUControllers(std::vector<i2c_smbus_interface*>& busses, std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectGalaxGPUControllers(std::vector<i2c_smbus_interface*>& busses, std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectMSIMysticLightControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
void DetectMSIRGBControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
void DetectAuraUSBControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
@@ -442,6 +443,7 @@ void DetectCorsairPeripheralControllers(std::vector<RGBController*>& rgb_control
|
||||
void DetectCorsairLightingNodeControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
void DetectFaustusControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
void DetectHyperXKeyboardControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectHyperXMouseControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectThermaltakeRiingControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectRGBFusion2USBControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
void DetectRedragonControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
@@ -469,6 +471,7 @@ void DetectRGBControllers(void)
|
||||
DetectCorsairVengeanceControllers(busses, rgb_controllers);
|
||||
DetectCorsairVengeanceProControllers(busses, rgb_controllers);
|
||||
DetectCrucialControllers(busses, rgb_controllers);
|
||||
DetectGalaxGPUControllers(busses, rgb_controllers);
|
||||
DetectHyperXDRAMControllers(busses, rgb_controllers);
|
||||
DetectPatriotViperControllers(busses, rgb_controllers);
|
||||
DetectPolychromeControllers(busses, rgb_controllers);
|
||||
@@ -495,6 +498,7 @@ void DetectRGBControllers(void)
|
||||
DetectMSI3ZoneControllers(rgb_controllers);
|
||||
DetectPoseidonZRGBControllers(rgb_controllers);
|
||||
DetectHyperXKeyboardControllers(rgb_controllers);
|
||||
//DetectHyperXMouseControllers(rgb_controllers);
|
||||
DetectCorsairPeripheralControllers(rgb_controllers);
|
||||
DetectCorsairLightingNodeControllers(rgb_controllers);
|
||||
DetectThermaltakeRiingControllers(rgb_controllers);
|
||||
|
||||
+15
-1
@@ -16,7 +16,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
#-----------------------------------------------------------------------#
|
||||
# Application Configuration #
|
||||
#-----------------------------------------------------------------------#
|
||||
VERSION = 0.3
|
||||
VERSION = 0.31
|
||||
TARGET = OpenRGB
|
||||
TEMPLATE = app
|
||||
|
||||
@@ -59,10 +59,12 @@ INCLUDEPATH += \
|
||||
Controllers/CorsairVengeanceProController/ \
|
||||
Controllers/CrucialController/ \
|
||||
Controllers/DuckyKeyboardController/ \
|
||||
Controllers/GalaxGPUController/ \
|
||||
Controllers/GloriousModelOController/ \
|
||||
Controllers/HuePlusController/ \
|
||||
Controllers/HyperXDRAMController/ \
|
||||
Controllers/HyperXKeyboardController/ \
|
||||
Controllers/HyperXMouseController/ \
|
||||
Controllers/LEDStripController/ \
|
||||
Controllers/LogitechController/ \
|
||||
Controllers/MSI3ZoneController/ \
|
||||
@@ -99,6 +101,7 @@ HEADERS += \
|
||||
i2c_smbus/i2c_smbus.h \
|
||||
i2c_tools/i2c_tools.h \
|
||||
net_port/net_port.h \
|
||||
qt/DeviceView.h \
|
||||
qt/OpenRGBDialog2.h \
|
||||
qt/OpenRGBProfileSaveDialog.h \
|
||||
qt/OpenRGBServerInfoPage.h \
|
||||
@@ -123,11 +126,13 @@ HEADERS += \
|
||||
Controllers/CrucialController/CrucialController.h \
|
||||
Controllers/DuckyKeyboardController/DuckyKeyboardController.h \
|
||||
Controllers/EKController/EKController.h \
|
||||
Controllers/GalaxGPUController/GalaxGPUController.h \
|
||||
Controllers/GloriousModelOController/GloriousModelOController.h \
|
||||
Controllers/HuePlusController/HuePlusController.h \
|
||||
Controllers/HyperXDRAMController/HyperXDRAMController.h \
|
||||
Controllers/HyperXKeyboardController/HyperXAlloyOriginsController.h \
|
||||
Controllers/HyperXKeyboardController/HyperXKeyboardController.h \
|
||||
Controllers/HyperXMouseController/HyperXPulsefireSurgeController..h \
|
||||
Controllers/LEDStripController/LEDStripController.h \
|
||||
Controllers/LogitechController/LogitechG203Controller.h \
|
||||
Controllers/LogitechController/LogitechG403Controller.h \
|
||||
@@ -169,11 +174,13 @@ HEADERS += \
|
||||
RGBController/RGBController_Dummy.h \
|
||||
RGBController/RGBController_EKController.h \
|
||||
RGBController/RGBController_E131.h \
|
||||
RGBController/RGBController_GalaxGPU.h \
|
||||
RGBController/RGBController_GloriousModelO.h \
|
||||
RGBController/RGBController_HuePlus.h \
|
||||
RGBController/RGBController_HyperXAlloyOrigins.h \
|
||||
RGBController/RGBController_HyperXDRAM.h \
|
||||
RGBController/RGBController_HyperXKeyboard.h \
|
||||
RGBController/RGBController_HyperXPulsefireSurge.h \
|
||||
RGBController/RGBController_LEDStrip.h \
|
||||
RGBController/RGBController_LogitechG203.h \
|
||||
RGBController/RGBController_LogitechG403.h \
|
||||
@@ -219,6 +226,7 @@ SOURCES += \
|
||||
i2c_smbus/i2c_smbus.cpp \
|
||||
i2c_tools/i2c_tools.cpp \
|
||||
net_port/net_port.cpp \
|
||||
qt/DeviceView.cpp \
|
||||
qt/OpenRGBDialog2.cpp \
|
||||
qt/OpenRGBProfileSaveDialog.cpp \
|
||||
qt/OpenRGBServerInfoPage.cpp \
|
||||
@@ -256,6 +264,8 @@ SOURCES += \
|
||||
Controllers/DuckyKeyboardController/DuckyKeyboardControllerDetect.cpp \
|
||||
Controllers/EKController/EKControllerDetect.cpp \
|
||||
Controllers/EKController/EKController.cpp \
|
||||
Controllers/GalaxGPUController/GalaxGPUController.cpp \
|
||||
Controllers/GalaxGPUController/GalaxGPUControllerDetect.cpp \
|
||||
Controllers/GloriousModelOController/GloriousModelOController.cpp \
|
||||
Controllers/GloriousModelOController/GloriousModelOControllerDetect.cpp \
|
||||
Controllers/HuePlusController/HuePlusController.cpp \
|
||||
@@ -265,6 +275,8 @@ SOURCES += \
|
||||
Controllers/HyperXKeyboardController/HyperXAlloyOriginsController.cpp \
|
||||
Controllers/HyperXKeyboardController/HyperXKeyboardController.cpp \
|
||||
Controllers/HyperXKeyboardController/HyperXKeyboardControllerDetect.cpp \
|
||||
Controllers/HyperXMouseController/HyperXMouseControllerDetect.cpp \
|
||||
Controllers/HyperXMouseController/HyperXPulsefireSurgeController.cpp \
|
||||
Controllers/LEDStripController/LEDStripController.cpp \
|
||||
Controllers/LEDStripController/LEDStripControllerDetect.cpp \
|
||||
Controllers/LogitechController/LogitechControllerDetect.cpp \
|
||||
@@ -326,11 +338,13 @@ SOURCES += \
|
||||
RGBController/RGBController_DuckyKeyboard.cpp \
|
||||
RGBController/RGBController_Dummy.cpp \
|
||||
RGBController/RGBController_EKController.cpp \
|
||||
RGBController/RGBController_GalaxGPU.cpp \
|
||||
RGBController/RGBController_GloriousModelO.cpp \
|
||||
RGBController/RGBController_HuePlus.cpp \
|
||||
RGBController/RGBController_HyperXAlloyOrigins.cpp \
|
||||
RGBController/RGBController_HyperXDRAM.cpp \
|
||||
RGBController/RGBController_HyperXKeyboard.cpp \
|
||||
RGBController/RGBController_HyperXPulsefireSurge.cpp \
|
||||
RGBController/RGBController_E131.cpp \
|
||||
RGBController/RGBController_LEDStrip.cpp \
|
||||
RGBController/RGBController_LogitechG203.cpp \
|
||||
|
||||
@@ -19,9 +19,13 @@ See the [Project Wiki](https://gitlab.com/CalcProgrammer1/OpenRGB/-/wikis/home)
|
||||
|
||||
## WARNING!
|
||||
|
||||
This project provides a tool to probe the SMBus. This is a potentially dangerous operation if you don't know what you're doing. Exercise caution when clicking the Detect Devices or Dump Device buttons. There have been reports of Gigabyte motherboards having serious issues (bricking the RGB or bricking the entire board) when dumping certain devices. On the same lines, exercise the same caution when using the i2cdump and i2cdetect commands on Linux, as they perform the same functionality. OpenRGB is not liable for damage caused by improper SMBus access.
|
||||
This project interacts directly with hardware using reverse engineered protocols. While we do our best to make sure we're sending the right data, there is always some risk in sending data to hardware when we don't understand exactly how that hardware works.
|
||||
|
||||
As of now, only Gigabyte RGB Fusion 2.0 boards have been reported to have issues.
|
||||
There have been two instances of hardware damage in OpenRGB's development and we've taken precautions to prevent it from happening again.
|
||||
|
||||
* The MSI Mystic Light code reportedly bricked the RGB on certain MSI boards when sending certain modes. This code has been disabled and MSI Mystic Light motherboards will not work with OpenRGB at this time.
|
||||
* There were reports of bricked Gigabyte Aorus Z390 motherboards caused by dumping SMBus address 0x68 in an attempt to reverse engineer the RGB. Due to this, the SMBus Tools page on OpenRGB is hidden by default now as it has no real use to non-developers. Additionally, the RGB Fusion 2 SMBus code is disabled by default because, although it works on boards it is meant for, probing this address (0x68) could damage Gigabyte Z390 boards.
|
||||
* To enable the MSI Mystic Light or Gigabyte RGB Fusion 2 SMBus code, you must uncomment the functions in main.cpp and recompile.
|
||||
|
||||

|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1327,9 +1327,31 @@ void RGBController::SetMode(int mode)
|
||||
UpdateMode();
|
||||
}
|
||||
|
||||
void RGBController::RegisterUpdateCallback(RGBControllerCallback new_callback, void * new_callback_arg)
|
||||
{
|
||||
UpdateCallbacks.push_back(new_callback);
|
||||
UpdateCallbackArgs.push_back(new_callback_arg);
|
||||
}
|
||||
|
||||
void RGBController::SignalUpdate()
|
||||
{
|
||||
UpdateMutex.lock();
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Client info has changed, call the callbacks |
|
||||
\*-------------------------------------------------*/
|
||||
for(unsigned int callback_idx = 0; callback_idx < UpdateCallbacks.size(); callback_idx++)
|
||||
{
|
||||
UpdateCallbacks[callback_idx](UpdateCallbackArgs[callback_idx]);
|
||||
}
|
||||
|
||||
UpdateMutex.unlock();
|
||||
}
|
||||
void RGBController::UpdateLEDs()
|
||||
{
|
||||
CallFlag_UpdateLEDs = true;
|
||||
|
||||
SignalUpdate();
|
||||
}
|
||||
|
||||
void RGBController::UpdateMode()
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
|
||||
typedef unsigned int RGBColor;
|
||||
|
||||
@@ -139,6 +140,8 @@ typedef struct
|
||||
matrix_map_type * matrix_map; /* Matrix map pointer */
|
||||
} zone;
|
||||
|
||||
typedef void (*RGBControllerCallback)(void *);
|
||||
|
||||
class RGBController
|
||||
{
|
||||
public:
|
||||
@@ -188,6 +191,9 @@ public:
|
||||
unsigned char * GetSingleLEDColorDescription(int led);
|
||||
void SetSingleLEDColorDescription(unsigned char* data_buf);
|
||||
|
||||
void RegisterUpdateCallback(RGBControllerCallback new_callback, void * new_callback_arg);
|
||||
void SignalUpdate();
|
||||
|
||||
void UpdateLEDs();
|
||||
//void UpdateZoneLEDs(int zone);
|
||||
//void UpdateSingleLED(int led);
|
||||
@@ -219,4 +225,8 @@ private:
|
||||
//bool CallFlag_UpdateZoneLEDs = false;
|
||||
//bool CallFlag_UpdateSingleLED = false;
|
||||
//bool CallFlag_UpdateMode = false;
|
||||
|
||||
std::mutex UpdateMutex;
|
||||
std::vector<RGBControllerCallback> UpdateCallbacks;
|
||||
std::vector<void *> UpdateCallbackArgs;
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ static const char* led_names[] =
|
||||
"Key: A", //15
|
||||
"Key: Left Windows", //17
|
||||
"Key: Print Screen", //18
|
||||
"Media Mute", //20
|
||||
"Key: Media Mute", //20
|
||||
"Key: Number Pad 8", //21
|
||||
"Key: F2", //24
|
||||
"Key: 2", //25
|
||||
@@ -63,7 +63,7 @@ static const char* led_names[] =
|
||||
"Key: Left Alt", //29
|
||||
"Key: Scroll Lock", //30
|
||||
"Key: Backspace", //31
|
||||
"Media Stop", //32
|
||||
"Key: Media Stop", //32
|
||||
"Key: Number Pad 9", //33
|
||||
"Key: F3", //36
|
||||
"Key: 3", //37
|
||||
@@ -72,7 +72,7 @@ static const char* led_names[] =
|
||||
"Key: X", //40
|
||||
"Key: Pause/Break", //42
|
||||
"Key: Delete", //43
|
||||
"Media Previous", //44
|
||||
"Key: Media Previous", //44
|
||||
"Key: F4", //48
|
||||
"Key: 4", //49
|
||||
"Key: R", //50
|
||||
@@ -81,7 +81,7 @@ static const char* led_names[] =
|
||||
"Key: Space", //53
|
||||
"Key: Insert", //54
|
||||
"Key: End", //55
|
||||
"Media Play/Pause", //56
|
||||
"Key: Media Play/Pause",//56
|
||||
"Key: Number Pad 4", //57
|
||||
"Key: F5", //60
|
||||
"Key: 5", //61
|
||||
@@ -90,7 +90,7 @@ static const char* led_names[] =
|
||||
"Key: V", //64
|
||||
"Key: Home", //66
|
||||
"Key: Page Down", //67
|
||||
"Media Next", //68
|
||||
"Key: Media Next", //68
|
||||
"Key: Number Pad 5", //69
|
||||
"Key: F6", //72
|
||||
"Key: 6", //73
|
||||
@@ -117,7 +117,7 @@ static const char* led_names[] =
|
||||
"Key: K", //99
|
||||
"Key: M", //100
|
||||
"Key: Right Windows", //101
|
||||
"Key: \\", //102
|
||||
"Key: \\ (ANSI)", //102
|
||||
"Key: Up Arrow", //103
|
||||
"Key: Number Pad *", //104
|
||||
"Key: Number Pad 2", //105
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_GalaxGPU.cpp |
|
||||
| |
|
||||
| Driver for Galax / KFA2 RGB on GPUs |
|
||||
| |
|
||||
| Niels Westphal (crashniels) 12.07.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_GalaxGPU.h"
|
||||
|
||||
int RGBController_GalaxGPU::GetDeviceMode()
|
||||
{
|
||||
int modereg1 = galax_gpu->GalaxGPURegisterRead(GALAX_MODE_REGISTER_1);
|
||||
int modereg2 = galax_gpu->GalaxGPURegisterRead(GALAX_MODE_REGISTER_2);
|
||||
int color_mode = MODE_COLORS_PER_LED;
|
||||
|
||||
if (modereg1 == GALAX_MODE_STATIC_VALUE_1 && modereg2 == GALAX_MODE_STATIC_VALUE_2)
|
||||
{
|
||||
active_mode = 1;
|
||||
modes[active_mode].color_mode = MODE_COLORS_PER_LED;
|
||||
}
|
||||
|
||||
if (modereg1 == GALAX_MODE_BREATHING_VALUE_1 && modereg2 == GALAX_MODE_BREATHING_VALUE_2)
|
||||
{
|
||||
active_mode = 2;
|
||||
modes[active_mode].color_mode = MODE_COLORS_PER_LED;
|
||||
}
|
||||
|
||||
if (modereg1 == GALAX_MODE_RAINBOW_VALUE_1 && modereg2 == GALAX_MODE_RAINBOW_VALUE_2)
|
||||
{
|
||||
active_mode = 3;
|
||||
modes[active_mode].color_mode = MODE_COLORS_NONE;
|
||||
}
|
||||
|
||||
if (modereg1 == GALAX_MODE_CYCLE_BREATHING_VALUE_1 && modereg2 == GALAX_MODE_CYCLE_BREATHING_VALUE_2)
|
||||
{
|
||||
active_mode = 4;
|
||||
modes[active_mode].color_mode = MODE_COLORS_NONE;
|
||||
}
|
||||
|
||||
|
||||
return(active_mode);
|
||||
}
|
||||
|
||||
RGBController_GalaxGPU::RGBController_GalaxGPU(GalaxGPUController * galax_gpu_ptr)
|
||||
{
|
||||
galax_gpu = galax_gpu_ptr;
|
||||
|
||||
|
||||
name = galax_gpu->GetDeviceName();
|
||||
type = DEVICE_TYPE_GPU;
|
||||
description = "GALAX / KFA2 RTX GPU";
|
||||
version = "1.0";
|
||||
location = galax_gpu->GetDeviceLocation();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = 1;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = 2;
|
||||
Breathing.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Rainbow;
|
||||
Rainbow.name = "Rainbow";
|
||||
Rainbow.value = 3;
|
||||
Rainbow.flags = 0;
|
||||
Rainbow.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Rainbow);
|
||||
|
||||
mode Cycle_Breathing;
|
||||
Cycle_Breathing.name = "Cycle Breathing";
|
||||
Cycle_Breathing.value = 4;
|
||||
Cycle_Breathing.flags = 0;
|
||||
Cycle_Breathing.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Cycle_Breathing);
|
||||
|
||||
SetupZones();
|
||||
|
||||
active_mode = GetDeviceMode();
|
||||
}
|
||||
|
||||
void RGBController_GalaxGPU::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up zone |
|
||||
\*---------------------------------------------------------*/
|
||||
zone galax_gpu_zone;
|
||||
galax_gpu_zone.name = "GPU";
|
||||
galax_gpu_zone.type = ZONE_TYPE_SINGLE;
|
||||
galax_gpu_zone.leds_min = 1;
|
||||
galax_gpu_zone.leds_max = 1;
|
||||
galax_gpu_zone.leds_count = 1;
|
||||
galax_gpu_zone.matrix_map = NULL;
|
||||
zones.push_back(galax_gpu_zone);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up LED |
|
||||
\*---------------------------------------------------------*/
|
||||
led galax_gpu_led;
|
||||
galax_gpu_led.name = "GPU";
|
||||
leds.push_back(galax_gpu_led);
|
||||
|
||||
SetupColors();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Initialize color |
|
||||
\*---------------------------------------------------------*/
|
||||
unsigned char red = galax_gpu->GetLEDRed();
|
||||
unsigned char grn = galax_gpu->GetLEDGreen();
|
||||
unsigned char blu = galax_gpu->GetLEDBlue();
|
||||
|
||||
colors[0] = ToRGBColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_GalaxGPU::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_GalaxGPU::DeviceUpdateLEDs()
|
||||
{
|
||||
for(std::size_t led = 0; led < colors.size(); led++)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
unsigned char blu = RGBGetBValue(colors[led]);
|
||||
|
||||
if (GetMode() == 1)
|
||||
{
|
||||
galax_gpu->SetLEDColorsDirect(red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
galax_gpu->SetLEDColorsEffect(red, grn, blu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_GalaxGPU::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_GalaxGPU::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_GalaxGPU::SetCustomMode()
|
||||
{
|
||||
active_mode = 1;
|
||||
}
|
||||
|
||||
void RGBController_GalaxGPU::DeviceUpdateMode()
|
||||
{
|
||||
int new_mode = modes[active_mode].value;
|
||||
|
||||
galax_gpu->SetMode(new_mode);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_GalaxGPU.h |
|
||||
| |
|
||||
| Driver for Galax / KFA2 RGB on GPUs |
|
||||
| |
|
||||
| Niels Westphal (crashniels) 12.07.2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "GalaxGPUController.h"
|
||||
|
||||
class RGBController_GalaxGPU : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_GalaxGPU(GalaxGPUController* galax_gpu_ptr);
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
GalaxGPUController* galax_gpu;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
@@ -143,7 +143,7 @@ static const char *led_names[] =
|
||||
"Key: Context",
|
||||
"Key: F12",
|
||||
"Key: Backspace",
|
||||
"Key: \\",
|
||||
"Key: \\ (ANSI)",
|
||||
"Key: Enter",
|
||||
"Key: Right Shift",
|
||||
"Key: Right Control",
|
||||
|
||||
@@ -83,13 +83,13 @@ static const char *led_names[] =
|
||||
"Key: L",
|
||||
"Key: ,",
|
||||
"Key: Context",
|
||||
"Key: UK Enter",
|
||||
"Key: Enter (ISO)",
|
||||
"Key: Left Arrow",
|
||||
"Key: F1",
|
||||
"Key: 1",
|
||||
"Key: Q",
|
||||
"Key: A",
|
||||
"Key: UK Backslash",
|
||||
"Key: \\ (ISO)",
|
||||
"Key: Left Windows",
|
||||
"Key: Print Screen",
|
||||
"Key: F10",
|
||||
@@ -170,7 +170,7 @@ static const char *led_names[] =
|
||||
"Key: K",
|
||||
"Key: M",
|
||||
"Key: Right Windows",
|
||||
"Key: \\",
|
||||
"Key: \\ (ANSI)",
|
||||
"Key: Up Arrow",
|
||||
"Key: Number Pad 5",
|
||||
"Key: Number Pad Enter",
|
||||
@@ -193,10 +193,10 @@ static const char *led_names[] =
|
||||
"RGB Strip 16",
|
||||
"RGB Strip 17",
|
||||
"RGB Strip 18",
|
||||
"Media Previous",
|
||||
"Media Play/Pause",
|
||||
"Media Next",
|
||||
"Media Mute"
|
||||
"Key: Media Previous",
|
||||
"Key: Media Play/Pause",
|
||||
"Key: Media Next",
|
||||
"Key: Media Mute"
|
||||
};
|
||||
|
||||
RGBController_HyperXKeyboard::RGBController_HyperXKeyboard(HyperXKeyboardController* hyperx_ptr)
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_HyperXPulsefireSurge.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for HyperX |
|
||||
| Pulsefire Surge |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 2/2/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_HyperXPulsefireSurge.h"
|
||||
|
||||
RGBController_HyperXPulsefireSurge::RGBController_HyperXPulsefireSurge(HyperXPulsefireSurgeController* hyperx_ptr)
|
||||
{
|
||||
hyperx = hyperx_ptr;
|
||||
|
||||
name = "HyperX Pulsefire Surge Device";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
description = "HyperX Pulsefire Surge Device";
|
||||
|
||||
SetupZones();
|
||||
};
|
||||
|
||||
RGBController_HyperXPulsefireSurge::~RGBController_HyperXPulsefireSurge()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_HyperXPulsefireSurge::SetupZones()
|
||||
{
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_HyperXPulsefireSurge::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_HyperXPulsefireSurge::DeviceUpdateLEDs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_HyperXPulsefireSurge::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_HyperXPulsefireSurge::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_HyperXPulsefireSurge::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_HyperXPulsefireSurge::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_HyperXPulsefireSurge::KeepaliveThread()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*-----------------------------------------*\
|
||||
| RGBController_HyperXPulsefireSurge.h |
|
||||
| |
|
||||
| Generic RGB Interface for HyperX |
|
||||
| Pulsefire Surge |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 7/25/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include <chrono>
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "HyperXPulsefireSurgeController.h"
|
||||
|
||||
class RGBController_HyperXPulsefireSurge : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_HyperXPulsefireSurge(HyperXPulsefireSurgeController* hyperx_ptr);
|
||||
~RGBController_HyperXPulsefireSurge();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
|
||||
void KeepaliveThread();
|
||||
|
||||
private:
|
||||
HyperXPulsefireSurgeController* hyperx;
|
||||
};
|
||||
@@ -87,18 +87,18 @@ static const led_type led_names[] =
|
||||
{ "Key: Backspace", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2A },
|
||||
{ "Key: Tab", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2B },
|
||||
{ "Key: Space", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2C },
|
||||
{ "Key: -/_", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2D },
|
||||
{ "Key: =/+", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2E },
|
||||
{ "Key: [/{", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2F },
|
||||
{ "Key: ]/}", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x30 },
|
||||
{ "Key: \\/|", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x31 },//ANSI only
|
||||
{ "Key: #/~", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x32 },//ISO only
|
||||
{ "Key: ;/:", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x33 },
|
||||
{ "Key: '/'\"", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x34 },
|
||||
{ "Key: `/~", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x35 },
|
||||
{ "Key: ,/<", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x36 },
|
||||
{ "Key: ./>", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x37 },
|
||||
{ "Key: //?", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x38 },
|
||||
{ "Key: -", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2D },
|
||||
{ "Key: =", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2E },
|
||||
{ "Key: [", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x2F },
|
||||
{ "Key: ]", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x30 },
|
||||
{ "Key: \\ (ANSI)", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x31 },//ANSI only
|
||||
{ "Key: #", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x32 },//ISO only
|
||||
{ "Key: ;", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x33 },
|
||||
{ "Key: '", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x34 },
|
||||
{ "Key: `", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x35 },
|
||||
{ "Key: ,", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x36 },
|
||||
{ "Key: .", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x37 },
|
||||
{ "Key: /", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x38 },
|
||||
{ "Key: Caps Lock", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x39 },
|
||||
{ "Key: F1", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x3A },
|
||||
{ "Key: F2", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x3B },
|
||||
@@ -126,23 +126,23 @@ static const led_type led_names[] =
|
||||
{ "Key: Down Arrow", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x51 },
|
||||
{ "Key: Up Arrow", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x52 },
|
||||
{ "Key: Num Lock", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x53 },
|
||||
{ "Key: Num Pad /", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x54 },
|
||||
{ "Key: Num Pad *", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x55 },
|
||||
{ "Key: Num Pad -", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x56 },
|
||||
{ "Key: Num Pad +", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x57 },
|
||||
{ "Key: Num Pad Enter", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x58 },
|
||||
{ "Key: Num Pad 1", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x59 },
|
||||
{ "Key: Num Pad 2", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5A },
|
||||
{ "Key: Num Pad 3", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5B },
|
||||
{ "Key: Num Pad 4", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5C },
|
||||
{ "Key: Num Pad 5", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5D },
|
||||
{ "Key: Num Pad 6", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5E },
|
||||
{ "Key: Num Pad 7", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5F },
|
||||
{ "Key: Num Pad 8", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x60 },
|
||||
{ "Key: Num Pad 9", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x61 },
|
||||
{ "Key: Num Pad 0", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x62 },
|
||||
{ "Key: Num Pad .", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x63 },
|
||||
{ "Key: \\/|", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x64 },//ISO only
|
||||
{ "Key: Number Pad /", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x54 },
|
||||
{ "Key: Number Pad *", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x55 },
|
||||
{ "Key: Number Pad -", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x56 },
|
||||
{ "Key: Number Pad +", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x57 },
|
||||
{ "Key: Number Pad Enter", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x58 },
|
||||
{ "Key: Number Pad 1", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x59 },
|
||||
{ "Key: Number Pad 2", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5A },
|
||||
{ "Key: Number Pad 3", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5B },
|
||||
{ "Key: Number Pad 4", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5C },
|
||||
{ "Key: Number Pad 5", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5D },
|
||||
{ "Key: Number Pad 6", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5E },
|
||||
{ "Key: Number Pad 7", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x5F },
|
||||
{ "Key: Number Pad 8", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x60 },
|
||||
{ "Key: Number Pad 9", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x61 },
|
||||
{ "Key: Number Pad 0", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x62 },
|
||||
{ "Key: Number Pad .", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x63 },
|
||||
{ "Key: \\ (ISO)", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x64 },//ISO only
|
||||
{ "Key: Context", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0x65 },
|
||||
{ "Key: Left Control", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0xE0 },
|
||||
{ "Key: Left Shift", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0xE1 },
|
||||
@@ -152,11 +152,11 @@ static const led_type led_names[] =
|
||||
{ "Key: Right Shift", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0xE5 },
|
||||
{ "Key: Right Alt", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0xE6 },
|
||||
{ "Key: Right Windows", LOGITECH_G810_ZONE_DIRECT_KEYBOARD, 0xE7 },
|
||||
{ "Media Next", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xB5 },
|
||||
{ "Media Previous", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xB6 },
|
||||
{ "Media Stop", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xB7 },
|
||||
{ "Media Play/Pause", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xCD },
|
||||
{ "Media Mute", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xE2 },
|
||||
{ "Key: Media Next", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xB5 },
|
||||
{ "Key: Media Previous", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xB6 },
|
||||
{ "Key: Media Stop", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xB7 },
|
||||
{ "Key: Media Play/Pause", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xCD },
|
||||
{ "Key: Media Mute", LOGITECH_G810_ZONE_DIRECT_MEDIA, 0xE2 },
|
||||
{ "Logo", LOGITECH_G810_ZONE_DIRECT_LOGO, 0x01 },
|
||||
{ "Lighting", LOGITECH_G810_ZONE_DIRECT_INDICATORS, 0x01 },
|
||||
{ "Game Mode", LOGITECH_G810_ZONE_DIRECT_INDICATORS, 0x02 },
|
||||
|
||||
@@ -30,10 +30,9 @@ RGBController_MSIGPU::RGBController_MSIGPU(MSIGPUController * msi_gpu_ptr)
|
||||
{
|
||||
msi_gpu = msi_gpu_ptr;
|
||||
|
||||
name = msi_gpu->GetDeviceName();
|
||||
name = "MSI GPU Device";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
description = "MSI RTX Gaming X Trio GPU Device";
|
||||
version = "0.00.1";
|
||||
description = "MSI GPU Device";
|
||||
location = msi_gpu->GetDeviceLocation();
|
||||
|
||||
mode Off;
|
||||
|
||||
@@ -425,6 +425,20 @@ void RGBController_OpenRazer::SetupZones()
|
||||
|
||||
new_led->name = device_list[device_index]->zones[zone_id]->name + " LED ";
|
||||
new_led->name.append(std::to_string(col_id + 1));
|
||||
|
||||
if(device_list[device_index]->keymap != NULL)
|
||||
{
|
||||
for(int i = 0; i < device_list[device_index]->keymap_size; i++)
|
||||
{
|
||||
if(zone_id == device_list[device_index]->keymap[i].zone &&
|
||||
row_id == device_list[device_index]->keymap[i].row &&
|
||||
col_id == device_list[device_index]->keymap[i].col)
|
||||
{
|
||||
new_led->name = device_list[device_index]->keymap[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
}
|
||||
@@ -450,12 +464,18 @@ void RGBController_OpenRazer::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
/*---------------------------------------------------------*\
|
||||
| If not, use static mode. Static mode should be mode index|
|
||||
| 1 because Off will be index 0 |
|
||||
| If not, use static mode. |
|
||||
\*---------------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
active_mode = 1;
|
||||
for(int i = 0; i < modes.size(); i++)
|
||||
{
|
||||
if(modes[i].value == RAZER_MODE_STATIC)
|
||||
{
|
||||
active_mode = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -373,6 +373,20 @@ void RGBController_OpenRazer::SetupZones()
|
||||
|
||||
new_led->name = device_list[device_index]->zones[zone_id]->name + " LED ";
|
||||
new_led->name.append(std::to_string(col_id + 1));
|
||||
|
||||
if(device_list[device_index]->keymap != NULL)
|
||||
{
|
||||
for(int i = 0; i < device_list[device_index]->keymap_size; i++)
|
||||
{
|
||||
if(zone_id == device_list[device_index]->keymap[i].zone &&
|
||||
row_id == device_list[device_index]->keymap[i].row &&
|
||||
col_id == device_list[device_index]->keymap[i].col)
|
||||
{
|
||||
new_led->name = device_list[device_index]->keymap[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
}
|
||||
@@ -398,12 +412,18 @@ void RGBController_OpenRazer::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
/*---------------------------------------------------------*\
|
||||
| If not, use static mode. Static mode should be mode index|
|
||||
| 1 because Off will be index 0 |
|
||||
| If not, use static mode. |
|
||||
\*---------------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
active_mode = 1;
|
||||
for(int i = 0; i < modes.size(); i++)
|
||||
{
|
||||
if(modes[i].value == RAZER_MODE_STATIC)
|
||||
{
|
||||
active_mode = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ static const char* led_names[] =
|
||||
"Key: 1",
|
||||
"Key: Q",
|
||||
"Key: A",
|
||||
"Key: Windows",
|
||||
"Key: Left Windows",
|
||||
"Key: Down Arrow",
|
||||
"Key: Delete",
|
||||
"Key: F2",
|
||||
@@ -115,7 +115,7 @@ static const char* led_names[] =
|
||||
"Key: P",
|
||||
"Key: ;",
|
||||
"Key: ,",
|
||||
"Key: Fn",
|
||||
"Key: Right Fn",
|
||||
"Key: Number Pad .",
|
||||
"Key: Number Pad *",
|
||||
"Key: F11",
|
||||
@@ -132,7 +132,7 @@ static const char* led_names[] =
|
||||
"Key: Context",
|
||||
"Key: Number Pad -",
|
||||
"Key: Print Screen",
|
||||
"Key: \\",
|
||||
"Key: \\ (ANSI)",
|
||||
"Key: Enter",
|
||||
"Key: Right Control",
|
||||
"Key: Number Pad Enter",
|
||||
|
||||
@@ -103,7 +103,7 @@ static const KnownLayout knownLayoutsLookup
|
||||
{
|
||||
{ "LED Group0", HDR_BACK_IO, 1 },
|
||||
{ "LED Group1", HDR_CPU, 1 },
|
||||
{ "LED Group2", HDR_D_LED2, 1 },
|
||||
{ "LED Group2", HDR_LED_2, 1 },
|
||||
{ "LED Group3", HDR_PCIE, 1 },
|
||||
{ "LED C1/C2", HDR_LED_C1C2, 1 }, // 12VGRB headers seem to be connected
|
||||
}
|
||||
|
||||
@@ -991,7 +991,8 @@ void ApplyOptions(DeviceOptions& options, std::vector<RGBController *> &rgb_cont
|
||||
/*---------------------------------------------------------*\
|
||||
| Set device mode |
|
||||
\*---------------------------------------------------------*/
|
||||
device->SetMode(mode);
|
||||
device->active_mode = mode;
|
||||
device->DeviceUpdateMode();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set device per-LED colors if necessary |
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
openrgb (0.3.0) UNRELEASED; urgency=medium
|
||||
openrgb (0.31.1) UNRELEASED; urgency=medium
|
||||
|
||||
* Builds from git master. See git history for more information.
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
openrgb_0.3.0_source.buildinfo misc optional
|
||||
openrgb_0.31.1_source.buildinfo misc optional
|
||||
|
||||
Vendored
+1
-1
@@ -42,7 +42,7 @@ DMIInfo::DMIInfo()
|
||||
for (QueryObj &i : q_res_BaseBoard)
|
||||
{
|
||||
manufacturer = i["Manufacturer"].c_str();
|
||||
mainboard = i["Model"].c_str();
|
||||
mainboard = i["Product"].c_str();
|
||||
}
|
||||
}
|
||||
#else /* WIN32 */
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <thread>
|
||||
|
||||
#include "OpenRGBDialog2.h"
|
||||
|
||||
@@ -38,6 +39,43 @@ enum
|
||||
RET_FLAG_START_MINIMIZED = 8,
|
||||
};
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* InitializeTimerResolution (Win32) *
|
||||
* *
|
||||
* On Windows, the default timer resolution is 15.6ms. For higher accuracy delays, *
|
||||
* the timer resolution should be set to a shorter interval. The shortest interval *
|
||||
* that can be set is 0.5ms. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
#ifdef _WIN32
|
||||
typedef unsigned int NTSTATUS;
|
||||
typedef NTSTATUS (*NTSETTIMERRESOLUTION)(ULONG DesiredResolution, BOOLEAN SetResolution, PULONG CurrentResolution);
|
||||
|
||||
void InitializeTimerResolution()
|
||||
{
|
||||
NTSETTIMERRESOLUTION NtSetTimerResolution;
|
||||
HMODULE NtDllHandle;
|
||||
ULONG CurrentResolution;
|
||||
|
||||
NtDllHandle = LoadLibrary("ntdll.dll");
|
||||
|
||||
NtSetTimerResolution = (NTSETTIMERRESOLUTION)GetProcAddress(NtDllHandle, "NtSetTimerResolution");
|
||||
|
||||
NtSetTimerResolution(5000, TRUE, &CurrentResolution);
|
||||
}
|
||||
|
||||
void InitializeTimerResolutionThreadFunction()
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
InitializeTimerResolution();
|
||||
|
||||
std::this_thread::sleep_for(500ms);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* AttemptLocalConnection *
|
||||
@@ -90,6 +128,12 @@ bool AttemptLocalConnection()
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#ifdef _WIN32
|
||||
std::thread * InitializeTimerResolutionThread;
|
||||
InitializeTimerResolutionThread = new std::thread(InitializeTimerResolutionThreadFunction);
|
||||
InitializeTimerResolutionThread->detach();
|
||||
#endif
|
||||
|
||||
ProfileManager profile_manager(rgb_controllers);
|
||||
NetworkServer server(rgb_controllers);
|
||||
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
/*-----------------------------------------------------*\
|
||||
| DeviceView.cpp |
|
||||
| |
|
||||
| OpenRGB Device view widget for Qt |
|
||||
| |
|
||||
| Adam Honse ([email protected]) |
|
||||
\*-----------------------------------------------------*/
|
||||
|
||||
#include "DeviceView.h"
|
||||
#include "RGBController.h"
|
||||
#include <QPainter>
|
||||
#include <QResizeEvent>
|
||||
#include <QStyleOption>
|
||||
#include <QtCore/qmath.h>
|
||||
#include <QDebug>
|
||||
|
||||
DeviceView::DeviceView(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
initSize(128,128),
|
||||
mouseDown(false)
|
||||
{
|
||||
controller = NULL;
|
||||
}
|
||||
|
||||
void DeviceView::setController(RGBController * controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
}
|
||||
|
||||
QSize DeviceView::sizeHint () const
|
||||
{
|
||||
return QSize(height(),height());
|
||||
}
|
||||
|
||||
QSize DeviceView::minimumSizeHint () const
|
||||
{
|
||||
return initSize;
|
||||
}
|
||||
|
||||
void DeviceView::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DeviceView::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DeviceView::mouseReleaseEvent(QMouseEvent *)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DeviceView::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
unsigned int size = 0;
|
||||
|
||||
if(event->size().width() < event->size().height())
|
||||
{
|
||||
size = event->size().width();
|
||||
}
|
||||
else
|
||||
{
|
||||
size = event->size().height();
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void DeviceView::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
int width = event->rect().width();
|
||||
int height = event->rect().height();
|
||||
int zone_width = 0;
|
||||
int zone_offset = 0;
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
int box_size = 20;
|
||||
int box_margin = 2;
|
||||
int max_cols = ( width / (box_size + box_margin) ) - 1;
|
||||
|
||||
QPainter painter(this);
|
||||
QStyleOption opt;
|
||||
opt.initFrom(this);
|
||||
|
||||
if(controller != NULL)
|
||||
{
|
||||
for(int zone_idx = 0; zone_idx < controller->zones.size(); zone_idx++)
|
||||
{
|
||||
if((controller->zones[zone_idx].type == ZONE_TYPE_MATRIX)
|
||||
&&(controller->zones[zone_idx].matrix_map != NULL))
|
||||
{
|
||||
unsigned int x_count = controller->zones[zone_idx].matrix_map->width;
|
||||
unsigned int y_count = controller->zones[zone_idx].matrix_map->height;
|
||||
|
||||
zone_width = x_count * (box_size + box_margin);
|
||||
zone_offset = (width - zone_width) / 2;
|
||||
|
||||
for(int x = 0; x < x_count; x++)
|
||||
{
|
||||
for(int y = 0; y < y_count; y++)
|
||||
{
|
||||
unsigned int map_idx = (y * x_count) + x;
|
||||
unsigned int color_idx = controller->zones[zone_idx].matrix_map->map[map_idx];
|
||||
|
||||
if( color_idx != 0xFFFFFFFF )
|
||||
{
|
||||
painter.fillRect((zone_offset + (x * (box_size + box_margin))), ((y + row) * (box_size + box_margin)), box_size, box_size, QColor::fromRgb(RGBGetRValue(controller->zones[zone_idx].colors[color_idx]), RGBGetGValue(controller->zones[zone_idx].colors[color_idx]), RGBGetBValue(controller->zones[zone_idx].colors[color_idx])));
|
||||
painter.drawRect((zone_offset + (x * (box_size + box_margin))), ((y + row) * (box_size + box_margin)), box_size, box_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
row += y_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int x_count = controller->zones[zone_idx].leds_count;
|
||||
|
||||
zone_width = x_count * (box_size + box_margin);
|
||||
|
||||
if(zone_width > width)
|
||||
{
|
||||
zone_width = width;
|
||||
}
|
||||
|
||||
zone_offset = (width - zone_width) / 2;
|
||||
|
||||
for(int led_idx = 0; led_idx < x_count; led_idx++)
|
||||
{
|
||||
painter.fillRect((zone_offset + (col * (box_size + box_margin))), (row * (box_size + box_margin)), box_size, box_size, QColor::fromRgb(RGBGetRValue(controller->zones[zone_idx].colors[led_idx]), RGBGetGValue(controller->zones[zone_idx].colors[led_idx]), RGBGetBValue(controller->zones[zone_idx].colors[led_idx])));
|
||||
painter.drawRect((zone_offset + (col * (box_size + box_margin))), (row * (box_size + box_margin)), box_size, box_size);
|
||||
col++;
|
||||
|
||||
if(col > max_cols)
|
||||
{
|
||||
row++;
|
||||
col = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
row += 2;
|
||||
col = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef DEVICEVIEW_H
|
||||
#define DEVICEVIEW_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "RGBController.h"
|
||||
|
||||
class DeviceView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DeviceView(QWidget *parent = 0);
|
||||
|
||||
virtual QSize sizeHint () const;
|
||||
virtual QSize minimumSizeHint () const;
|
||||
|
||||
void setController(RGBController * controller_ptr);
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void paintEvent(QPaintEvent *);
|
||||
private:
|
||||
QSize initSize;
|
||||
bool mouseDown;
|
||||
QPoint lastPos;
|
||||
|
||||
RGBController* controller;
|
||||
|
||||
QColor posColor(const QPoint &point);
|
||||
};
|
||||
|
||||
#endif // DEVICEVIEW_H
|
||||
@@ -70,6 +70,12 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>ClientIPValue</tabstop>
|
||||
<tabstop>ClientPortValue</tabstop>
|
||||
<tabstop>ClientConnectButton</tabstop>
|
||||
<tabstop>ClientTree</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -4,6 +4,13 @@
|
||||
|
||||
using namespace Ui;
|
||||
|
||||
static void UpdateCallback(void * this_ptr)
|
||||
{
|
||||
OpenRGBDevicePage * this_obj = (OpenRGBDevicePage *)this_ptr;
|
||||
|
||||
QMetaObject::invokeMethod(this_obj, "UpdateInterface", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
OpenRGBDevicePage::OpenRGBDevicePage(RGBController *dev, QWidget *parent) :
|
||||
QFrame(parent),
|
||||
ui(new Ui::OpenRGBDevicePageUi)
|
||||
@@ -20,6 +27,10 @@ OpenRGBDevicePage::OpenRGBDevicePage(RGBController *dev, QWidget *parent) :
|
||||
\*-----------------------------------------------------*/
|
||||
QPalette pal;
|
||||
|
||||
ui->widget->setController(device);
|
||||
|
||||
device->RegisterUpdateCallback(UpdateCallback, this);
|
||||
|
||||
pal = ui->ButtonRed->palette();
|
||||
pal.setColor(QPalette::Button, QColor(255, 0, 0));
|
||||
ui->ButtonRed->setAutoFillBackground(true);
|
||||
@@ -268,6 +279,12 @@ void Ui::OpenRGBDevicePage::on_DirectionBox_currentIndexChanged(int /*index*/)
|
||||
UpdateMode();
|
||||
}
|
||||
|
||||
void Ui::OpenRGBDevicePage::UpdateInterface()
|
||||
{
|
||||
UpdateModeUi();
|
||||
ui->widget->repaint();
|
||||
}
|
||||
|
||||
void Ui::OpenRGBDevicePage::UpdateModeUi()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
|
||||
@@ -60,6 +60,8 @@ private slots:
|
||||
|
||||
void on_ColorWheelBox_colorChanged(const QColor color);
|
||||
|
||||
void UpdateInterface();
|
||||
|
||||
private:
|
||||
Ui::OpenRGBDevicePageUi *ui;
|
||||
RGBController *device;
|
||||
|
||||
+281
-232
@@ -6,265 +6,265 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>556</width>
|
||||
<height>300</height>
|
||||
<width>875</width>
|
||||
<height>374</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="7" column="6">
|
||||
<widget class="QLabel" name="BlueLabel">
|
||||
<property name="text">
|
||||
<string>B:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="4">
|
||||
<widget class="QSlider" name="SpeedSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QRadioButton" name="RandomCheck">
|
||||
<property name="text">
|
||||
<string>Random</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="9">
|
||||
<widget class="QPushButton" name="ButtonCyan">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="ColorLabel">
|
||||
<property name="text">
|
||||
<string>Colors:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="4">
|
||||
<widget class="QComboBox" name="LEDBox"/>
|
||||
</item>
|
||||
<item row="9" column="8">
|
||||
<widget class="QPushButton" name="ButtonGreen">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="10" colspan="2">
|
||||
<widget class="QSpinBox" name="SatSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="9">
|
||||
<widget class="QLabel" name="SatLabel">
|
||||
<property name="text">
|
||||
<string>S:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="6">
|
||||
<widget class="QLabel" name="RedLabel">
|
||||
<property name="text">
|
||||
<string>R:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="ResizeButton">
|
||||
<property name="text">
|
||||
<string>Resize</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="10">
|
||||
<widget class="QPushButton" name="ButtonBlue">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="7" colspan="2">
|
||||
<widget class="QSpinBox" name="GreenSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QRadioButton" name="PerLEDCheck">
|
||||
<property name="text">
|
||||
<string>Per-LED</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="7" colspan="2">
|
||||
<widget class="QSpinBox" name="RedSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="11">
|
||||
<widget class="QPushButton" name="ButtonMagenta">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="SetZoneButton">
|
||||
<property name="text">
|
||||
<string>Zone</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QPushButton" name="SetLEDButton">
|
||||
<property name="text">
|
||||
<string>LED</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="4">
|
||||
<widget class="QPushButton" name="SetAllButton">
|
||||
<property name="text">
|
||||
<string>Set All Devices</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="6">
|
||||
<widget class="QLabel" name="GreenLabel">
|
||||
<property name="text">
|
||||
<string>G:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="9">
|
||||
<widget class="QLabel" name="ValLabel">
|
||||
<property name="text">
|
||||
<string>V:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3">
|
||||
<widget class="QComboBox" name="ZoneBox"/>
|
||||
</item>
|
||||
<item row="9" column="6">
|
||||
<widget class="QPushButton" name="ButtonRed">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="DirectionLabel">
|
||||
<property name="text">
|
||||
<string>Dir:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" colspan="2">
|
||||
<widget class="QRadioButton" name="ModeSpecificCheck">
|
||||
<property name="text">
|
||||
<string>Mode-Specific</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="7">
|
||||
<widget class="QPushButton" name="ButtonYellow">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="7" colspan="2">
|
||||
<widget class="QSpinBox" name="BlueSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="LEDLabel">
|
||||
<property name="text">
|
||||
<string>LED:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="10" colspan="2">
|
||||
<widget class="QSpinBox" name="HueSpinBox">
|
||||
<property name="maximum">
|
||||
<number>359</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="ModeLabel">
|
||||
<property name="text">
|
||||
<string>Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="SetLabel">
|
||||
<property name="text">
|
||||
<string>Set:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="ZoneLabel">
|
||||
<property name="text">
|
||||
<string>Zone:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="SpeedLabel">
|
||||
<property name="text">
|
||||
<string>Speed:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="10" colspan="2">
|
||||
<item row="6" column="6" colspan="2">
|
||||
<widget class="QSpinBox" name="RedSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="ZoneLabel">
|
||||
<property name="text">
|
||||
<string>Zone:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="8">
|
||||
<widget class="QLabel" name="SatLabel">
|
||||
<property name="text">
|
||||
<string>S:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="6">
|
||||
<widget class="QPushButton" name="ButtonYellow">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="5">
|
||||
<widget class="QLabel" name="GreenLabel">
|
||||
<property name="text">
|
||||
<string>G:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="8">
|
||||
<widget class="QPushButton" name="ButtonCyan">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QRadioButton" name="PerLEDCheck">
|
||||
<property name="text">
|
||||
<string>Per-LED</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2" colspan="2">
|
||||
<widget class="QRadioButton" name="ModeSpecificCheck">
|
||||
<property name="text">
|
||||
<string>Mode-Specific</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="5">
|
||||
<widget class="QLabel" name="RedLabel">
|
||||
<property name="text">
|
||||
<string>R:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<widget class="QRadioButton" name="RandomCheck">
|
||||
<property name="text">
|
||||
<string>Random</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="10">
|
||||
<widget class="QPushButton" name="ButtonMagenta">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="ModeLabel">
|
||||
<property name="text">
|
||||
<string>Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="9" colspan="2">
|
||||
<widget class="QSpinBox" name="ValSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="4">
|
||||
<widget class="QComboBox" name="ModeBox"/>
|
||||
</item>
|
||||
<item row="9" column="1" colspan="4">
|
||||
<widget class="QComboBox" name="DirectionBox"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="SetDeviceButton">
|
||||
<property name="text">
|
||||
<string>Device</string>
|
||||
<item row="8" column="6" colspan="2">
|
||||
<widget class="QSpinBox" name="BlueSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="9">
|
||||
<item row="7" column="6" colspan="2">
|
||||
<widget class="QSpinBox" name="GreenSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QPushButton" name="SetLEDButton">
|
||||
<property name="text">
|
||||
<string>LED</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="LEDLabel">
|
||||
<property name="text">
|
||||
<string>LED:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="8">
|
||||
<widget class="QLabel" name="HueLabel">
|
||||
<property name="text">
|
||||
<string>H:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6" rowspan="4" colspan="6">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="ColorLabel">
|
||||
<property name="text">
|
||||
<string>Colors:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="4">
|
||||
<widget class="QComboBox" name="ModeBox"/>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="4">
|
||||
<widget class="QPushButton" name="SetAllButton">
|
||||
<property name="text">
|
||||
<string>Set All Devices</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="4">
|
||||
<widget class="QSlider" name="SpeedSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="DirectionLabel">
|
||||
<property name="text">
|
||||
<string>Dir:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="SetLabel">
|
||||
<property name="text">
|
||||
<string>Set:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="8">
|
||||
<widget class="QLabel" name="ValLabel">
|
||||
<property name="text">
|
||||
<string>V:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="7">
|
||||
<widget class="QPushButton" name="ButtonGreen">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="9">
|
||||
<widget class="QPushButton" name="ButtonBlue">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="SetDeviceButton">
|
||||
<property name="text">
|
||||
<string>Device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="5">
|
||||
<widget class="QLabel" name="BlueLabel">
|
||||
<property name="text">
|
||||
<string>B:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3">
|
||||
<widget class="QComboBox" name="ZoneBox"/>
|
||||
</item>
|
||||
<item row="11" column="1" colspan="4">
|
||||
<widget class="QComboBox" name="DirectionBox"/>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2">
|
||||
<widget class="QPushButton" name="SetZoneButton">
|
||||
<property name="text">
|
||||
<string>Zone</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="4">
|
||||
<widget class="QComboBox" name="LEDBox"/>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="ResizeButton">
|
||||
<property name="text">
|
||||
<string>Resize</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="5">
|
||||
<widget class="QPushButton" name="ButtonRed">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="9" colspan="2">
|
||||
<widget class="QSpinBox" name="SatSpinBox">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="9" colspan="2">
|
||||
<widget class="QSpinBox" name="HueSpinBox">
|
||||
<property name="maximum">
|
||||
<number>359</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5" rowspan="4" colspan="6">
|
||||
<widget class="ColorWheel" name="ColorWheelBox" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
@@ -274,6 +274,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="11">
|
||||
<widget class="DeviceView" name="widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
@@ -286,7 +302,40 @@
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
</slots>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>DeviceView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">DeviceView.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>ZoneBox</tabstop>
|
||||
<tabstop>ResizeButton</tabstop>
|
||||
<tabstop>LEDBox</tabstop>
|
||||
<tabstop>SetDeviceButton</tabstop>
|
||||
<tabstop>SetZoneButton</tabstop>
|
||||
<tabstop>SetLEDButton</tabstop>
|
||||
<tabstop>SetAllButton</tabstop>
|
||||
<tabstop>ModeBox</tabstop>
|
||||
<tabstop>PerLEDCheck</tabstop>
|
||||
<tabstop>ModeSpecificCheck</tabstop>
|
||||
<tabstop>RandomCheck</tabstop>
|
||||
<tabstop>SpeedSlider</tabstop>
|
||||
<tabstop>DirectionBox</tabstop>
|
||||
<tabstop>RedSpinBox</tabstop>
|
||||
<tabstop>GreenSpinBox</tabstop>
|
||||
<tabstop>BlueSpinBox</tabstop>
|
||||
<tabstop>HueSpinBox</tabstop>
|
||||
<tabstop>SatSpinBox</tabstop>
|
||||
<tabstop>ValSpinBox</tabstop>
|
||||
<tabstop>ButtonRed</tabstop>
|
||||
<tabstop>ButtonYellow</tabstop>
|
||||
<tabstop>ButtonGreen</tabstop>
|
||||
<tabstop>ButtonCyan</tabstop>
|
||||
<tabstop>ButtonBlue</tabstop>
|
||||
<tabstop>ButtonMagenta</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -88,6 +88,12 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>ServerPortValue</tabstop>
|
||||
<tabstop>ServerStartButton</tabstop>
|
||||
<tabstop>ServerStopButton</tabstop>
|
||||
<tabstop>ServerClientTree</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -90,6 +90,14 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>SMBusAdaptersBox</tabstop>
|
||||
<tabstop>SMBusDetectionModeBox</tabstop>
|
||||
<tabstop>DetectButton</tabstop>
|
||||
<tabstop>DumpAddressBox</tabstop>
|
||||
<tabstop>DumpButton</tabstop>
|
||||
<tabstop>SMBusDataText</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user