Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b20042b9c9 | ||
|
|
18d35fcb82 | ||
|
|
94ab5bbced | ||
|
|
e9727fcba6 | ||
|
|
3614aa0392 |
@@ -133,51 +133,6 @@ SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c084", TAG+="uacces
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c083", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c08f", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# MSI Mysticlight #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="3EA4", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="4559", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7B10", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7B93", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7B94", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7B96", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C34", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C35", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C36", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C37", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C42", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C56", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C59", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C60", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C67", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C70", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C71", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C73", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C75", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C76", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C77", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C79", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C80", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C81", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C82", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C83", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C84", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C85", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C86", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C87", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C88", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C89", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C90", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C91", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C92", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C94", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C95", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C96", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C98", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="7C99", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="1462", ATTR{idProduct}=="905D", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# MSI/SteelSeries 3-Zone Laptop Keyboard #
|
||||
#---------------------------------------------------------------#
|
||||
@@ -222,7 +177,6 @@ SUBSYSTEMS=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="fc39", TAG+="uacces
|
||||
# Gigabyte/Aorus RGB Fusion 2 USB #
|
||||
#---------------------------------------------------------------#
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="8297", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="5702", TAG+="uaccess"
|
||||
|
||||
#---------------------------------------------------------------#
|
||||
# SteelSeries Peripheral Devices #
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
CMMP750Controller::CMMP750Controller(hid_device* dev_handle, wchar_t *_vendor, wchar_t *_device_name, char *_path)
|
||||
{
|
||||
int tmp_size = wcslen(_vendor);
|
||||
dev = dev_handle;
|
||||
location = _path;
|
||||
int tmp_size = wcslen(_vendor);
|
||||
|
||||
dev = dev_handle;
|
||||
|
||||
for (int i=0; ( i<tmp_size && i<CM_DEVICE_NAME_SIZE); i++)
|
||||
{
|
||||
@@ -22,7 +22,10 @@ CMMP750Controller::CMMP750Controller(hid_device* dev_handle, wchar_t *_vendor, w
|
||||
for (int j=0; ( j<wcslen(_vendor) && tmp_size+j<CM_DEVICE_NAME_SIZE); j++)
|
||||
device_name[tmp_size+j] = (char)_device_name[j];
|
||||
|
||||
GetStatus(); //When setting up device get current status
|
||||
location = _path;
|
||||
|
||||
current_mode = MP750_MODE_STATIC;
|
||||
current_speed = MP750_SPEED_NORMAL;
|
||||
}
|
||||
|
||||
CMMP750Controller::~CMMP750Controller()
|
||||
@@ -30,36 +33,6 @@ CMMP750Controller::~CMMP750Controller()
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
void CMMP750Controller::GetStatus()
|
||||
{
|
||||
unsigned char buffer[0x40] = { 0x00 };
|
||||
int buffer_size = (sizeof(buffer) / sizeof(buffer[0]));
|
||||
buffer[0] = 0x07;
|
||||
|
||||
hid_write(dev, buffer, buffer_size);
|
||||
hid_read(dev, buffer, buffer_size);
|
||||
|
||||
if( buffer[0] == 0x80 && buffer[1] == 0x05 )
|
||||
{
|
||||
current_mode = buffer[2] - 1;
|
||||
current_red = buffer[3];
|
||||
current_green = buffer[4];
|
||||
current_blue = buffer[5];
|
||||
|
||||
for( int i = 0; speed_mode_data[current_mode][i] >= buffer[6]; i++)
|
||||
current_speed = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Code should never reach here however just in case there is a failure set something
|
||||
current_mode = MP750_MODE_COLOR_CYCLE; //Unicorn Spew
|
||||
current_red = 0xFF;
|
||||
current_green = 0xFF;
|
||||
current_blue = 0xFF;
|
||||
current_speed = MP750_SPEED_NORMAL;
|
||||
}
|
||||
}
|
||||
|
||||
char* CMMP750Controller::GetDeviceName()
|
||||
{
|
||||
return device_name;
|
||||
@@ -75,31 +48,6 @@ std::string CMMP750Controller::GetLocation()
|
||||
return location;
|
||||
}
|
||||
|
||||
unsigned char CMMP750Controller::GetMode()
|
||||
{
|
||||
return current_mode;
|
||||
}
|
||||
|
||||
unsigned char CMMP750Controller::GetLedRed()
|
||||
{
|
||||
return current_red;
|
||||
}
|
||||
|
||||
unsigned char CMMP750Controller::GetLedGreen()
|
||||
{
|
||||
return current_green;
|
||||
}
|
||||
|
||||
unsigned char CMMP750Controller::GetLedBlue()
|
||||
{
|
||||
return current_blue;
|
||||
}
|
||||
|
||||
unsigned char CMMP750Controller::GetLedSpeed()
|
||||
{
|
||||
return current_speed;
|
||||
}
|
||||
|
||||
void CMMP750Controller::SetMode(unsigned char mode, unsigned char speed)
|
||||
{
|
||||
current_mode = mode;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define CM_COLOUR_MODE_DATA_SIZE (sizeof(colour_mode_data[0]) / sizeof(colour_mode_data[0][0]))
|
||||
#define CM_COLOUR_MODE_DATA_SIZE (sizeof(colour_mode_data) / sizeof(colour_mode_data[0]))
|
||||
#define CM_INTERRUPT_TIMEOUT 250
|
||||
#define CM_DEVICE_NAME_SIZE (sizeof(device_name) / sizeof(device_name[ 0 ]))
|
||||
#define CM_SERIAL_SIZE (sizeof(serial) / sizeof(serial[ 0 ]))
|
||||
@@ -85,11 +85,6 @@ public:
|
||||
char* GetSerial();
|
||||
std::string GetLocation();
|
||||
|
||||
unsigned char GetMode();
|
||||
unsigned char GetLedRed();
|
||||
unsigned char GetLedGreen();
|
||||
unsigned char GetLedBlue();
|
||||
unsigned char GetLedSpeed();
|
||||
void SetMode(unsigned char mode, unsigned char speed);
|
||||
void SetColor(unsigned char red, unsigned char green, unsigned char blue);
|
||||
|
||||
@@ -106,6 +101,5 @@ private:
|
||||
unsigned char current_green;
|
||||
unsigned char current_blue;
|
||||
|
||||
void GetStatus();
|
||||
void SendUpdate();
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ void DetectCoolerMasterControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
|
||||
//Look for the passed in cm_pids
|
||||
hid_init();
|
||||
info = hid_enumerate(COOLERMASTER_VID, 0x0);
|
||||
info = hid_enumerate(0x0, 0x0);
|
||||
|
||||
while(info)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ void DetectCoolerMasterControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
|
||||
if(dev)
|
||||
{
|
||||
CMMP750Controller* controller = new CMMP750Controller(dev, info->manufacturer_string, info->product_string, info->path);
|
||||
CMMP750Controller* controller = new CMMP750Controller(dev, info->manufacturer_string, info->product_string, info->path);
|
||||
RGBController_CMMP750Controller* rgb_controller = new RGBController_CMMP750Controller(controller);
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| EKController.cpp |
|
||||
| |
|
||||
| Driver for EK Loop Connect |
|
||||
| |
|
||||
| Chris M (Dr_No) 16th Jul 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include "EKController.h"
|
||||
|
||||
EKController::EKController(hid_device* dev_handle, wchar_t *_vendor, wchar_t *_device_name, char *_path)
|
||||
{
|
||||
int tmp_size = wcslen(_vendor);
|
||||
|
||||
dev = dev_handle;
|
||||
|
||||
for(int i=0; (i < tmp_size) && (i < EK_DEVICE_NAME_SIZE); i++)
|
||||
{
|
||||
device_name[i] = (char)_vendor[i];
|
||||
}
|
||||
|
||||
for(int j=0; (j < wcslen(_vendor)) && ((tmp_size + j) < EK_DEVICE_NAME_SIZE); j++)
|
||||
{
|
||||
device_name[tmp_size+j] = (char)_device_name[j];
|
||||
}
|
||||
|
||||
location = _path;
|
||||
|
||||
current_mode = EK_MODE_STATIC;
|
||||
current_speed = EK_SPEED_NORMAL;
|
||||
}
|
||||
|
||||
EKController::~EKController()
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
char* EKController::GetDeviceName()
|
||||
{
|
||||
return device_name;
|
||||
}
|
||||
|
||||
char* EKController::GetSerial()
|
||||
{
|
||||
return serial;
|
||||
}
|
||||
|
||||
std::string EKController::GetLocation()
|
||||
{
|
||||
return location;
|
||||
}
|
||||
|
||||
void EKController::SetMode(unsigned char mode, unsigned char speed)
|
||||
{
|
||||
current_mode = mode;
|
||||
current_speed = speed;
|
||||
|
||||
SendUpdate();
|
||||
}
|
||||
|
||||
void EKController::SetColor(unsigned char red, unsigned char green, unsigned char blue)
|
||||
{
|
||||
current_red = red;
|
||||
current_green = green;
|
||||
current_blue = blue;
|
||||
|
||||
SendUpdate();
|
||||
}
|
||||
|
||||
void EKController::SendUpdate()
|
||||
{
|
||||
unsigned char buffer[EK_PACKET_LENGTH] = { 0x00 };
|
||||
int buffer_size = (sizeof(buffer) / sizeof(buffer[0]));
|
||||
|
||||
for(int i = 0; i < EK_COLOUR_MODE_DATA_SIZE; i++)
|
||||
{
|
||||
buffer[i] = colour_mode_data[current_mode][i];
|
||||
}
|
||||
|
||||
//Set the relevant colour info
|
||||
buffer[EK_RED_BYTE] = current_red;
|
||||
buffer[EK_GREEN_BYTE] = current_green;
|
||||
buffer[EK_BLUE_BYTE] = current_blue;
|
||||
buffer[EK_SPEED_BYTE] = speed_mode_data[current_mode][current_speed];
|
||||
|
||||
buffer[10] = 0x10;
|
||||
buffer[47] = 0xFF;
|
||||
buffer[48] = 0x00;
|
||||
|
||||
hid_write(dev, buffer, buffer_size);
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| EKController.h |
|
||||
| |
|
||||
| Driver for EK Loop Connect |
|
||||
| |
|
||||
| Chris M (Dr_No) 16th Jul 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef EKCONTROLLER_H
|
||||
#define EKCONTROLLER_H
|
||||
|
||||
#include <string>
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#define EK_COLOUR_MODE_DATA_SIZE (sizeof(colour_mode_data[0]) / sizeof(colour_mode_data[0][0]))
|
||||
#define EK_DEVICE_NAME_SIZE (sizeof(device_name) / sizeof(device_name[ 0 ]))
|
||||
#define EK_PACKET_LENGTH 0x3F
|
||||
|
||||
enum
|
||||
{
|
||||
EK_MODE_BYTE = 12,
|
||||
EK_SPEED_BYTE = 14,
|
||||
EK_RED_BYTE = 16,
|
||||
EK_GREEN_BYTE = 17,
|
||||
EK_BLUE_BYTE = 18
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
EK_MODE_STATIC = 0x00, //Static Mode
|
||||
EK_MODE_BREATHING = 0x01, //Breathing Mode
|
||||
EK_MODE_FADING = 0x02, //Fading Mode
|
||||
EK_MODE_MARQUEE = 0x03, //Marquee Mode
|
||||
EK_MODE_COVERING_MARQUEE = 0x04, //Covering Marquee Mode
|
||||
EK_MODE_PULSE = 0x05, //Pulse Mode
|
||||
EK_MODE_SPECTRUM_WAVE = 0x06, //Spectrum Wave Mode
|
||||
EK_MODE_ALTERNATING = 0x07, //Alternating Mode
|
||||
EK_MODE_CANDLE = 0x08 //Candle Mode
|
||||
};
|
||||
|
||||
static unsigned char colour_mode_data[][16] =
|
||||
{
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x01, 0x00, 0xFF, 0x64}, // Static
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x02, 0x00, 0xFF, 0x64}, // Breathing
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x03, 0xFF, 0xFF, 0x64}, // Fading
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x04, 0x00, 0xFF, 0x64}, // Marquee
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x05, 0x00, 0xFF, 0x64}, // Covering Marquee
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x06, 0x00, 0xFF, 0x64}, // Pulse
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x07, 0x00, 0xFF, 0x64}, // Wave
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x08, 0x00, 0xFF, 0x64}, // Alternating
|
||||
{ 0x10, 0x12, 0x29, 0xAA, 0x01, 0x10, 0xA2, 0x60,
|
||||
0x00, 0x10, 0x20, 0x01, 0x09, 0x00, 0xFF, 0x64}, // Candle
|
||||
};
|
||||
|
||||
static unsigned char speed_mode_data[][9] =
|
||||
{
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // Static
|
||||
{ 0x00, 0x0C, 0x19, 0x25, 0x32, 0x3E, 0x4B, 0x57, 0x64 }, // Breathing
|
||||
{ 0x00, 0x0C, 0x19, 0x25, 0x32, 0x3E, 0x4B, 0x57, 0x64 }, // Fading
|
||||
{ 0x00, 0x0C, 0x19, 0x25, 0x32, 0x3E, 0x4B, 0x57, 0x64 }, // Marquee
|
||||
{ 0x00, 0x0C, 0x19, 0x25, 0x32, 0x3E, 0x4B, 0x57, 0x64 }, // Covering Marquee
|
||||
{ 0x00, 0x0C, 0x19, 0x25, 0x32, 0x3E, 0x4B, 0x57, 0x64 }, // Pulse
|
||||
{ 0x00, 0x0C, 0x19, 0x25, 0x32, 0x3E, 0x4B, 0x57, 0x64 }, // Wave
|
||||
{ 0x00, 0x0C, 0x19, 0x25, 0x32, 0x3E, 0x4B, 0x57, 0x64 }, // Alternating
|
||||
{ 0x00, 0x0C, 0x19, 0x25, 0x32, 0x3E, 0x4B, 0x57, 0x64 } // Candle
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
EK_SPEED_SLOWEST = 0x00, // Slowest speed
|
||||
EK_SPEED_SLOWER = 0x01, // Slower speed
|
||||
EK_SPEED_SLOW = 0x02, // Slow speed
|
||||
EK_SPEED_SLOWISH = 0x03, // Slowish speed
|
||||
EK_SPEED_NORMAL = 0x04, // Normal speed
|
||||
EK_SPEED_FASTISH = 0x05, // Fastish speed
|
||||
EK_SPEED_FAST = 0x06, // Fast speed
|
||||
EK_SPEED_FASTER = 0x07, // Faster speed
|
||||
EK_SPEED_FASTEST = 0x08, // Fastest speed
|
||||
};
|
||||
|
||||
class EKController
|
||||
{
|
||||
public:
|
||||
EKController(hid_device* dev_handle, wchar_t *_vendor, wchar_t *_device_name, char *_path);
|
||||
~EKController();
|
||||
|
||||
char* GetDeviceName();
|
||||
char* GetSerial();
|
||||
std::string GetLocation();
|
||||
|
||||
void SetMode(unsigned char mode, unsigned char speed);
|
||||
void SetColor(unsigned char red, unsigned char green, unsigned char blue);
|
||||
|
||||
private:
|
||||
char device_name[32];
|
||||
char serial[32];
|
||||
std::string location;
|
||||
hid_device* dev;
|
||||
|
||||
unsigned char current_mode;
|
||||
unsigned char current_speed;
|
||||
|
||||
unsigned char current_red;
|
||||
unsigned char current_green;
|
||||
unsigned char current_blue;
|
||||
|
||||
void SendUpdate();
|
||||
};
|
||||
|
||||
#endif // EKCONTROLLER_H
|
||||
@@ -1,64 +0,0 @@
|
||||
#include "EKController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_EKController.h"
|
||||
#include <hidapi/hidapi.h>
|
||||
|
||||
#define EK_VID 0x0483
|
||||
|
||||
#define EK_LOOP_CONNECT 0x5750
|
||||
|
||||
#define EK_NUM_DEVICES (sizeof(ek_pids) / sizeof(ek_pids[ 0 ]))
|
||||
|
||||
enum
|
||||
{
|
||||
EK_PID = 0,
|
||||
EK_INTERFACE = 1
|
||||
};
|
||||
|
||||
static const unsigned int ek_pids[][2] =
|
||||
{ // PID, Interface
|
||||
{ EK_LOOP_CONNECT, 0x00 } //EK Loop Connect
|
||||
};
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectEKControllers *
|
||||
* *
|
||||
* Tests the USB address to see if any EK Controllers exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectEKControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
{
|
||||
hid_device_info* info;
|
||||
|
||||
//Look for the passed in cm_pids
|
||||
hid_init();
|
||||
info = hid_enumerate(0x0, 0x0);
|
||||
|
||||
while(info)
|
||||
{
|
||||
hid_device* dev = NULL;
|
||||
if(info->vendor_id == EK_VID)
|
||||
{
|
||||
for(int ek_pid_idx = 0; ek_pid_idx < EK_NUM_DEVICES; ek_pid_idx++)
|
||||
{
|
||||
if((info->product_id == ek_pids[ek_pid_idx][EK_PID])
|
||||
&&(info->interface_number == ek_pids[ek_pid_idx][EK_INTERFACE]))
|
||||
{
|
||||
dev = hid_open_path(info->path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(dev)
|
||||
{
|
||||
EKController* controller = new EKController(dev, info->manufacturer_string, info->product_string, info->path);
|
||||
RGBController_EKController* rgb_controller = new RGBController_EKController(controller);
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
}
|
||||
info = info->next;
|
||||
}
|
||||
hid_free_enumeration(info);
|
||||
}
|
||||
@@ -11,9 +11,6 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
// Skip these indices in the color output
|
||||
static unsigned int skip_idx[] = { 6, 23, 29, 41, 47, 59, 70, 71, 75, 76, 87, 88, 93, 99, 100, 102, 108, 113, 114, 120, 123, 124 };
|
||||
|
||||
HyperXAlloyOriginsController::HyperXAlloyOriginsController(hid_device* dev_handle)
|
||||
{
|
||||
dev = dev_handle;
|
||||
@@ -26,18 +23,6 @@ HyperXAlloyOriginsController::~HyperXAlloyOriginsController()
|
||||
|
||||
void HyperXAlloyOriginsController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Insert color data for unused positions |
|
||||
\*-----------------------------------------------------*/
|
||||
for(unsigned int skip_cnt = 0; skip_cnt < (sizeof(skip_idx) / sizeof(skip_idx[0])); skip_cnt++)
|
||||
{
|
||||
colors.insert(colors.begin() + skip_idx[skip_cnt], 0x00000000);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up variables to track progress of color transmit |
|
||||
| Do this after inserting blanks |
|
||||
\*-----------------------------------------------------*/
|
||||
int colors_to_send = colors.size();
|
||||
int colors_sent = 0;
|
||||
|
||||
@@ -84,7 +69,7 @@ void HyperXAlloyOriginsController::SendDirectInitialization()
|
||||
/*-----------------------------------------------------*\
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_send_feature_report(dev, buf, 65);
|
||||
hid_send_feature_report(dev, &buf[1], 64);
|
||||
}
|
||||
|
||||
void HyperXAlloyOriginsController::SendDirectColorPacket
|
||||
@@ -127,5 +112,5 @@ void HyperXAlloyOriginsController::SendDirectColorPacket
|
||||
/*-----------------------------------------------------*\
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_send_feature_report(dev, buf, 65);
|
||||
hid_send_feature_report(dev, &buf[1], 64);
|
||||
}
|
||||
@@ -144,12 +144,12 @@ void HyperXKeyboardController::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
blu_color_data
|
||||
);
|
||||
|
||||
std::this_thread::sleep_for(5ms);
|
||||
//std::this_thread::sleep_for(5ms);
|
||||
|
||||
SendDirectExtended
|
||||
(
|
||||
ext_color_data
|
||||
);
|
||||
//SendDirectExtended
|
||||
// (
|
||||
// ext_color_data
|
||||
// );
|
||||
}
|
||||
|
||||
void HyperXKeyboardController::SetLEDs(std::vector<RGBColor> colors)
|
||||
|
||||
@@ -57,15 +57,6 @@ bool IsMSIGPUController(i2c_smbus_interface* bus)
|
||||
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() */
|
||||
|
||||
|
||||
@@ -7,23 +7,20 @@
|
||||
|
||||
static const unsigned short msi_pid_table[] =
|
||||
{
|
||||
0x3EA4, // MS_3EA4
|
||||
0x4559, // MS_4459
|
||||
|
||||
0x7C67, // MS_7C67
|
||||
0x7B10, // MS_7B10
|
||||
0x7B93, // MSI B450 Gaming Pro Carbon AC
|
||||
0x7B94, // MS_7B94
|
||||
0x7B96, // MS_7B96
|
||||
|
||||
0x7C87, // MS_7C87
|
||||
0x7B93, // MS_7B93
|
||||
0x7C34, // MS_7C34
|
||||
0x7C35, // MS_7C35
|
||||
0x7C36, // MS_7C36
|
||||
0x7C37, // MS_7C37
|
||||
0x7C42, // MS_7C42
|
||||
0x7C56, // MS_7C56
|
||||
0x7C84, // MS_7C84
|
||||
0x7B94, // MS_7B94
|
||||
0x7B96, // MS_7B96
|
||||
0x7C59, // MS_7C59
|
||||
0x7C60, // MS_7C60
|
||||
0x7C67, // MS_7C67
|
||||
0x7C70, // MS_7C70
|
||||
0x7C71, // MS_7C71
|
||||
0x7C73, // MS_7C73
|
||||
@@ -32,25 +29,25 @@ static const unsigned short msi_pid_table[] =
|
||||
0x7C77, // MS_7C77
|
||||
0x7C79, // MS_7C79
|
||||
0x7C80, // MS_7C80
|
||||
0x7C98, // MS_7C98
|
||||
0x7C99, // MS_7C99
|
||||
0x7C81, // MS_7C81
|
||||
0x7C82, // MS_7C82
|
||||
0x7C83, // MS_7C83
|
||||
0x7C84, // MS_7C84
|
||||
0x7C85, // MS_7C85
|
||||
0x7C86, // MS_7C86
|
||||
0x7C87, // MS_7C87
|
||||
0x7C88, // MS_7C88
|
||||
0x7C89, // MS_7C89
|
||||
0x4559, // MS_4459
|
||||
0x3EA4, // MS_3EA4
|
||||
0x905D, // MS_905D
|
||||
0x7C90, // MS_7C90
|
||||
0x7C91, // MS_7C91
|
||||
0x7C92, // MS_7C92
|
||||
0x7C94, // MS_7C94
|
||||
0x7C95, // MS_7C95
|
||||
0x7C96, // MS_7C96
|
||||
0x7C98, // MS_7C98
|
||||
0x7C99, // MS_7C99
|
||||
|
||||
0x905D // MS_905D
|
||||
0x7C56 // MS_7C56
|
||||
};
|
||||
|
||||
/******************************************************************************************\
|
||||
|
||||
@@ -85,13 +85,13 @@ void RGBFusion2USBController::SetCalibration()
|
||||
buffer[0] = report_id;
|
||||
buffer[1] = 0x33;
|
||||
|
||||
// D_LED1 WS2812 GRB, 0x00RRGGBB to 0x00GGRRBB
|
||||
// D_LED1 WS2812 GRB, 0x00RRGGBB to 0x00GGRRBB
|
||||
buffer[2] = 0x02; // B
|
||||
buffer[3] = 0x00; // G
|
||||
buffer[4] = 0x01; // R
|
||||
buffer[5] = 0x00;
|
||||
|
||||
// D_LED2 WS2812 GRB
|
||||
// D_LED2 WS2812 GRB
|
||||
buffer[6] = 0x02;
|
||||
buffer[7] = 0x00;
|
||||
buffer[8] = 0x01;
|
||||
@@ -103,12 +103,6 @@ void RGBFusion2USBController::SetCalibration()
|
||||
buffer[12] = 0x02;
|
||||
buffer[13] = 0x00;
|
||||
|
||||
// Spare set seen in some Motherboard models
|
||||
buffer[14] = 0x00;
|
||||
buffer[15] = 0x01;
|
||||
buffer[16] = 0x02;
|
||||
buffer[17] = 0x00;
|
||||
|
||||
SendPacket(buffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ enum
|
||||
enum
|
||||
{
|
||||
REDRAGON_K556_BRIGHTNESS_LOWEST = 0x00, /* Lowest brightness (off) */
|
||||
REDRAGON_K556_BRIGHTNESS_HIGHEST = 0x04, /* Highest brightness */
|
||||
REDRAGON_K556_BRIGHTNESS_HIGHEST = 0x05, /* Highest brightness */
|
||||
};
|
||||
|
||||
enum
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
/*-----------------------------------------*\
|
||||
| SapphireGPUController.cpp |
|
||||
| |
|
||||
| Driver for Sapphire Nitro Glow GPU RGB |
|
||||
| lighting controller |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 7/15/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "SapphireGPUController.h"
|
||||
|
||||
SapphireGPUController::SapphireGPUController(i2c_smbus_interface* bus, sapphire_dev_id dev)
|
||||
{
|
||||
this->bus = bus;
|
||||
this->dev = dev;
|
||||
}
|
||||
|
||||
SapphireGPUController::~SapphireGPUController()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::string SapphireGPUController::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 SapphireGPUController::GetRed()
|
||||
{
|
||||
return(bus->i2c_smbus_read_byte_data(dev, SAPPHIRE_GPU_REG_RED));
|
||||
}
|
||||
|
||||
unsigned char SapphireGPUController::GetGreen()
|
||||
{
|
||||
return(bus->i2c_smbus_read_byte_data(dev, SAPPHIRE_GPU_REG_GREEN));
|
||||
}
|
||||
|
||||
unsigned char SapphireGPUController::GetBlue()
|
||||
{
|
||||
return(bus->i2c_smbus_read_byte_data(dev, SAPPHIRE_GPU_REG_BLUE));
|
||||
}
|
||||
|
||||
void SapphireGPUController::SetColor(unsigned char red, unsigned char green, unsigned char blue)
|
||||
{
|
||||
bus->i2c_smbus_write_byte_data(dev, SAPPHIRE_GPU_REG_RED, red);
|
||||
bus->i2c_smbus_write_byte_data(dev, SAPPHIRE_GPU_REG_GREEN, green);
|
||||
bus->i2c_smbus_write_byte_data(dev, SAPPHIRE_GPU_REG_BLUE, blue);
|
||||
}
|
||||
|
||||
void SapphireGPUController::SetMode(unsigned char mode, unsigned char speed)
|
||||
{
|
||||
bus->i2c_smbus_write_byte_data(dev, SAPPHIRE_GPU_REG_MODE, mode);
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
/*-----------------------------------------*\
|
||||
| SapphireGPUController.h |
|
||||
| |
|
||||
| Definitions and types for Sapphire Nitro |
|
||||
| Glow GPU RGB lighting controller |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 7/15/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include <string>
|
||||
#include "i2c_smbus.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef unsigned char sapphire_dev_id;
|
||||
|
||||
enum
|
||||
{
|
||||
SAPPHIRE_GPU_REG_MODE = 0x00,
|
||||
SAPPHIRE_GPU_REG_BRIGHTNESS = 0x01,
|
||||
SAPPHIRE_GPU_REG_RED = 0x03,
|
||||
SAPPHIRE_GPU_REG_GREEN = 0x04,
|
||||
SAPPHIRE_GPU_REG_BLUE = 0x05,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SAPPHIRE_GPU_MODE_SAPPHIRE_BLUE = 0x00,
|
||||
SAPPHIRE_GPU_MODE_RAINBOW = 0x01,
|
||||
SAPPHIRE_GPU_MODE_BOARD_TEMPERATURE = 0x02,
|
||||
SAPPHIRE_GPU_MODE_FAN_SPEED = 0x03,
|
||||
SAPPHIRE_GPU_MODE_CUSTOM = 0x04,
|
||||
SAPPHIRE_GPU_MODE_OFF = 0x05,
|
||||
};
|
||||
|
||||
class SapphireGPUController
|
||||
{
|
||||
public:
|
||||
SapphireGPUController(i2c_smbus_interface* bus, sapphire_dev_id dev);
|
||||
~SapphireGPUController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
|
||||
unsigned char GetRed();
|
||||
unsigned char GetGreen();
|
||||
unsigned char GetBlue();
|
||||
|
||||
void SetColor(unsigned char red, unsigned char green, unsigned char blue);
|
||||
void SetMode(unsigned char mode, unsigned char speed);
|
||||
|
||||
private:
|
||||
i2c_smbus_interface* bus;
|
||||
sapphire_dev_id dev;
|
||||
|
||||
};
|
||||
@@ -1,59 +0,0 @@
|
||||
#include "SapphireGPUController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_SapphireGPU.h"
|
||||
#include "i2c_smbus.h"
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* TestForSapphireGPUController *
|
||||
* *
|
||||
* Tests the given address to see if a Sapphire GPU controller exists there. First *
|
||||
* does a quick write to test for a response *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
bool TestForSapphireGPUController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
bool pass = false;
|
||||
int res;
|
||||
|
||||
if(bus->i2c_smbus_read_byte_data(address, 0x06) == 0xCC)
|
||||
{
|
||||
pass = true;
|
||||
}
|
||||
|
||||
return(false); //TODO - better detection, leaving disabled for now
|
||||
|
||||
} /* TestForSapphireGPUController() */
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectSapphireGPUControllers *
|
||||
* *
|
||||
* Detect Sapphire GPU controllers on the enumerated I2C busses at address 0x55. *
|
||||
* *
|
||||
* bus - pointer to i2c_smbus_interface where Sapphire GPU device is connected *
|
||||
* dev - I2C address of Sapphire GPU device *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectSapphireGPUControllers(std::vector<i2c_smbus_interface*>& busses, std::vector<RGBController*>& rgb_controllers)
|
||||
{
|
||||
SapphireGPUController* new_sapphire;
|
||||
RGBController_SapphireGPU* new_controller;
|
||||
|
||||
for (unsigned int bus = 0; bus < busses.size(); bus++)
|
||||
{
|
||||
// Check for Sapphire GPU controller at 0x55
|
||||
if (TestForSapphireGPUController(busses[bus], 0x55))
|
||||
{
|
||||
new_sapphire = new SapphireGPUController(busses[bus], 0x55);
|
||||
new_controller = new RGBController_SapphireGPU(new_sapphire);
|
||||
rgb_controllers.push_back(new_controller);
|
||||
}
|
||||
}
|
||||
|
||||
} /* DetectSapphireGPUControllers() */
|
||||
@@ -39,6 +39,7 @@ void SteelSeriesApexController::SetMode
|
||||
std::vector<RGBColor> colors
|
||||
)
|
||||
{
|
||||
unsigned char color_mode;
|
||||
unsigned char mode_colors[9];
|
||||
|
||||
active_mode = mode;
|
||||
|
||||
+12
-25
@@ -352,6 +352,8 @@ void NetworkClient::ListenThreadFunction()
|
||||
|
||||
} while(bytes_read != sizeof(header) - sizeof(header.pkt_magic));
|
||||
|
||||
//printf( "Client: Received header, now receiving data of size %d\r\n", header.pkt_size);
|
||||
|
||||
//Header received, now receive the data
|
||||
if(header.pkt_size > 0)
|
||||
{
|
||||
@@ -374,14 +376,21 @@ void NetworkClient::ListenThreadFunction()
|
||||
} while (bytes_read < header.pkt_size);
|
||||
}
|
||||
|
||||
//printf( "Client: Received header and data\r\n" );
|
||||
//printf( "Client: Packet ID: %d \r\n", header.pkt_id);
|
||||
|
||||
//Entire request received, select functionality based on request ID
|
||||
switch(header.pkt_id)
|
||||
{
|
||||
case NET_PACKET_ID_REQUEST_CONTROLLER_COUNT:
|
||||
printf( "Client: NET_PACKET_ID_REQUEST_CONTROLLER_COUNT\r\n" );
|
||||
|
||||
ProcessReply_ControllerCount(header.pkt_size, data);
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_REQUEST_CONTROLLER_DATA:
|
||||
printf( "Client: NET_PACKET_ID_REQUEST_CONTROLLER_DATA\r\n");
|
||||
|
||||
ProcessReply_ControllerData(header.pkt_size, data, header.pkt_dev_idx);
|
||||
break;
|
||||
}
|
||||
@@ -416,20 +425,6 @@ listen_done:
|
||||
ClientInfoChanged();
|
||||
}
|
||||
|
||||
void NetworkClient::WaitOnControllerData()
|
||||
{
|
||||
for(int i = 0; i < 1000; i++)
|
||||
{
|
||||
if(controller_data_received)
|
||||
{
|
||||
break;
|
||||
}
|
||||
std::this_thread::sleep_for(1ms);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void NetworkClient::ProcessReply_ControllerCount(unsigned int data_size, char * data)
|
||||
{
|
||||
if(data_size == sizeof(unsigned int))
|
||||
@@ -444,15 +439,9 @@ void NetworkClient::ProcessReply_ControllerData(unsigned int data_size, char * d
|
||||
|
||||
new_controller->ReadDeviceDescription((unsigned char *)data);
|
||||
|
||||
if(dev_idx >= server_controllers.size())
|
||||
{
|
||||
server_controllers.push_back(new_controller);
|
||||
}
|
||||
else
|
||||
{
|
||||
server_controllers[dev_idx]->active_mode = new_controller->active_mode;
|
||||
delete new_controller;
|
||||
}
|
||||
printf("Received controller: %s\r\n", new_controller->name.c_str());
|
||||
|
||||
server_controllers.push_back(new_controller);
|
||||
|
||||
controller_data_received = true;
|
||||
}
|
||||
@@ -494,8 +483,6 @@ void NetworkClient::SendRequest_ControllerData(unsigned int dev_idx)
|
||||
{
|
||||
NetPacketHeader reply_hdr;
|
||||
|
||||
controller_data_received = false;
|
||||
|
||||
reply_hdr.pkt_magic[0] = 'O';
|
||||
reply_hdr.pkt_magic[1] = 'R';
|
||||
reply_hdr.pkt_magic[2] = 'G';
|
||||
|
||||
@@ -41,8 +41,6 @@ public:
|
||||
void ConnectionThreadFunction();
|
||||
void ListenThreadFunction();
|
||||
|
||||
void WaitOnControllerData();
|
||||
|
||||
void ProcessReply_ControllerCount(unsigned int data_size, char * data);
|
||||
void ProcessReply_ControllerData(unsigned int data_size, char * data, unsigned int dev_idx);
|
||||
|
||||
|
||||
+15
-25
@@ -427,6 +427,8 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
|
||||
} while(bytes_read != sizeof(header) - sizeof(header.pkt_magic));
|
||||
|
||||
//printf( "Server: Received header, now receiving data of size %d\r\n", header.pkt_size);
|
||||
|
||||
//Header received, now receive the data
|
||||
if(header.pkt_size > 0)
|
||||
{
|
||||
@@ -449,31 +451,29 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
} while (bytes_read < header.pkt_size);
|
||||
}
|
||||
|
||||
//printf( "Server: Received header and data\r\n" );
|
||||
//printf( "Server: Packet ID: %d \r\n", header.pkt_id);
|
||||
|
||||
//Entire request received, select functionality based on request ID
|
||||
switch(header.pkt_id)
|
||||
{
|
||||
case NET_PACKET_ID_REQUEST_CONTROLLER_COUNT:
|
||||
//printf( "NET_PACKET_ID_REQUEST_CONTROLLER_COUNT\r\n" );
|
||||
SendReply_ControllerCount(client_sock);
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_REQUEST_CONTROLLER_DATA:
|
||||
//printf( "NET_PACKET_ID_REQUEST_CONTROLLER_DATA\r\n" );
|
||||
SendReply_ControllerData(client_sock, header.pkt_dev_idx);
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_SET_CLIENT_NAME:
|
||||
if(data == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
printf( "NET_PACKET_ID_SET_CLIENT_NAME\r\n" );
|
||||
ProcessRequest_ClientString(client_sock, header.pkt_size, data);
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_RGBCONTROLLER_RESIZEZONE:
|
||||
if(data == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
//printf( "NET_PACKET_ID_RGBCONTROLLER_RESIZEZONE\r\n" );
|
||||
|
||||
if((header.pkt_dev_idx < controllers.size()) && (header.pkt_size == (2 * sizeof(int))))
|
||||
{
|
||||
@@ -488,10 +488,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_RGBCONTROLLER_UPDATELEDS:
|
||||
if(data == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
//printf( "NET_PACKET_ID_RGBCONTROLLER_UPDATELEDS\r\n" );
|
||||
|
||||
if(header.pkt_dev_idx < controllers.size())
|
||||
{
|
||||
@@ -501,10 +498,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_RGBCONTROLLER_UPDATEZONELEDS:
|
||||
if(data == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
//printf( "NET_PACKET_ID_RGBCONTROLLER_UPDATEZONELEDS\r\n" );
|
||||
|
||||
if(header.pkt_dev_idx < controllers.size())
|
||||
{
|
||||
@@ -518,10 +512,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_RGBCONTROLLER_UPDATESINGLELED:
|
||||
if(data == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
//printf( "NET_PACKET_ID_RGBCONTROLLER_UPDATESINGLELED\r\n" );
|
||||
|
||||
if(header.pkt_dev_idx < controllers.size())
|
||||
{
|
||||
@@ -535,6 +526,8 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_RGBCONTROLLER_SETCUSTOMMODE:
|
||||
//printf( "NET_PACKET_ID_RGBCONTROLLER_SETCUSTOMMODE\r\n" );
|
||||
|
||||
if(header.pkt_dev_idx < controllers.size())
|
||||
{
|
||||
controllers[header.pkt_dev_idx]->SetCustomMode();
|
||||
@@ -542,10 +535,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_RGBCONTROLLER_UPDATEMODE:
|
||||
if(data == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
//printf( "NET_PACKET_ID_RGBCONTROLLER_UPDATEMODE\r\n" );
|
||||
|
||||
if(header.pkt_dev_idx < controllers.size())
|
||||
{
|
||||
|
||||
+1
-5
@@ -424,7 +424,6 @@ void DetectRGBFusionGPUControllers(std::vector<i2c_smbus_interface*>& busses, st
|
||||
void DetectRGBFusion2SMBusControllers(std::vector<i2c_smbus_interface*>& busses, std::vector<RGBController*>& rgb_controllers);
|
||||
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 DetectMSIMysticLightControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
void DetectMSIRGBControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
void DetectAuraUSBControllers(std::vector<RGBController*> &rgb_controllers);
|
||||
@@ -450,7 +449,6 @@ void DetectNZXTKrakenControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectSteelSeriesControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectGloriousModelOControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectDuckyKeyboardControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
void DetectEKControllers(std::vector<RGBController*>& rgb_controllers);
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
@@ -474,14 +472,13 @@ void DetectRGBControllers(void)
|
||||
DetectPolychromeControllers(busses, rgb_controllers);
|
||||
DetectRGBFusionGPUControllers(busses, rgb_controllers);
|
||||
DetectMSIGPUControllers(busses, rgb_controllers);
|
||||
DetectSapphireGPUControllers(busses, rgb_controllers);
|
||||
|
||||
//TODO: Implement better detection before enabling these controllers
|
||||
//DetectRGBFusion2SMBusControllers(busses, rgb_controllers);
|
||||
//DetectRGBFusion2DRAMControllers(busses, rgb_controllers);
|
||||
|
||||
DetectRGBFusionControllers(busses, rgb_controllers);
|
||||
//DetectMSIMysticLightControllers(rgb_controllers);
|
||||
DetectMSIMysticLightControllers(rgb_controllers);
|
||||
DetectMSIRGBControllers(rgb_controllers);
|
||||
|
||||
DetectAuraUSBControllers(rgb_controllers);
|
||||
@@ -505,7 +502,6 @@ void DetectRGBControllers(void)
|
||||
DetectSteelSeriesControllers(rgb_controllers);
|
||||
DetectGloriousModelOControllers(rgb_controllers);
|
||||
DetectDuckyKeyboardControllers(rgb_controllers);
|
||||
DetectEKControllers(rgb_controllers);
|
||||
|
||||
DetectE131Controllers(rgb_controllers);
|
||||
|
||||
|
||||
+1
-19
@@ -16,7 +16,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
#-----------------------------------------------------------------------#
|
||||
# Application Configuration #
|
||||
#-----------------------------------------------------------------------#
|
||||
VERSION = 0.3
|
||||
VERSION = 0.21
|
||||
TARGET = OpenRGB
|
||||
TEMPLATE = app
|
||||
|
||||
@@ -80,7 +80,6 @@ INCLUDEPATH += \
|
||||
Controllers/RGBFusion2SMBusController/ \
|
||||
Controllers/RGBFusion2USBController/ \
|
||||
Controllers/RGBFusionGPUController/ \
|
||||
Controllers/SapphireGPUController/ \
|
||||
Controllers/SteelSeriesController/ \
|
||||
Controllers/ThermaltakeRiingController/ \
|
||||
RGBController/ \
|
||||
@@ -122,7 +121,6 @@ HEADERS += \
|
||||
Controllers/CorsairVengeanceProController/CorsairVengeanceProController.h \
|
||||
Controllers/CrucialController/CrucialController.h \
|
||||
Controllers/DuckyKeyboardController/DuckyKeyboardController.h \
|
||||
Controllers/EKController/EKController.h \
|
||||
Controllers/GloriousModelOController/GloriousModelOController.h \
|
||||
Controllers/HuePlusController/HuePlusController.h \
|
||||
Controllers/HyperXDRAMController/HyperXDRAMController.h \
|
||||
@@ -148,7 +146,6 @@ HEADERS += \
|
||||
Controllers/RGBFusionGPUController/RGBFusionGPUController.h \
|
||||
Controllers/RedragonController/RedragonK556Controller.h \
|
||||
Controllers/RedragonController/RedragonM711Controller.h \
|
||||
Controllers/SapphireGPUController/SapphireGPUController.h \
|
||||
Controllers/SteelSeriesController/SteelSeriesRivalController.h \
|
||||
Controllers/SteelSeriesController/SteelSeriesSiberiaController.h \
|
||||
Controllers/SteelSeriesController/SteelSeriesApexController.h \
|
||||
@@ -167,7 +164,6 @@ HEADERS += \
|
||||
RGBController/RGBController_Crucial.h \
|
||||
RGBController/RGBController_DuckyKeyboard.h \
|
||||
RGBController/RGBController_Dummy.h \
|
||||
RGBController/RGBController_EKController.h \
|
||||
RGBController/RGBController_E131.h \
|
||||
RGBController/RGBController_GloriousModelO.h \
|
||||
RGBController/RGBController_HuePlus.h \
|
||||
@@ -196,7 +192,6 @@ HEADERS += \
|
||||
RGBController/RGBController_RGBFusion2SMBus.h \
|
||||
RGBController/RGBController_RGBFusion2USB.h \
|
||||
RGBController/RGBController_RGBFusionGPU.h \
|
||||
RGBController/RGBController_SapphireGPU.h \
|
||||
RGBController/RGBController_SteelSeriesRival.h \
|
||||
RGBController/RGBController_SteelSeriesSiberia.h \
|
||||
RGBController/RGBController_SteelSeriesApex.h \
|
||||
@@ -254,8 +249,6 @@ SOURCES += \
|
||||
Controllers/CrucialController/CrucialControllerDetect.cpp \
|
||||
Controllers/DuckyKeyboardController/DuckyKeyboardController.cpp \
|
||||
Controllers/DuckyKeyboardController/DuckyKeyboardControllerDetect.cpp \
|
||||
Controllers/EKController/EKControllerDetect.cpp \
|
||||
Controllers/EKController/EKController.cpp \
|
||||
Controllers/GloriousModelOController/GloriousModelOController.cpp \
|
||||
Controllers/GloriousModelOController/GloriousModelOControllerDetect.cpp \
|
||||
Controllers/HuePlusController/HuePlusController.cpp \
|
||||
@@ -302,8 +295,6 @@ SOURCES += \
|
||||
Controllers/RedragonController/RedragonK556Controller.cpp \
|
||||
Controllers/RedragonController/RedragonM711Controller.cpp \
|
||||
Controllers/RedragonController/RedragonControllerDetect.cpp \
|
||||
Controllers/SapphireGPUController/SapphireGPUController.cpp \
|
||||
Controllers/SapphireGPUController/SapphireGPUControllerDetect.cpp \
|
||||
Controllers/SteelSeriesController/SteelSeriesRivalController.cpp \
|
||||
Controllers/SteelSeriesController/SteelSeriesSiberiaController.cpp \
|
||||
Controllers/SteelSeriesController/SteelSeriesApexController.cpp \
|
||||
@@ -325,7 +316,6 @@ SOURCES += \
|
||||
RGBController/RGBController_Crucial.cpp \
|
||||
RGBController/RGBController_DuckyKeyboard.cpp \
|
||||
RGBController/RGBController_Dummy.cpp \
|
||||
RGBController/RGBController_EKController.cpp \
|
||||
RGBController/RGBController_GloriousModelO.cpp \
|
||||
RGBController/RGBController_HuePlus.cpp \
|
||||
RGBController/RGBController_HyperXAlloyOrigins.cpp \
|
||||
@@ -353,7 +343,6 @@ SOURCES += \
|
||||
RGBController/RGBController_RGBFusion2SMBus.cpp \
|
||||
RGBController/RGBController_RGBFusion2USB.cpp \
|
||||
RGBController/RGBController_RGBFusionGPU.cpp \
|
||||
RGBController/RGBController_SapphireGPU.cpp \
|
||||
RGBController/RGBController_SteelSeriesRival.cpp \
|
||||
RGBController/RGBController_SteelSeriesSiberia.cpp \
|
||||
RGBController/RGBController_SteelSeriesApex.cpp \
|
||||
@@ -536,13 +525,6 @@ unix:!macx {
|
||||
INSTALLS += target desktop pixmap
|
||||
}
|
||||
|
||||
unix:!macx:CONFIG(asan) {
|
||||
message("ASan Mode")
|
||||
QMAKE_CFLAGS=-fsanitize=address
|
||||
QMAKE_CXXFLAGS=-fsanitize=address
|
||||
QMAKE_LFLAGS=-fsanitize=address
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------#
|
||||
# MacOS-specific Configuration #
|
||||
#-----------------------------------------------------------------------#
|
||||
|
||||
@@ -37,7 +37,11 @@ As of now, only Gigabyte RGB Fusion 2.0 boards have been reported to have issues
|
||||
|
||||
### USB Access
|
||||
|
||||
* Previous versions of OpenRGB used the WinUSB driver, installed using Zadig. This is no longer required, and you need to uninstall the WinUSB driver if you previously installed it. You can uninstall the WinUSB driver by following [this guide](https://gitlab.com/CalcProgrammer1/OpenRGB/-/wikis/Frequently-Asked-Questions#i-installed-the-winusb-driver-for-a-device-and-i-wish-to-uninstall-it).
|
||||
* Some USB devices (especially keyboards and mice) require installation of the WinUSB driver. You can do this with Zadig:
|
||||
- Download Zadig: https://zadig.akeo.ie/
|
||||
- Select "list all devices" from the menu
|
||||
- Select the last interface (highest number) of your device
|
||||
- With "WinUSB" selected, click Install
|
||||
|
||||
## Linux
|
||||
|
||||
|
||||
@@ -1716,7 +1716,7 @@ static const razer_device mamba_te_device =
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------*\
|
||||
| Razer Mamba Wireless (2018) Wired 1532:0073 |
|
||||
| Razer Mamba Wireless Wired 1532:0073 |
|
||||
| |
|
||||
| Zone "Logo" |
|
||||
| Single |
|
||||
@@ -1725,8 +1725,12 @@ static const razer_device mamba_te_device =
|
||||
| Zone "Scroll Wheel" |
|
||||
| Single |
|
||||
| 1 LED |
|
||||
| |
|
||||
| Zone "Matrix" |
|
||||
| Linear |
|
||||
| 16 LED |
|
||||
\*-------------------------------------------------------------*/
|
||||
static const razer_zone mamba_wireless_2018_wired_logo_zone =
|
||||
static const razer_zone mamba_wireless_logo_zone =
|
||||
{
|
||||
"Logo Zone",
|
||||
ZONE_TYPE_SINGLE,
|
||||
@@ -1734,7 +1738,7 @@ static const razer_zone mamba_wireless_2018_wired_logo_zone =
|
||||
1
|
||||
};
|
||||
|
||||
static const razer_zone mamba_wireless_2018_wired_scroll_wheel_zone =
|
||||
static const razer_zone mamba_wireless_scroll_wheel_zone =
|
||||
{
|
||||
"Scroll Wheel Zone",
|
||||
ZONE_TYPE_SINGLE,
|
||||
@@ -1742,62 +1746,25 @@ static const razer_zone mamba_wireless_2018_wired_scroll_wheel_zone =
|
||||
1
|
||||
};
|
||||
|
||||
static const razer_device mamba_wireless_2018_wired_device =
|
||||
static const razer_zone mamba_wireless_matrix_zone =
|
||||
{
|
||||
"Razer Mamba Wireless (Wired)",
|
||||
"Matrix Zone",
|
||||
ZONE_TYPE_LINEAR,
|
||||
1,
|
||||
16
|
||||
};
|
||||
|
||||
static const razer_device mamba_wireless_wired_device =
|
||||
{
|
||||
"Razer Mamba Chroma Wireless",
|
||||
DEVICE_TYPE_MOUSE,
|
||||
true,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
18,
|
||||
{
|
||||
&mamba_wireless_2018_wired_scroll_wheel_zone,
|
||||
&mamba_wireless_2018_wired_logo_zone,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------*\
|
||||
| Razer Mamba Wireless (2018) Wireless 1532:0072 |
|
||||
| |
|
||||
| Zone "Logo" |
|
||||
| Single |
|
||||
| 1 LED |
|
||||
| |
|
||||
| Zone "Scroll Wheel" |
|
||||
| Single |
|
||||
| 1 LED |
|
||||
\*-------------------------------------------------------------*/
|
||||
|
||||
static const razer_zone mamba_wireless_2018_wireless_logo_zone =
|
||||
{
|
||||
"Logo Zone",
|
||||
ZONE_TYPE_SINGLE,
|
||||
1,
|
||||
1
|
||||
};
|
||||
|
||||
static const razer_zone mamba_wireless_2018_wireless_scroll_wheel_zone =
|
||||
{
|
||||
"Scroll Wheel Zone",
|
||||
ZONE_TYPE_SINGLE,
|
||||
1,
|
||||
1
|
||||
};
|
||||
|
||||
static const razer_device mamba_wireless_2018_wireless_device =
|
||||
{
|
||||
"Razer Mamba Wireless (Receiver)",
|
||||
DEVICE_TYPE_MOUSE,
|
||||
true,
|
||||
1,
|
||||
2,
|
||||
{
|
||||
&mamba_wireless_2018_wireless_scroll_wheel_zone,
|
||||
&mamba_wireless_2018_wireless_logo_zone,
|
||||
NULL,
|
||||
&mamba_wireless_logo_zone,
|
||||
&mamba_wireless_scroll_wheel_zone,
|
||||
&mamba_wireless_matrix_zone,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
@@ -2705,8 +2672,7 @@ static const razer_device* device_list[] =
|
||||
&mamba_wireless_device,
|
||||
&mamba_te_device,
|
||||
&mamba_elite_device,
|
||||
&mamba_wireless_2018_wired_device,
|
||||
&mamba_wireless_2018_wireless_device,
|
||||
&mamba_wireless_wired_device,
|
||||
&naga_chroma_device,
|
||||
&naga_epic_chroma_device,
|
||||
&naga_hex_v2_device,
|
||||
|
||||
@@ -894,14 +894,6 @@ void RGBController::SetModeDescription(unsigned char* data_buf)
|
||||
memcpy(&mode_idx, &data_buf[data_ptr], sizeof(int));
|
||||
data_ptr += sizeof(int);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Check if we aren't reading beyond the list of modes. |
|
||||
\*---------------------------------------------------------*/
|
||||
if(((size_t) mode_idx) > modes.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Get pointer to target mode |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -998,6 +990,8 @@ void RGBController::SetModeDescription(unsigned char* data_buf)
|
||||
|
||||
new_mode->colors.push_back(new_color);
|
||||
}
|
||||
|
||||
printf("read data ptr %d\r\n", data_ptr);
|
||||
}
|
||||
|
||||
unsigned char * RGBController::GetColorDescription()
|
||||
@@ -1057,14 +1051,6 @@ void RGBController::SetColorDescription(unsigned char* data_buf)
|
||||
memcpy(&num_colors, &data_buf[data_ptr], sizeof(unsigned short));
|
||||
data_ptr += sizeof(unsigned short);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Check if we aren't reading beyond the list of colors. |
|
||||
\*---------------------------------------------------------*/
|
||||
if(((size_t) num_colors) > colors.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Copy in colors |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -1146,14 +1132,6 @@ void RGBController::SetZoneColorDescription(unsigned char* data_buf)
|
||||
memcpy(&zone_idx, &data_buf[data_ptr], sizeof(zone_idx));
|
||||
data_ptr += sizeof(zone_idx);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Check if we aren't reading beyond the list of zones. |
|
||||
\*---------------------------------------------------------*/
|
||||
if(((size_t) zone_idx) > zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Copy in number of colors (data) |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -1208,20 +1186,12 @@ void RGBController::SetSingleLEDColorDescription(unsigned char* data_buf)
|
||||
| RGBColor: LED color |
|
||||
\*---------------------------------------------------------*/
|
||||
int led_idx;
|
||||
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Copy in LED index |
|
||||
\*---------------------------------------------------------*/
|
||||
memcpy(&led_idx, &data_buf[0], sizeof(led_idx));
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Check if we aren't reading beyond the list of leds. |
|
||||
\*---------------------------------------------------------*/
|
||||
if(((size_t) led_idx) > leds.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Copy in LED color |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -1332,33 +1302,17 @@ void RGBController::UpdateLEDs()
|
||||
CallFlag_UpdateLEDs = true;
|
||||
}
|
||||
|
||||
void RGBController::UpdateMode()
|
||||
{
|
||||
CallFlag_UpdateMode = true;
|
||||
}
|
||||
|
||||
void RGBController::DeviceUpdateLEDs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController::DeviceCallThreadFunction()
|
||||
{
|
||||
CallFlag_UpdateLEDs = false;
|
||||
CallFlag_UpdateMode = false;
|
||||
|
||||
while(DeviceThreadRunning.load() == true)
|
||||
{
|
||||
if(CallFlag_UpdateMode.load() == true)
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
CallFlag_UpdateMode = false;
|
||||
}
|
||||
if(CallFlag_UpdateLEDs.load() == true)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
//void UpdateZoneLEDs(int zone);
|
||||
//void UpdateSingleLED(int led);
|
||||
|
||||
void UpdateMode();
|
||||
//void UpdateMode();
|
||||
|
||||
void DeviceCallThreadFunction();
|
||||
|
||||
@@ -207,14 +207,13 @@ public:
|
||||
virtual void UpdateZoneLEDs(int zone) = 0;
|
||||
virtual void UpdateSingleLED(int led) = 0;
|
||||
|
||||
virtual void DeviceUpdateMode() = 0;
|
||||
virtual void UpdateMode() = 0;
|
||||
|
||||
virtual void SetCustomMode() = 0;
|
||||
|
||||
private:
|
||||
std::thread* DeviceCallThread;
|
||||
std::atomic<bool> CallFlag_UpdateLEDs;
|
||||
std::atomic<bool> CallFlag_UpdateMode;
|
||||
std::atomic<bool> DeviceThreadRunning;
|
||||
//bool CallFlag_UpdateZoneLEDs = false;
|
||||
//bool CallFlag_UpdateSingleLED = false;
|
||||
|
||||
@@ -199,7 +199,7 @@ void RGBController_AMDWraithPrism::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AMDWraithPrism::DeviceUpdateMode()
|
||||
void RGBController_AMDWraithPrism::UpdateMode()
|
||||
{
|
||||
bool random = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
AMDWraithPrismController* wraith;
|
||||
|
||||
@@ -102,7 +102,7 @@ void RGBController_AuraCore::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AuraCore::DeviceUpdateMode()
|
||||
void RGBController_AuraCore::UpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
AuraCoreController* aura;
|
||||
|
||||
@@ -173,7 +173,7 @@ void RGBController_AuraGPU::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AuraGPU::DeviceUpdateMode()
|
||||
void RGBController_AuraGPU::UpdateMode()
|
||||
{
|
||||
int new_mode = modes[active_mode].value;
|
||||
aura_gpu->direct = false;
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
AuraGPUController* aura_gpu;
|
||||
|
||||
@@ -330,7 +330,7 @@ void RGBController_AuraSMBus::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_AuraSMBus::DeviceUpdateMode()
|
||||
void RGBController_AuraSMBus::UpdateMode()
|
||||
{
|
||||
if (modes[active_mode].value == 0xFFFF)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
AuraSMBusController* aura;
|
||||
|
||||
@@ -175,11 +175,6 @@ void RGBController_AuraUSB::SetupZones()
|
||||
|
||||
void RGBController_AuraUSB::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(((unsigned int)new_size >= zones[zone].leds_min) && ((unsigned int)new_size <= zones[zone].leds_max))
|
||||
{
|
||||
zones[zone].leds_count = new_size;
|
||||
@@ -213,7 +208,7 @@ void RGBController_AuraUSB::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AuraUSB::DeviceUpdateMode()
|
||||
void RGBController_AuraUSB::UpdateMode()
|
||||
{
|
||||
unsigned char red = 0;
|
||||
unsigned char grn = 0;
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
AuraUSBController* aura;
|
||||
|
||||
@@ -11,15 +11,14 @@
|
||||
|
||||
RGBController_CMMP750Controller::RGBController_CMMP750Controller(CMMP750Controller* cmmp_ptr)
|
||||
{
|
||||
cmmp750 = cmmp_ptr;
|
||||
unsigned char speed = cmmp750->GetLedSpeed();
|
||||
cmmp750 = cmmp_ptr;
|
||||
|
||||
name = cmmp750->GetDeviceName();
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = cmmp750->GetDeviceName();
|
||||
version = "1.0";
|
||||
serial = "";
|
||||
location = cmmp750->GetLocation();
|
||||
name = cmmp750->GetDeviceName();
|
||||
type = DEVICE_TYPE_MOUSEMAT;
|
||||
description = cmmp750->GetDeviceName();
|
||||
version = "1.0";
|
||||
serial = "";
|
||||
location = cmmp750->GetLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
@@ -35,7 +34,7 @@ RGBController_CMMP750Controller::RGBController_CMMP750Controller(CMMP750Controll
|
||||
Blink.speed_min = MP750_SPEED_SLOWEST;
|
||||
Blink.speed_max = MP750_SPEED_FASTEST;
|
||||
Blink.color_mode = MODE_COLORS_PER_LED;
|
||||
Blink.speed = speed;
|
||||
Blink.speed = MP750_SPEED_NORMAL;
|
||||
modes.push_back(Blink);
|
||||
|
||||
mode Breathing;
|
||||
@@ -45,7 +44,7 @@ RGBController_CMMP750Controller::RGBController_CMMP750Controller(CMMP750Controll
|
||||
Breathing.speed_min = MP750_SPEED_SLOWEST;
|
||||
Breathing.speed_max = MP750_SPEED_FASTEST;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
Breathing.speed = speed;
|
||||
Breathing.speed = MP750_SPEED_NORMAL;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode ColorCycle;
|
||||
@@ -55,7 +54,7 @@ RGBController_CMMP750Controller::RGBController_CMMP750Controller(CMMP750Controll
|
||||
ColorCycle.speed_min = MP750_SPEED_SLOWEST;
|
||||
ColorCycle.speed_max = MP750_SPEED_FASTEST;
|
||||
ColorCycle.color_mode = MODE_COLORS_NONE;
|
||||
ColorCycle.speed = speed;
|
||||
ColorCycle.speed = MP750_SPEED_NORMAL;
|
||||
modes.push_back(ColorCycle);
|
||||
|
||||
mode BreathCycle;
|
||||
@@ -65,11 +64,10 @@ RGBController_CMMP750Controller::RGBController_CMMP750Controller(CMMP750Controll
|
||||
BreathCycle.speed_min = MP750_SPEED_SLOWEST;
|
||||
BreathCycle.speed_max = MP750_SPEED_FASTEST;
|
||||
BreathCycle.color_mode = MODE_COLORS_NONE;
|
||||
BreathCycle.speed = speed;
|
||||
BreathCycle.speed = MP750_SPEED_NORMAL;
|
||||
modes.push_back(BreathCycle);
|
||||
|
||||
SetupZones();
|
||||
active_mode = cmmp750->GetMode();
|
||||
}
|
||||
|
||||
RGBController_CMMP750Controller::~RGBController_CMMP750Controller()
|
||||
@@ -93,18 +91,6 @@ void RGBController_CMMP750Controller::SetupZones()
|
||||
leds.push_back(MP_led);
|
||||
|
||||
SetupColors();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Initialize colors for each LED |
|
||||
\*---------------------------------------------------------*/
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
unsigned char red = cmmp750->GetLedRed();
|
||||
unsigned char grn = cmmp750->GetLedGreen();
|
||||
unsigned char blu = cmmp750->GetLedBlue();
|
||||
|
||||
colors[led_idx] = ToRGBColor(red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
@@ -141,7 +127,7 @@ void RGBController_CMMP750Controller::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CMMP750Controller::DeviceUpdateMode()
|
||||
void RGBController_CMMP750Controller::UpdateMode()
|
||||
{
|
||||
switch(modes[active_mode].value)
|
||||
{
|
||||
|
||||
@@ -25,9 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
private:
|
||||
CMMP750Controller* cmmp750;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
|
||||
@@ -231,11 +231,6 @@ void RGBController_CorsairLightingNode::SetupZones()
|
||||
|
||||
void RGBController_CorsairLightingNode::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(((unsigned int)new_size >= zones[zone].leds_min) && ((unsigned int)new_size <= zones[zone].leds_max))
|
||||
{
|
||||
zones[zone].leds_count = new_size;
|
||||
@@ -269,7 +264,7 @@ void RGBController_CorsairLightingNode::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairLightingNode::DeviceUpdateMode()
|
||||
void RGBController_CorsairLightingNode::UpdateMode()
|
||||
{
|
||||
if(modes[active_mode].value == 0xFFFF)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
CorsairLightingNodeController* corsair;
|
||||
|
||||
@@ -323,7 +323,7 @@ void RGBController_CorsairPeripheral::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairPeripheral::DeviceUpdateMode()
|
||||
void RGBController_CorsairPeripheral::UpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
CorsairPeripheralController* corsair;
|
||||
|
||||
@@ -101,7 +101,7 @@ void RGBController_CorsairVengeance::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_CorsairVengeance::DeviceUpdateMode()
|
||||
void RGBController_CorsairVengeance::UpdateMode()
|
||||
{
|
||||
corsair->SetMode(modes[active_mode].value);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
CorsairVengeanceController* corsair;
|
||||
|
||||
@@ -219,7 +219,7 @@ void RGBController_CorsairVengeancePro::SetCustomMode()
|
||||
active_mode = 9;
|
||||
}
|
||||
|
||||
void RGBController_CorsairVengeancePro::DeviceUpdateMode()
|
||||
void RGBController_CorsairVengeancePro::UpdateMode()
|
||||
{
|
||||
unsigned int corsair_direction = 0;
|
||||
bool random = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
CorsairVengeanceProController* corsair;
|
||||
|
||||
@@ -177,7 +177,7 @@ void RGBController_Crucial::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_Crucial::DeviceUpdateMode()
|
||||
void RGBController_Crucial::UpdateMode()
|
||||
{
|
||||
crucial->SetMode(modes[active_mode].value);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
CrucialController* crucial;
|
||||
|
||||
@@ -106,7 +106,7 @@ void RGBController_DuckyKeyboard::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_DuckyKeyboard::DeviceUpdateMode()
|
||||
void RGBController_DuckyKeyboard::UpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
DuckyKeyboardController* ducky;
|
||||
|
||||
@@ -43,7 +43,7 @@ void RGBController_Dummy::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_Dummy::DeviceUpdateMode()
|
||||
void RGBController_Dummy::UpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -24,5 +24,5 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
};
|
||||
|
||||
@@ -186,7 +186,7 @@ void RGBController_E131::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_E131::DeviceUpdateMode()
|
||||
void RGBController_E131::UpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
std::vector<E131Device> devices;
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_EKController.cpp |
|
||||
| |
|
||||
| Driver for EK Loop Connect |
|
||||
| |
|
||||
| Chris M (Dr_No) 16th Jul 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "RGBController_EKController.h"
|
||||
|
||||
RGBController_EKController::RGBController_EKController(EKController* _dev)
|
||||
{
|
||||
EK_dev = _dev;
|
||||
|
||||
name = EK_dev->GetDeviceName();
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
description = EK_dev->GetDeviceName();
|
||||
version = "1.0";
|
||||
serial = EK_dev->GetSerial();
|
||||
location = EK_dev->GetLocation();
|
||||
|
||||
mode Static;
|
||||
Static.name = "Static";
|
||||
Static.value = EK_MODE_STATIC;
|
||||
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Static.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = EK_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Breathing.speed_min = EK_SPEED_SLOWEST;
|
||||
Breathing.speed_max = EK_SPEED_FASTEST;
|
||||
Breathing.color_mode = MODE_COLORS_PER_LED;
|
||||
Breathing.speed = EK_SPEED_NORMAL;
|
||||
modes.push_back(Breathing);
|
||||
|
||||
mode Fading;
|
||||
Fading.name = "Fading";
|
||||
Fading.value = EK_MODE_FADING;
|
||||
Fading.flags = MODE_FLAG_HAS_SPEED;
|
||||
Fading.speed_min = EK_SPEED_SLOWEST;
|
||||
Fading.speed_max = EK_SPEED_FASTEST;
|
||||
Fading.color_mode = MODE_COLORS_NONE;
|
||||
Fading.speed = EK_SPEED_NORMAL;
|
||||
modes.push_back(Fading);
|
||||
|
||||
mode Marquee;
|
||||
Marquee.name = "Marquee";
|
||||
Marquee.value = EK_MODE_MARQUEE;
|
||||
Marquee.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Marquee.speed_min = EK_SPEED_SLOWEST;
|
||||
Marquee.speed_max = EK_SPEED_FASTEST;
|
||||
Marquee.color_mode = MODE_COLORS_PER_LED;
|
||||
Marquee.speed = EK_SPEED_NORMAL;
|
||||
modes.push_back(Marquee);
|
||||
|
||||
mode Covering_Marquee;
|
||||
Covering_Marquee.name = "Covering Marquee";
|
||||
Covering_Marquee.value = EK_MODE_COVERING_MARQUEE;
|
||||
Covering_Marquee.flags = MODE_FLAG_HAS_SPEED;
|
||||
Covering_Marquee.speed_min = EK_SPEED_SLOWEST;
|
||||
Covering_Marquee.speed_max = EK_SPEED_FASTEST;
|
||||
Covering_Marquee.color_mode = MODE_COLORS_NONE;
|
||||
Covering_Marquee.speed = EK_SPEED_NORMAL;
|
||||
modes.push_back(Covering_Marquee);
|
||||
|
||||
mode Pulse;
|
||||
Pulse.name = "Pulse";
|
||||
Pulse.value = EK_MODE_PULSE;
|
||||
Pulse.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Pulse.speed_min = EK_SPEED_SLOWEST;
|
||||
Pulse.speed_max = EK_SPEED_FASTEST;
|
||||
Pulse.color_mode = MODE_COLORS_PER_LED;
|
||||
Pulse.speed = EK_SPEED_NORMAL;
|
||||
modes.push_back(Pulse);
|
||||
|
||||
mode Spectrum_Wave;
|
||||
Spectrum_Wave.name = "Spectrum_Wave";
|
||||
Spectrum_Wave.value = EK_MODE_SPECTRUM_WAVE;
|
||||
Spectrum_Wave.flags = MODE_FLAG_HAS_SPEED;
|
||||
Spectrum_Wave.speed_min = EK_SPEED_SLOWEST;
|
||||
Spectrum_Wave.speed_max = EK_SPEED_FASTEST;
|
||||
Spectrum_Wave.color_mode = MODE_COLORS_NONE;
|
||||
Spectrum_Wave.speed = EK_SPEED_NORMAL;
|
||||
modes.push_back(Spectrum_Wave);
|
||||
|
||||
mode Alternating;
|
||||
Alternating.name = "Alternating";
|
||||
Alternating.value = EK_MODE_ALTERNATING;
|
||||
Alternating.flags = MODE_FLAG_HAS_SPEED;
|
||||
Alternating.speed_min = EK_SPEED_SLOWEST;
|
||||
Alternating.speed_max = EK_SPEED_FASTEST;
|
||||
Alternating.color_mode = MODE_COLORS_PER_LED;
|
||||
Alternating.speed = EK_SPEED_NORMAL;
|
||||
modes.push_back(Alternating);
|
||||
|
||||
mode Candle;
|
||||
Candle.name = "Candle";
|
||||
Candle.value = EK_MODE_CANDLE;
|
||||
Candle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Candle.speed_min = EK_SPEED_SLOWEST;
|
||||
Candle.speed_max = EK_SPEED_FASTEST;
|
||||
Candle.color_mode = MODE_COLORS_PER_LED;
|
||||
Candle.speed = EK_SPEED_NORMAL;
|
||||
modes.push_back(Candle);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_EKController::~RGBController_EKController()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_EKController::SetupZones()
|
||||
{
|
||||
zone EK_zone;
|
||||
EK_zone.name = "Loop Connect";
|
||||
EK_zone.type = ZONE_TYPE_SINGLE;
|
||||
EK_zone.leds_min = 1;
|
||||
EK_zone.leds_max = 1;
|
||||
EK_zone.leds_count = 1;
|
||||
EK_zone.matrix_map = NULL;
|
||||
zones.push_back(EK_zone);
|
||||
|
||||
led EK_led;
|
||||
EK_led.name = "EK LED";
|
||||
leds.push_back(EK_led);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_EKController::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| ToDo |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_EKController::DeviceUpdateLEDs()
|
||||
{
|
||||
unsigned char red = RGBGetRValue(colors[0]);
|
||||
unsigned char grn = RGBGetGValue(colors[0]);
|
||||
unsigned char blu = RGBGetBValue(colors[0]);
|
||||
EK_dev->SetColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_EKController::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
RGBColor color = colors[zone];
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
EK_dev->SetColor(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_EKController::UpdateSingleLED(int led)
|
||||
{
|
||||
UpdateZoneLEDs(led);
|
||||
}
|
||||
|
||||
void RGBController_EKController::SetCustomMode()
|
||||
{
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_EKController::DeviceUpdateMode()
|
||||
{
|
||||
EK_dev->SetMode(modes[active_mode].value, modes[active_mode].speed);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| RGBController_EKController.h |
|
||||
| |
|
||||
| Driver for EK Loop Connect |
|
||||
| |
|
||||
| Chris M (Dr_No) 16th Jul 2020 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef RGBCONTROLLER_EKCONTROLLER_H
|
||||
#define RGBCONTROLLER_EKCONTROLLER_H
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "Controllers/EKController/EKController.h"
|
||||
|
||||
class RGBController_EKController : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_EKController(EKController *_dev);
|
||||
~RGBController_EKController();
|
||||
|
||||
void SetupZones();
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
private:
|
||||
EKController* EK_dev;
|
||||
};
|
||||
|
||||
#endif // RGBCONTROLLER_EKCONTROLLER_H
|
||||
@@ -144,7 +144,7 @@ void RGBController_Faustus::SetCustomMode()
|
||||
SetMode(0);
|
||||
}
|
||||
|
||||
void RGBController_Faustus::DeviceUpdateMode()
|
||||
void RGBController_Faustus::UpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class RGBController_Faustus : public RGBController
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
};
|
||||
|
||||
#endif // RGBCONTROLLER_FAUSTUS_H
|
||||
|
||||
@@ -174,7 +174,7 @@ void RGBController_GloriousModelO::SetCustomMode()
|
||||
//active_mode = 2;
|
||||
}
|
||||
|
||||
void RGBController_GloriousModelO::DeviceUpdateMode()
|
||||
void RGBController_GloriousModelO::UpdateMode()
|
||||
{
|
||||
unsigned int direction = 0;
|
||||
unsigned int speed = GLORIOUS_SPEED_NORMAL;
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
GloriousModelOController* gmo;
|
||||
|
||||
@@ -220,11 +220,6 @@ void RGBController_HuePlus::SetupZones()
|
||||
|
||||
void RGBController_HuePlus::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(((unsigned int)new_size >= zones[zone].leds_min) && ((unsigned int)new_size <= zones[zone].leds_max))
|
||||
{
|
||||
zones[zone].leds_count = new_size;
|
||||
@@ -258,7 +253,7 @@ void RGBController_HuePlus::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_HuePlus::DeviceUpdateMode()
|
||||
void RGBController_HuePlus::UpdateMode()
|
||||
{
|
||||
if(modes[active_mode].value == HUE_PLUS_MODE_FIXED)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
HuePlusController* hueplus;
|
||||
|
||||
@@ -39,157 +39,12 @@ THREAD keepalive_thread(void *param)
|
||||
#define NA 0xFFFFFFFF
|
||||
|
||||
static unsigned int matrix_map[6][23] =
|
||||
{ { 0, NA, 11, 17, 22, 27, NA, 33, 38, 43, 49, NA, 54, 60, 64, 68, 74, 78, 83, NA, NA, NA, NA },
|
||||
{ 1, 6, 12, 18, 23, 28, 34, 39, 44, 50, 55, NA, 61, 65, 69, NA, 75, 79, 84, 87, 92, 96, 101 },
|
||||
{ 2, NA, 7, 13, 19, 24, NA, 29, 35, 40, 45, 51, 56, 62, 66, 70, 76, 80, 85, 88, 93, 97, 102 },
|
||||
{ 3, NA, 8, 14, 20, 25, NA, 30, 36, 41, 46, 52, 57, 63, 71, NA, NA, NA, NA, 89, 94, 98, NA },
|
||||
{ 4, NA, 9, 15, 21, 26, NA, 31, NA, 37, 42, 47, 53, 58, 72, NA, NA, 81, NA, 90, 95, 99, 103 },
|
||||
{ 5, 10, 16, NA, NA, NA, NA, 32, NA, NA, NA, NA, 48, 59, 67, 73, 77, 82, 86, 91, NA, 100, NA } };
|
||||
|
||||
static const char* zone_names[] =
|
||||
{
|
||||
"Keyboard",
|
||||
};
|
||||
|
||||
static zone_type zone_types[] =
|
||||
{
|
||||
ZONE_TYPE_MATRIX,
|
||||
};
|
||||
|
||||
static const unsigned int zone_sizes[] =
|
||||
{
|
||||
104,
|
||||
};
|
||||
|
||||
static const char *led_names[] =
|
||||
{
|
||||
"Key: Escape",
|
||||
"Key: `",
|
||||
"Key: Tab",
|
||||
"Key: Caps Lock",
|
||||
"Key: Left Shift",
|
||||
"Key: Left Control",
|
||||
// Skip index 6
|
||||
"Key: 1",
|
||||
"Key: Q",
|
||||
"Key: A",
|
||||
"Key: Z",
|
||||
"Key: Left Windows",
|
||||
"Key: F1",
|
||||
"Key: 2",
|
||||
"Key: W",
|
||||
"Key: S",
|
||||
"Key: X",
|
||||
"Key: Left Alt",
|
||||
"Key: F2",
|
||||
"Key: 3",
|
||||
"Key: E",
|
||||
"Key: D",
|
||||
"Key: C",
|
||||
// Skip index 23
|
||||
"Key: F3",
|
||||
"Key: 4",
|
||||
"Key: R",
|
||||
"Key: F",
|
||||
"Key: V",
|
||||
// Skip index 29
|
||||
"Key: F4",
|
||||
"Key: 5",
|
||||
"Key: T",
|
||||
"Key: G",
|
||||
"Key: B",
|
||||
"Key: Space",
|
||||
"Key: F5",
|
||||
"Key: 6",
|
||||
"Key: Y",
|
||||
"Key: H",
|
||||
"Key: N",
|
||||
// Skip index 41
|
||||
"Key: F6",
|
||||
"Key: 7",
|
||||
"Key: U",
|
||||
"Key: J",
|
||||
"Key: M",
|
||||
// Skip index 47
|
||||
"Key: F7",
|
||||
"Key: 8",
|
||||
"Key: I",
|
||||
"Key: K",
|
||||
"Key: ,",
|
||||
"Key: Right Alt",
|
||||
"Key: F8",
|
||||
"Key: 9",
|
||||
"Key: O",
|
||||
"Key: L",
|
||||
"Key: .",
|
||||
// Skip index 59
|
||||
"Key: F9",
|
||||
"Key: 0",
|
||||
"Key: P",
|
||||
"Key: ;",
|
||||
"Key: /",
|
||||
"Key: Fn",
|
||||
"Key: F10",
|
||||
"Key: -",
|
||||
"Key: [",
|
||||
"Key: '",
|
||||
// Skip index 70
|
||||
// Skip index 71
|
||||
"Key: F11",
|
||||
"Key: =",
|
||||
"Key: ]",
|
||||
// Skip index 75
|
||||
// Skip index 76
|
||||
"Key: Context",
|
||||
"Key: F12",
|
||||
"Key: Backspace",
|
||||
"Key: \\",
|
||||
"Key: Enter",
|
||||
"Key: Right Shift",
|
||||
"Key: Right Control",
|
||||
"Key: Print Screen",
|
||||
"Key: Insert",
|
||||
"Key: Delete",
|
||||
// Skip index 87
|
||||
// Skip index 88
|
||||
"Key: Left Arrow",
|
||||
"Key: Scroll Lock",
|
||||
"Key: Home",
|
||||
"Key: End",
|
||||
// Skip index 93
|
||||
"Key: Up Arrow",
|
||||
"Key: Down Arrow",
|
||||
"Key: Pause/Break",
|
||||
"Key: Page Up",
|
||||
"Key: Page Down",
|
||||
// Skip index 99
|
||||
// Skip index 100
|
||||
"Key: Right Arrow",
|
||||
// Skip index 102
|
||||
"Key: Num Lock",
|
||||
"Key: Number Pad 7",
|
||||
"Key: Number Pad 4",
|
||||
"Key: Number Pad 1",
|
||||
"Key: Number Pad 0",
|
||||
// Skip index 108
|
||||
"Key: Number Pad /",
|
||||
"Key: Number Pad 8",
|
||||
"Key: Number Pad 5",
|
||||
"Key: Number Pad 2",
|
||||
// Skip index 113
|
||||
// Skip index 114
|
||||
"Key: Number Pad *",
|
||||
"Key: Number Pad 9",
|
||||
"Key: Number Pad 6",
|
||||
"Key: Number Pad 3",
|
||||
"Key: Number Pad .",
|
||||
// Skip index 120
|
||||
"Key: Number Pad -",
|
||||
"Key: Number Pad +",
|
||||
// Skip index 123
|
||||
// Skip index 124
|
||||
"Key: Number Pad Enter",
|
||||
};
|
||||
{ { 0, NA, 12, 18, 24, 30, NA, 42, 48, 54, 60, NA, 66, 72, 78, 84, 90, 96, 102, NA, NA, NA, NA },
|
||||
{ 1, 7, 13, 19, 25, 31, 37, 43, 49, 55, 61, NA, 67, 73, 85, NA, 91, 97, 103, NA, NA, NA, NA },
|
||||
{ 2, NA, 8, 14, 20, 26, NA, 32, 38, 44, 50, 56, 62, 68, 74, 86, 92, 98, 104, NA, NA, NA, NA },
|
||||
{ 3, NA, 9, 15, 21, 27, NA, 33, 39, 45, 51, 57, 63, 69, 87, NA, NA, NA, NA, NA, NA, NA, NA },
|
||||
{ 4, NA, 16, 22, 28, 34, NA, 40, NA, 46, 52, 58, 64, 70, 82, NA, NA, 100, NA, NA, NA, NA, NA },
|
||||
{ 5, 11, 17, NA, NA, NA, NA, 41, NA, NA, NA, NA, 65, 77, 83, 89, 95, 101, 107, NA, NA, NA, NA } };
|
||||
|
||||
RGBController_HyperXAlloyOrigins::RGBController_HyperXAlloyOrigins(HyperXAlloyOriginsController* hyperx_ptr)
|
||||
{
|
||||
@@ -229,40 +84,27 @@ RGBController_HyperXAlloyOrigins::~RGBController_HyperXAlloyOrigins()
|
||||
|
||||
void RGBController_HyperXAlloyOrigins::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up zones |
|
||||
\*---------------------------------------------------------*/
|
||||
unsigned int total_led_count = 0;
|
||||
for(unsigned int zone_idx = 0; zone_idx < 1; zone_idx++)
|
||||
{
|
||||
zone new_zone;
|
||||
new_zone.name = zone_names[zone_idx];
|
||||
new_zone.type = zone_types[zone_idx];
|
||||
new_zone.leds_min = zone_sizes[zone_idx];
|
||||
new_zone.leds_max = zone_sizes[zone_idx];
|
||||
new_zone.leds_count = zone_sizes[zone_idx];
|
||||
zone new_zone;
|
||||
|
||||
if(zone_types[zone_idx] == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 6;
|
||||
new_zone.matrix_map->width = 23;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_zone.matrix_map = NULL;
|
||||
}
|
||||
new_zone.name = "Keyboard";
|
||||
new_zone.type = ZONE_TYPE_MATRIX;
|
||||
new_zone.leds_min = 155;
|
||||
new_zone.leds_max = 155;
|
||||
new_zone.leds_count = 155;
|
||||
new_zone.matrix_map = new matrix_map_type;
|
||||
new_zone.matrix_map->height = 6;
|
||||
new_zone.matrix_map->width = 23;
|
||||
new_zone.matrix_map->map = (unsigned int *)&matrix_map;
|
||||
|
||||
zones.push_back(new_zone);
|
||||
|
||||
zones.push_back(new_zone);
|
||||
|
||||
total_led_count += zone_sizes[zone_idx];
|
||||
}
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < total_led_count; led_idx++)
|
||||
for(int led_idx = 0; led_idx < 155; led_idx++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_idx];
|
||||
|
||||
new_led.name = "Keyboard LED ";
|
||||
new_led.name.append(std::to_string(led_idx));
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
@@ -294,7 +136,7 @@ void RGBController_HyperXAlloyOrigins::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_HyperXAlloyOrigins::DeviceUpdateMode()
|
||||
void RGBController_HyperXAlloyOrigins::UpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -312,4 +154,4 @@ void RGBController_HyperXAlloyOrigins::KeepaliveThread()
|
||||
}
|
||||
std::this_thread::sleep_for(10ms);;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
void KeepaliveThread();
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ void RGBController_HyperXDRAM::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_HyperXDRAM::DeviceUpdateMode()
|
||||
void RGBController_HyperXDRAM::UpdateMode()
|
||||
{
|
||||
bool random = (modes[active_mode].color_mode == MODE_COLORS_RANDOM);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
HyperXDRAMController* hyperx;
|
||||
|
||||
@@ -344,7 +344,7 @@ void RGBController_HyperXKeyboard::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_HyperXKeyboard::DeviceUpdateMode()
|
||||
void RGBController_HyperXKeyboard::UpdateMode()
|
||||
{
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
void KeepaliveThread();
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ void RGBController_LEDStrip::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_LEDStrip::DeviceUpdateMode()
|
||||
void RGBController_LEDStrip::UpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
LEDStripController* strip;
|
||||
|
||||
@@ -103,7 +103,7 @@ void RGBController_LogitechG203::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_LogitechG203::DeviceUpdateMode()
|
||||
void RGBController_LogitechG203::UpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
LogitechG203Controller* logitech;
|
||||
|
||||
@@ -117,7 +117,7 @@ void RGBController_LogitechG403::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_LogitechG403::DeviceUpdateMode()
|
||||
void RGBController_LogitechG403::UpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
LogitechG403Controller* logitech;
|
||||
|
||||
@@ -348,7 +348,7 @@ void RGBController_LogitechG810::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_LogitechG810::DeviceUpdateMode()
|
||||
void RGBController_LogitechG810::UpdateMode()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Direct mode does not send a mode packet |
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
LogitechG810Controller* logitech;
|
||||
|
||||
@@ -104,7 +104,7 @@ void RGBController_MSI3Zone::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_MSI3Zone::DeviceUpdateMode()
|
||||
void RGBController_MSI3Zone::UpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
MSI3ZoneController* msi;
|
||||
|
||||
@@ -316,7 +316,7 @@ void RGBController_MSIGPU::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_MSIGPU::DeviceUpdateMode()
|
||||
void RGBController_MSIGPU::UpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
MSIGPUController* msi_gpu;
|
||||
|
||||
@@ -93,11 +93,6 @@ void RGBController_MSIMysticLight::SetupZones()
|
||||
|
||||
void RGBController_MSIMysticLight::ResizeZone(int zone, int new_size)
|
||||
{
|
||||
if((size_t) zone >= zones.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
MSI_ZONE zon = ZoneFromPos(zone);
|
||||
unsigned int max_count = controller->GetZoneMaxLedCount(zon);
|
||||
unsigned int min_count = controller->GetZoneMinLedCount(zon);
|
||||
@@ -134,7 +129,7 @@ void RGBController_MSIMysticLight::UpdateSingleLED(int led)
|
||||
controller->Update();
|
||||
}
|
||||
|
||||
void RGBController_MSIMysticLight::DeviceUpdateMode()
|
||||
void RGBController_MSIMysticLight::UpdateMode()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -227,4 +222,4 @@ void RGBController_MSIMysticLight::SetupMode(const char *name, MSI_MODE mod, uns
|
||||
}
|
||||
|
||||
modes.push_back(Mode);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
void SetupModes();
|
||||
|
||||
@@ -79,7 +79,7 @@ void RGBController_MSIRGB::SetCustomMode()
|
||||
|
||||
}
|
||||
|
||||
void RGBController_MSIRGB::DeviceUpdateMode()
|
||||
void RGBController_MSIRGB::UpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
MSIRGBController* msi;
|
||||
|
||||
@@ -201,7 +201,7 @@ void RGBController_NZXTHue2::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_NZXTHue2::DeviceUpdateMode()
|
||||
void RGBController_NZXTHue2::UpdateMode()
|
||||
{
|
||||
if(modes[active_mode].value == 0xFFFF)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
NZXTHue2Controller* hue2;
|
||||
|
||||
@@ -344,7 +344,7 @@ void RGBController_NZXTKraken::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_NZXTKraken::DeviceUpdateMode()
|
||||
void RGBController_NZXTKraken::UpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
std::vector<std::vector<RGBColor>> GetColors
|
||||
|
||||
@@ -62,12 +62,9 @@ void RGBController_Network::UpdateSingleLED(int led)
|
||||
void RGBController_Network::SetCustomMode()
|
||||
{
|
||||
client->SendRequest_RGBController_SetCustomMode(dev_idx);
|
||||
|
||||
client->SendRequest_ControllerData(dev_idx);
|
||||
client->WaitOnControllerData();
|
||||
}
|
||||
|
||||
void RGBController_Network::DeviceUpdateMode()
|
||||
void RGBController_Network::UpdateMode()
|
||||
{
|
||||
unsigned char * data = GetModeDescription(active_mode);
|
||||
unsigned int size;
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
NetworkClient * client;
|
||||
|
||||
@@ -90,7 +90,7 @@ void RGBController_OpenRazer::DeviceUpdateLEDs()
|
||||
|
||||
case RAZER_TYPE_NOMATRIX:
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
UpdateMode();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -459,7 +459,7 @@ void RGBController_OpenRazer::SetCustomMode()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::DeviceUpdateMode()
|
||||
void RGBController_OpenRazer::UpdateMode()
|
||||
{
|
||||
char update_value[6];
|
||||
char effect_value[1];
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
int device_index;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ void RGBController_OpenRazer::DeviceUpdateLEDs()
|
||||
|
||||
case RAZER_TYPE_NOMATRIX:
|
||||
{
|
||||
DeviceUpdateMode();
|
||||
UpdateMode();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -407,7 +407,7 @@ void RGBController_OpenRazer::SetCustomMode()
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::DeviceUpdateMode()
|
||||
void RGBController_OpenRazer::UpdateMode()
|
||||
{
|
||||
char update_value[6];
|
||||
char effect_value[1];
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
int device_index;
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ void RGBController_PatriotViper::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_PatriotViper::DeviceUpdateMode()
|
||||
void RGBController_PatriotViper::UpdateMode()
|
||||
{
|
||||
if(modes[active_mode].value == 0xFFFF)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
PatriotViperController* viper;
|
||||
|
||||
@@ -312,7 +312,7 @@ void RGBController_Polychrome::SetCustomMode()
|
||||
active_mode = 1;
|
||||
}
|
||||
|
||||
void RGBController_Polychrome::DeviceUpdateMode()
|
||||
void RGBController_Polychrome::UpdateMode()
|
||||
{
|
||||
polychrome->SetMode(modes[active_mode].value);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
PolychromeController* polychrome;
|
||||
|
||||
@@ -265,7 +265,7 @@ void RGBController_PoseidonZRGB::SetCustomMode()
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
void RGBController_PoseidonZRGB::DeviceUpdateMode()
|
||||
void RGBController_PoseidonZRGB::UpdateMode()
|
||||
{
|
||||
poseidon->SetMode(modes[active_mode].value, modes[active_mode].direction, modes[active_mode].speed);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void SetCustomMode();
|
||||
void DeviceUpdateMode();
|
||||
void UpdateMode();
|
||||
|
||||
private:
|
||||
PoseidonZRGBController* poseidon;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user