Reorganization! Move all controllers into their own folders, move all RGBController wrappers into one folder, move i2c_smbus and serial_port dependencies into folders, and move main application/UI stuff into folders. Should help lead into creating a proper library
This commit is contained in:
parent
ef79de6c7c
commit
155ad165b1
61 changed files with 51 additions and 40 deletions
123
RGBController/OpenRazerDetect.cpp
Normal file
123
RGBController/OpenRazerDetect.cpp
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
#include "RGBController.h"
|
||||
#include "RGBController_OpenRazer.h"
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectOpenRazerControllers *
|
||||
* *
|
||||
* Detect devices supported by the OpenRazer kernel drivers *
|
||||
* * *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectOpenRazerControllers(std::vector<RGBController*> &rgb_controllers)
|
||||
{
|
||||
char driver_path[512];
|
||||
DIR *dir;
|
||||
struct dirent *ent;
|
||||
int test_fd;
|
||||
bool done = false;
|
||||
int driver_to_read = 0;
|
||||
|
||||
while(driver_to_read < 7)
|
||||
{
|
||||
switch(driver_to_read)
|
||||
{
|
||||
case 0:
|
||||
strcpy(driver_path, "/sys/bus/hid/drivers/razerkbd/");
|
||||
break;
|
||||
|
||||
case 1:
|
||||
strcpy(driver_path, "/sys/bus/hid/drivers/razermouse/");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
strcpy(driver_path, "/sys/bus/hid/drivers/razerfirefly/");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
strcpy(driver_path, "/sys/bus/hid/drivers/razermug/");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
strcpy(driver_path, "/sys/bus/hid/drivers/razercore/");
|
||||
break;
|
||||
|
||||
case 5:
|
||||
strcpy(driver_path, "/sys/bus/hid/drivers/razerkraken/");
|
||||
break;
|
||||
|
||||
case 6:
|
||||
strcpy(driver_path, "/sys/bus/hid/drivers/razermousemat/");
|
||||
break;
|
||||
}
|
||||
|
||||
done = false;
|
||||
|
||||
dir = opendir(driver_path);
|
||||
|
||||
if(dir == NULL)
|
||||
{
|
||||
closedir(dir);
|
||||
|
||||
driver_to_read++;
|
||||
continue;
|
||||
}
|
||||
|
||||
ent = readdir(dir);
|
||||
|
||||
while(ent != NULL)
|
||||
{
|
||||
if(ent->d_type == DT_DIR || ent->d_type == DT_LNK)
|
||||
{
|
||||
if(!strcmp(ent->d_name, "."))
|
||||
{
|
||||
if(done == false)
|
||||
{
|
||||
done = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(!strcmp(ent->d_name, "..") || !strcmp(ent->d_name, "module"))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
int device_type;
|
||||
char device_string[1024];
|
||||
strcpy(device_string, driver_path);
|
||||
strcat(device_string, ent->d_name);
|
||||
|
||||
RGBController_OpenRazer * razer_rgb = new RGBController_OpenRazer(device_string);
|
||||
|
||||
if(razer_rgb->device != RGBController_OpenRazer::RAZER_NO_DEVICE)
|
||||
{
|
||||
rgb_controllers.push_back(razer_rgb);
|
||||
}
|
||||
else
|
||||
{
|
||||
delete razer_rgb;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ent = readdir(dir);
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
|
||||
driver_to_read++;
|
||||
}
|
||||
|
||||
} /* DetectOpenRazerControllers() */
|
||||
64
RGBController/RGBController.h
Normal file
64
RGBController/RGBController.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController.h |
|
||||
| |
|
||||
| Definitions and types for generic RGB |
|
||||
| lighting controller interface |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/2/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
typedef unsigned int RGBColor;
|
||||
|
||||
#define RGBGetRValue(rgb) (rgb & 0x000000FF)
|
||||
#define RGBGetGValue(rgb) ((rgb >> 8) & 0x000000FF)
|
||||
#define RGBGetBValue(rgb) ((rgb >> 16) & 0x000000FF)
|
||||
|
||||
#define ToRGBColor(r, g, b) ((b << 16) | (g << 8) | (r))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
std::string name; /* LED name */
|
||||
} led;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
std::string name; /* Mode name */
|
||||
} mode;
|
||||
|
||||
typedef int zone_type;
|
||||
|
||||
enum
|
||||
{
|
||||
ZONE_TYPE_SINGLE,
|
||||
ZONE_TYPE_LINEAR,
|
||||
ZONE_TYPE_MATRIX
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
std::string name; /* Zone name */
|
||||
zone_type type; /* Zone type */
|
||||
std::vector<std::vector<int>>
|
||||
map; /* LED index map */
|
||||
} zone;
|
||||
|
||||
class RGBController
|
||||
{
|
||||
public:
|
||||
std::string name; /* controller name */
|
||||
std::vector<led> leds; /* LEDs */
|
||||
std::vector<zone> zones; /* Zones */
|
||||
std::vector<mode> modes; /* Modes */
|
||||
|
||||
virtual int GetMode() = 0;
|
||||
virtual void SetMode(int mode) = 0;
|
||||
virtual void SetCustomMode() = 0;
|
||||
virtual void SetAllLEDs(RGBColor color) = 0;
|
||||
virtual void SetAllZoneLEDs(int zone, RGBColor color) = 0;
|
||||
virtual void SetLED(int led, RGBColor color) = 0;
|
||||
};
|
||||
92
RGBController/RGBController_AorusGPU.cpp
Normal file
92
RGBController/RGBController_AorusGPU.cpp
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_AorusGPU.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| Aorus GPU |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/17/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_AorusGPU.h"
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
static HMODULE handle;
|
||||
static unsigned char data[] = { 0x8E, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x40, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00,
|
||||
0x64, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00 };
|
||||
|
||||
int RGBController_AorusGPU::GetMode()
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
void RGBController_AorusGPU::SetMode(int mode)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AorusGPU::SetCustomMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_AorusGPU::SetAllLEDs(RGBColor color)
|
||||
{
|
||||
data[9] = RGBGetRValue(color);
|
||||
data[10] = RGBGetGValue(color);
|
||||
data[11] = RGBGetBValue(color);
|
||||
|
||||
GvWriteI2C(0x00000000, data, 0x00000000);
|
||||
}
|
||||
|
||||
void RGBController_AorusGPU::SetAllZoneLEDs(int zone, RGBColor color)
|
||||
{
|
||||
data[9] = RGBGetRValue(color);
|
||||
data[10] = RGBGetGValue(color);
|
||||
data[11] = RGBGetBValue(color);
|
||||
|
||||
GvWriteI2C(0x00000000, data, 0x00000000);
|
||||
}
|
||||
|
||||
void RGBController_AorusGPU::SetLED(int led, RGBColor color)
|
||||
{
|
||||
data[9] = RGBGetRValue(color);
|
||||
data[10] = RGBGetGValue(color);
|
||||
data[11] = RGBGetBValue(color);
|
||||
|
||||
GvWriteI2C(0x00000000, data, 0x00000000);
|
||||
}
|
||||
|
||||
RGBController_AorusGPU::RGBController_AorusGPU()
|
||||
{
|
||||
name = "Aorus GPU";
|
||||
|
||||
handle = LoadLibrary("GvDisplay.dll");
|
||||
|
||||
GvWriteI2C = (_GvWriteI2C)GetProcAddress(handle, "GvWriteI2C");
|
||||
GvFreeDispLib = (_GvFreeDispLib)GetProcAddress(handle, "GvFreeDispLib");
|
||||
GvInitDispLib = (_GvInitDispLib)GetProcAddress(handle, "GvInitDispLib");
|
||||
|
||||
GvFreeDispLib();
|
||||
GvInitDispLib();
|
||||
|
||||
mode aorus_mode;
|
||||
aorus_mode.name = "Static";
|
||||
modes.push_back(aorus_mode);
|
||||
|
||||
led aorus_led;
|
||||
aorus_led.name = "GPU LED";
|
||||
leds.push_back(aorus_led);
|
||||
|
||||
zone aorus_zone;
|
||||
aorus_zone.name = "GPU LED";
|
||||
std::vector<int> aorus_zone_map;
|
||||
aorus_zone_map.push_back(0);
|
||||
aorus_zone.map.push_back(aorus_zone_map);
|
||||
zones.push_back(aorus_zone);
|
||||
}
|
||||
33
RGBController/RGBController_AorusGPU.h
Normal file
33
RGBController/RGBController_AorusGPU.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_AorusGPU.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| Aorus GPU |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/17/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
|
||||
typedef unsigned int uint32;
|
||||
typedef uint32(*_GvWriteI2C)(uint32, void*, uint32);
|
||||
typedef void (*_GvFreeDispLib)();
|
||||
typedef void (*_GvInitDispLib)();
|
||||
|
||||
class RGBController_AorusGPU : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_AorusGPU();
|
||||
int GetMode();
|
||||
void SetMode(int mode);
|
||||
void SetCustomMode();
|
||||
void SetAllLEDs(RGBColor color);
|
||||
void SetAllZoneLEDs(int zone, RGBColor color);
|
||||
void SetLED(int led, RGBColor color);
|
||||
|
||||
private:
|
||||
_GvWriteI2C GvWriteI2C;
|
||||
_GvFreeDispLib GvFreeDispLib;
|
||||
_GvInitDispLib GvInitDispLib;
|
||||
};
|
||||
183
RGBController/RGBController_Aura.cpp
Normal file
183
RGBController/RGBController_Aura.cpp
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_Aura.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| Asus Aura driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/13/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_Aura.h"
|
||||
|
||||
int RGBController_Aura::GetMode()
|
||||
{
|
||||
if (aura->AuraRegisterRead(AURA_REG_DIRECT))
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return(aura->AuraRegisterRead(AURA_REG_MODE) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_Aura::SetMode(int mode)
|
||||
{
|
||||
if (mode == 0)
|
||||
{
|
||||
aura->SetDirect(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
aura->SetMode(mode - 1);
|
||||
aura->SetDirect(false);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_Aura::SetCustomMode()
|
||||
{
|
||||
aura->SetDirect(true);
|
||||
}
|
||||
|
||||
void RGBController_Aura::SetAllLEDs(RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
if (GetMode() == 0)
|
||||
{
|
||||
aura->SetAllColorsDirect(red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
aura->SetAllColorsEffect(red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_Aura::SetAllZoneLEDs(int zone, RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
for (int x = 0; x < zones[zone].map.size(); x++)
|
||||
{
|
||||
for (int y = 0; y < zones[zone].map[x].size(); y++)
|
||||
{
|
||||
if (GetMode() == 0)
|
||||
{
|
||||
aura->SetLEDColorDirect(zones[zone].map[x][y], red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
aura->SetLEDColorEffect(zones[zone].map[x][y], red, grn, blu);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_Aura::SetLED(int led, RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
if (GetMode() == 0)
|
||||
{
|
||||
aura->SetLEDColorDirect(led, red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
aura->SetLEDColorEffect(led, red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
RGBController_Aura::RGBController_Aura(AuraController * aura_ptr)
|
||||
{
|
||||
std::vector<unsigned char> aura_channels;
|
||||
|
||||
aura = aura_ptr;
|
||||
|
||||
name = aura->GetDeviceName();
|
||||
|
||||
mode aura_modes[AURA_NUMBER_MODES + 1];
|
||||
|
||||
aura_modes[0].name = "Direct";
|
||||
aura_modes[1].name = "Off";
|
||||
aura_modes[2].name = "Static";
|
||||
aura_modes[3].name = "Breathing";
|
||||
aura_modes[4].name = "Flashing";
|
||||
aura_modes[5].name = "Spectrum Cycle";
|
||||
aura_modes[6].name = "Rainbow";
|
||||
aura_modes[7].name = "Spectrum Cycle Breathing";
|
||||
aura_modes[8].name = "Chase Fade";
|
||||
aura_modes[9].name = "Spectrum Cycle Chase Fade";
|
||||
aura_modes[10].name = "Chase";
|
||||
aura_modes[11].name = "Spectrum Cycle Chase";
|
||||
aura_modes[12].name = "Spectrum Cycle Wave";
|
||||
aura_modes[13].name = "Chase Rainbow Pulse";
|
||||
aura_modes[14].name = "Random Flicker";
|
||||
|
||||
for (int i = 0; i < (AURA_NUMBER_MODES + 1); i++)
|
||||
{
|
||||
modes.push_back(aura_modes[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < aura->GetLEDCount(); i++)
|
||||
{
|
||||
aura_channels.push_back(aura->GetChannel(i));
|
||||
|
||||
led* new_led = new led();
|
||||
|
||||
new_led->name = aura->GetChannelName(i);
|
||||
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
std::vector<unsigned char> aura_zones;
|
||||
|
||||
// Search through all LEDs and create zones for each channel type
|
||||
for (int i = 0; i < aura_channels.size(); i++)
|
||||
{
|
||||
bool matched = false;
|
||||
|
||||
// Search through existing zones to make sure we don't create a duplicate zone
|
||||
for (int j = 0; j < aura_zones.size(); j++)
|
||||
{
|
||||
if (aura_channels[i] == aura_zones[j])
|
||||
{
|
||||
matched = true;
|
||||
}
|
||||
}
|
||||
|
||||
// If zone does not already exist, create it
|
||||
if (matched == false)
|
||||
{
|
||||
zone* new_zone = new zone();
|
||||
std::vector<int>* zone_row = new std::vector<int>();
|
||||
|
||||
// Set zone name to channel name
|
||||
new_zone->name = aura->GetChannelName(i);
|
||||
|
||||
// Find all LEDs with this channel type and add them to zone
|
||||
for (int j = 0; j < aura->GetLEDCount(); j++)
|
||||
{
|
||||
if (aura->GetChannel(j) == aura_channels[i])
|
||||
{
|
||||
zone_row->push_back(j);
|
||||
}
|
||||
}
|
||||
|
||||
// Aura devices can be either single or linear, never matrix
|
||||
// That means only one row is needed
|
||||
new_zone->map.push_back(*zone_row);
|
||||
|
||||
// Save channel to aura_zones so we know not to create another zone with this channel
|
||||
aura_zones.push_back(aura_channels[i]);
|
||||
|
||||
// Push new zone to zones vector
|
||||
zones.push_back(*new_zone);
|
||||
}
|
||||
}
|
||||
}
|
||||
28
RGBController/RGBController_Aura.h
Normal file
28
RGBController/RGBController_Aura.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_Aura.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| Asus Aura driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/13/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "AuraController.h"
|
||||
|
||||
class RGBController_Aura : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_Aura(AuraController* aura_ptr);
|
||||
int GetMode();
|
||||
void SetMode(int mode);
|
||||
void SetCustomMode();
|
||||
void SetAllLEDs(RGBColor color);
|
||||
void SetAllZoneLEDs(int zone, RGBColor color);
|
||||
void SetLED(int led, RGBColor color);
|
||||
|
||||
private:
|
||||
AuraController* aura;
|
||||
};
|
||||
101
RGBController/RGBController_Corsair.cpp
Normal file
101
RGBController/RGBController_Corsair.cpp
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_Corsair.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| Corsair Vengeance RGB driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/13/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_Corsair.h"
|
||||
|
||||
int RGBController_Corsair::GetMode()
|
||||
{
|
||||
return(CORSAIR_VENGEANCE_RGB_MODE_SINGLE);
|
||||
}
|
||||
|
||||
void RGBController_Corsair::SetMode(int mode)
|
||||
{
|
||||
corsair->SetMode(mode);
|
||||
}
|
||||
|
||||
void RGBController_Corsair::SetCustomMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_Corsair::SetAllLEDs(RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
corsair->SetAllColors(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_Corsair::SetAllZoneLEDs(int zone, RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
for (int x = 0; x < zones[zone].map.size(); x++)
|
||||
{
|
||||
for (int y = 0; y < zones[zone].map[x].size(); y++)
|
||||
{
|
||||
corsair->SetLEDColor(zones[zone].map[x][y], red, grn, blu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_Corsair::SetLED(int led, RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
corsair->SetLEDColor(led, red, grn, blu);
|
||||
}
|
||||
|
||||
RGBController_Corsair::RGBController_Corsair(CorsairController* corsair_ptr)
|
||||
{
|
||||
corsair = corsair_ptr;
|
||||
|
||||
name = corsair->GetDeviceName();
|
||||
|
||||
mode corsair_modes[CORSAIR_NUMBER_MODES];
|
||||
|
||||
corsair_modes[0].name = "Static";
|
||||
corsair_modes[1].name = "Fade";
|
||||
corsair_modes[2].name = "Pulse";
|
||||
|
||||
for (int i = 0; i < CORSAIR_NUMBER_MODES; i++)
|
||||
{
|
||||
modes.push_back(corsair_modes[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < corsair->GetLEDCount(); i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
|
||||
new_led->name = "Corsair LED";
|
||||
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone new_zone;
|
||||
|
||||
new_zone.name = "Corsair Zone";
|
||||
new_zone.type = ZONE_TYPE_SINGLE;
|
||||
|
||||
std::vector<int> zone_row;
|
||||
|
||||
for (int i = 0; i < corsair->GetLEDCount(); i++)
|
||||
{
|
||||
zone_row.push_back(i);
|
||||
}
|
||||
|
||||
new_zone.map.push_back(zone_row);
|
||||
|
||||
zones.push_back(new_zone);
|
||||
}
|
||||
28
RGBController/RGBController_Corsair.h
Normal file
28
RGBController/RGBController_Corsair.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_Corsair.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| Corsair Vengeance RGB driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/13/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "CorsairController.h"
|
||||
|
||||
class RGBController_Corsair : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_Corsair(CorsairController* corsair_ptr);
|
||||
int GetMode();
|
||||
void SetMode(int mode);
|
||||
void SetCustomMode();
|
||||
void SetAllLEDs(RGBColor color);
|
||||
void SetAllZoneLEDs(int zone, RGBColor color);
|
||||
void SetLED(int led, RGBColor color);
|
||||
|
||||
private:
|
||||
CorsairController* corsair;
|
||||
};
|
||||
144
RGBController/RGBController_CorsairPro.cpp
Normal file
144
RGBController/RGBController_CorsairPro.cpp
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairPro.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| Corsair Vengeance Pro RGB driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/30/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_CorsairPro.h"
|
||||
|
||||
int RGBController_CorsairPro::GetMode()
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
void RGBController_CorsairPro::SetMode(int mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case 0:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_COLOR_SHIFT);
|
||||
break;
|
||||
case 1:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_COLOR_PULSE);
|
||||
break;
|
||||
case 2:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_RAINBOW_WAVE);
|
||||
break;
|
||||
case 3:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_COLOR_WAVE);
|
||||
break;
|
||||
case 4:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_VISOR);
|
||||
break;
|
||||
case 5:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_RAIN);
|
||||
break;
|
||||
case 6:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_MARQUEE);
|
||||
break;
|
||||
case 7:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_RAINBOW);
|
||||
break;
|
||||
case 8:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_SEQUENTIAL);
|
||||
break;
|
||||
case 9:
|
||||
corsair->SetEffect(CORSAIR_PRO_MODE_STATIC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_CorsairPro::SetCustomMode()
|
||||
{
|
||||
corsair->SetCustom();
|
||||
}
|
||||
|
||||
void RGBController_CorsairPro::SetAllLEDs(RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
corsair->SetAllColors(red, grn, blu);
|
||||
corsair->ApplyColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairPro::SetAllZoneLEDs(int zone, RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
for (int x = 0; x < zones[zone].map.size(); x++)
|
||||
{
|
||||
for (int y = 0; y < zones[zone].map[x].size(); y++)
|
||||
{
|
||||
corsair->SetLEDColor(zones[zone].map[x][y], red, grn, blu);
|
||||
}
|
||||
}
|
||||
|
||||
corsair->ApplyColors();
|
||||
}
|
||||
|
||||
void RGBController_CorsairPro::SetLED(int led, RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
corsair->SetLEDColor(led, red, grn, blu);
|
||||
corsair->ApplyColors();
|
||||
}
|
||||
|
||||
RGBController_CorsairPro::RGBController_CorsairPro(CorsairProController* corsair_ptr)
|
||||
{
|
||||
corsair = corsair_ptr;
|
||||
|
||||
name = corsair->GetDeviceName();
|
||||
|
||||
mode corsair_modes[CORSAIR_PRO_NUMBER_MODES];
|
||||
|
||||
corsair_modes[0].name = "Color Shift";
|
||||
corsair_modes[1].name = "Color Pulse";
|
||||
corsair_modes[2].name = "Rainbow Wave";
|
||||
corsair_modes[3].name = "Color Wave";
|
||||
corsair_modes[4].name = "Visor";
|
||||
corsair_modes[5].name = "Rain";
|
||||
corsair_modes[6].name = "Marquee";
|
||||
corsair_modes[7].name = "Rainbow";
|
||||
corsair_modes[8].name = "Sequential";
|
||||
corsair_modes[9].name = "Static";
|
||||
|
||||
for (int i = 0; i < CORSAIR_PRO_NUMBER_MODES; i++)
|
||||
{
|
||||
modes.push_back(corsair_modes[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < corsair->GetLEDCount(); i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
|
||||
new_led->name = "Corsair Pro LED";
|
||||
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone new_zone;
|
||||
|
||||
new_zone.name = "Corsair Pro Zone";
|
||||
new_zone.type = ZONE_TYPE_LINEAR;
|
||||
|
||||
std::vector<int> zone_row;
|
||||
|
||||
for (int i = 0; i < corsair->GetLEDCount(); i++)
|
||||
{
|
||||
zone_row.push_back(i);
|
||||
}
|
||||
|
||||
new_zone.map.push_back(zone_row);
|
||||
|
||||
zones.push_back(new_zone);
|
||||
}
|
||||
28
RGBController/RGBController_CorsairPro.h
Normal file
28
RGBController/RGBController_CorsairPro.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_CorsairPro.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| Corsair Vengeance Pro RGB driver |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/30/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "CorsairProController.h"
|
||||
|
||||
class RGBController_CorsairPro : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_CorsairPro(CorsairProController* corsair_ptr);
|
||||
int GetMode();
|
||||
void SetMode(int mode);
|
||||
void SetCustomMode();
|
||||
void SetAllLEDs(RGBColor color);
|
||||
void SetAllZoneLEDs(int zone, RGBColor color);
|
||||
void SetLED(int led, RGBColor color);
|
||||
|
||||
private:
|
||||
CorsairProController* corsair;
|
||||
};
|
||||
106
RGBController/RGBController_HyperX.cpp
Normal file
106
RGBController/RGBController_HyperX.cpp
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_HyperX.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| HyperX Predator RGB interface |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/29/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_HyperX.h"
|
||||
|
||||
int RGBController_HyperX::GetMode()
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
void RGBController_HyperX::SetMode(int mode)
|
||||
{
|
||||
hyperx->SetMode(mode);
|
||||
}
|
||||
|
||||
void RGBController_HyperX::SetCustomMode()
|
||||
{
|
||||
hyperx->SetMode(HYPERX_MODE_STATIC);
|
||||
}
|
||||
|
||||
void RGBController_HyperX::SetAllLEDs(RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
hyperx->SetAllColors(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_HyperX::SetAllZoneLEDs(int zone, RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
for (int x = 0; x < zones[zone].map.size(); x++)
|
||||
{
|
||||
for (int y = 0; y < zones[zone].map[x].size(); y++)
|
||||
{
|
||||
hyperx->SetLEDColor(zones[zone].map[x][y], red, grn, blu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_HyperX::SetLED(int led, RGBColor color)
|
||||
{
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
unsigned char blu = RGBGetBValue(color);
|
||||
|
||||
hyperx->SetLEDColor(led, red, grn, blu);
|
||||
}
|
||||
|
||||
RGBController_HyperX::RGBController_HyperX(HyperXController* hyperx_ptr)
|
||||
{
|
||||
hyperx = hyperx_ptr;
|
||||
|
||||
name = hyperx->GetDeviceName();
|
||||
|
||||
mode hyperx_modes[HYPERX_NUMBER_MODES];
|
||||
|
||||
hyperx_modes[0].name = "Static";
|
||||
hyperx_modes[1].name = "Rainbow";
|
||||
hyperx_modes[2].name = "Comet";
|
||||
hyperx_modes[3].name = "Heartbeat";
|
||||
hyperx_modes[4].name = "Spectrum Cycle";
|
||||
hyperx_modes[5].name = "Breathing";
|
||||
hyperx_modes[6].name = "Bounce";
|
||||
hyperx_modes[7].name = "Blink";
|
||||
|
||||
for (int i = 0; i < HYPERX_NUMBER_MODES; i++)
|
||||
{
|
||||
modes.push_back(hyperx_modes[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < hyperx->GetLEDCount(); i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
|
||||
new_led->name = "HyperX LED";
|
||||
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone new_zone;
|
||||
|
||||
new_zone.name = "HyperX Zone";
|
||||
new_zone.type = ZONE_TYPE_SINGLE;
|
||||
|
||||
std::vector<int> zone_row;
|
||||
|
||||
for (int i = 0; i < hyperx->GetLEDCount(); i++)
|
||||
{
|
||||
zone_row.push_back(i);
|
||||
}
|
||||
|
||||
new_zone.map.push_back(zone_row);
|
||||
|
||||
zones.push_back(new_zone);
|
||||
}
|
||||
28
RGBController/RGBController_HyperX.h
Normal file
28
RGBController/RGBController_HyperX.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_HyperX.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| HyperX Predator RGB interface |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/29/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "HyperXController.h"
|
||||
|
||||
class RGBController_HyperX : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_HyperX(HyperXController* hyperx_ptr);
|
||||
int GetMode();
|
||||
void SetMode(int mode);
|
||||
void SetCustomMode();
|
||||
void SetAllLEDs(RGBColor color);
|
||||
void SetAllZoneLEDs(int zone, RGBColor color);
|
||||
void SetLED(int led, RGBColor color);
|
||||
|
||||
private:
|
||||
HyperXController* hyperx;
|
||||
};
|
||||
82
RGBController/RGBController_LEDStrip.cpp
Normal file
82
RGBController/RGBController_LEDStrip.cpp
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_LEDStrip.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| KeyboardVisualizer LED strip interface |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/20/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_LEDStrip.h"
|
||||
|
||||
|
||||
RGBController_LEDStrip::RGBController_LEDStrip(LEDStripController* ledstrip_ptr)
|
||||
{
|
||||
strip = ledstrip_ptr;
|
||||
|
||||
name = "LED Strip";
|
||||
|
||||
mode led_mode;
|
||||
led_mode.name = "Custom";
|
||||
modes.push_back(led_mode);
|
||||
|
||||
for (int i = 0; i < strip->num_leds; i++)
|
||||
{
|
||||
colors.push_back(0x00000000);
|
||||
led new_led;
|
||||
new_led.name = "LED Strip";
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
zone led_zone;
|
||||
led_zone.name = "LED Strip";
|
||||
std::vector<int> led_zone_map;
|
||||
for (int i = 0; i < strip->num_leds; i++)
|
||||
{
|
||||
led_zone_map.push_back(i);
|
||||
}
|
||||
led_zone.map.push_back(led_zone_map);
|
||||
zones.push_back(led_zone);
|
||||
}
|
||||
|
||||
int RGBController_LEDStrip::GetMode()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RGBController_LEDStrip::SetMode(int mode)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_LEDStrip::SetCustomMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_LEDStrip::SetAllLEDs(RGBColor color)
|
||||
{
|
||||
for (int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
colors[i] = color;
|
||||
}
|
||||
|
||||
strip->SetLEDs(colors);
|
||||
}
|
||||
|
||||
void RGBController_LEDStrip::SetAllZoneLEDs(int zone, RGBColor color)
|
||||
{
|
||||
for (int i = 0; i < colors.size(); i++)
|
||||
{
|
||||
colors[i] = color;
|
||||
}
|
||||
|
||||
strip->SetLEDs(colors);
|
||||
}
|
||||
|
||||
void RGBController_LEDStrip::SetLED(int led, RGBColor color)
|
||||
{
|
||||
colors[led] = color;
|
||||
|
||||
strip->SetLEDs(colors);
|
||||
}
|
||||
29
RGBController/RGBController_LEDStrip.h
Normal file
29
RGBController/RGBController_LEDStrip.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_LEDStrip.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenAuraSDK |
|
||||
| KeyboardVisualizer LED strip interface |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/20/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
#include "RGBController.h"
|
||||
#include "serial_port.h"
|
||||
#include "LEDStripController.h"
|
||||
|
||||
class RGBController_LEDStrip : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_LEDStrip(LEDStripController* ledstrip_ptr);
|
||||
int GetMode();
|
||||
void SetMode(int mode);
|
||||
void SetCustomMode();
|
||||
void SetAllLEDs(RGBColor color);
|
||||
void SetAllZoneLEDs(int zone, RGBColor color);
|
||||
void SetLED(int led, RGBColor color);
|
||||
|
||||
private:
|
||||
std::vector<RGBColor> colors;
|
||||
LEDStripController* strip;
|
||||
};
|
||||
732
RGBController/RGBController_OpenRazer.cpp
Normal file
732
RGBController/RGBController_OpenRazer.cpp
Normal file
|
|
@ -0,0 +1,732 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_OpenRazer.cpp |
|
||||
| |
|
||||
| Generic RGB Interface for OpenRazer |
|
||||
| kernel drivers for Chroma peripherals |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/15/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include "RGBController_OpenRazer.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
int RGBController_OpenRazer::GetMode()
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::SetMode(int mode)
|
||||
{
|
||||
char update_value = 1;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case RAZER_TYPE_MATRIX_FRAME:
|
||||
case RAZER_TYPE_MATRIX_NOFRAME:
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case RAZER_MODE_CUSTOM:
|
||||
matrix_effect_custom.write(&update_value, 1);
|
||||
matrix_effect_custom.flush();
|
||||
break;
|
||||
|
||||
case RAZER_MODE_OFF:
|
||||
matrix_effect_none.write(&update_value, 1);
|
||||
matrix_effect_none.flush();
|
||||
break;
|
||||
|
||||
case RAZER_MODE_STATIC:
|
||||
break;
|
||||
|
||||
case RAZER_MODE_BREATHING:
|
||||
break;
|
||||
|
||||
case RAZER_MODE_SPECTRUM_CYCLE:
|
||||
matrix_effect_spectrum.write(&update_value, 1);
|
||||
matrix_effect_spectrum.flush();
|
||||
break;
|
||||
|
||||
case RAZER_MODE_WAVE:
|
||||
matrix_effect_wave.write(&update_value, 1);
|
||||
matrix_effect_wave.flush();
|
||||
break;
|
||||
|
||||
case RAZER_MODE_REACTIVE:
|
||||
matrix_effect_reactive.write(&update_value, 1);
|
||||
matrix_effect_reactive.flush();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_TYPE_NOMATRIX:
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case RAZER_MODE_CUSTOM:
|
||||
update_value = 0;
|
||||
logo_led_effect.write(&update_value, 1);
|
||||
scroll_led_effect.write(&update_value, 1);
|
||||
logo_led_effect.flush();
|
||||
scroll_led_effect.flush();
|
||||
break;
|
||||
|
||||
case RAZER_MODE_SPECTRUM_CYCLE:
|
||||
update_value = '4';
|
||||
logo_led_effect.write(&update_value, 1);
|
||||
scroll_led_effect.write(&update_value, 1);
|
||||
logo_led_effect.flush();
|
||||
scroll_led_effect.flush();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::SetCustomMode()
|
||||
{
|
||||
SetMode(RAZER_MODE_CUSTOM);
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::Output()
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case RAZER_TYPE_MATRIX_FRAME:
|
||||
case RAZER_TYPE_MATRIX_NOFRAME:
|
||||
{
|
||||
unsigned int output_array_size;
|
||||
unsigned int output_offset;
|
||||
|
||||
if(type == RAZER_TYPE_MATRIX_NOFRAME)
|
||||
{
|
||||
output_array_size = 3;
|
||||
output_offset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
output_array_size = 3 + (color_buffer.size() * 3);
|
||||
output_offset = 3;
|
||||
}
|
||||
|
||||
char output_array[output_array_size];
|
||||
char update_value = 1;
|
||||
|
||||
if(type != RAZER_TYPE_MATRIX_NOFRAME)
|
||||
{
|
||||
output_array[0] = 0;
|
||||
output_array[1] = 0;
|
||||
output_array[2] = color_buffer.size() - 1;
|
||||
}
|
||||
|
||||
for(int i = 0; i < color_buffer.size(); i++)
|
||||
{
|
||||
output_array[(i * 3) + 0 + output_offset] = (char)RGBGetRValue(color_buffer[i]);
|
||||
output_array[(i * 3) + 1 + output_offset] = (char)RGBGetGValue(color_buffer[i]);
|
||||
output_array[(i * 3) + 2 + output_offset] = (char)RGBGetBValue(color_buffer[i]);
|
||||
}
|
||||
|
||||
if(type == RAZER_TYPE_MATRIX_NOFRAME)
|
||||
{
|
||||
matrix_effect_custom.write(output_array, output_array_size);
|
||||
matrix_effect_custom.flush();
|
||||
}
|
||||
else
|
||||
{
|
||||
matrix_custom_frame.write(output_array, output_array_size);
|
||||
matrix_custom_frame.flush();
|
||||
matrix_effect_custom.write(&update_value, 1);
|
||||
matrix_effect_custom.flush();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_TYPE_NOMATRIX:
|
||||
{
|
||||
unsigned int output_array_size = 3;
|
||||
char output_array[output_array_size];
|
||||
char update_value = 0;
|
||||
|
||||
output_array[0] = (char)RGBGetRValue(color_buffer[0]);
|
||||
output_array[1] = (char)RGBGetGValue(color_buffer[0]);
|
||||
output_array[2] = (char)RGBGetBValue(color_buffer[0]);
|
||||
logo_led_rgb.write(output_array, output_array_size);
|
||||
|
||||
output_array[0] = (char)RGBGetRValue(color_buffer[1]);
|
||||
output_array[1] = (char)RGBGetGValue(color_buffer[1]);
|
||||
output_array[2] = (char)RGBGetBValue(color_buffer[1]);
|
||||
scroll_led_rgb.write(output_array, output_array_size);
|
||||
|
||||
logo_led_rgb.flush();
|
||||
scroll_led_rgb.flush();
|
||||
|
||||
logo_led_effect.write(&update_value, 1);
|
||||
scroll_led_effect.write(&update_value, 1);
|
||||
logo_led_effect.flush();
|
||||
scroll_led_effect.flush();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::SetAllLEDs(RGBColor color)
|
||||
{
|
||||
for(int i = 0; i < color_buffer.size(); i++)
|
||||
{
|
||||
color_buffer[i] = color;
|
||||
}
|
||||
|
||||
Output();
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::SetAllZoneLEDs(int zone, RGBColor color)
|
||||
{
|
||||
for (int x = 0; x < zones[zone].map.size(); x++)
|
||||
{
|
||||
for (int y = 0; y < zones[zone].map[x].size(); y++)
|
||||
{
|
||||
color_buffer[zones[zone].map[x][y]] = color;
|
||||
}
|
||||
}
|
||||
|
||||
Output();
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::SetLED(int led, RGBColor color)
|
||||
{
|
||||
color_buffer[led] = color;
|
||||
|
||||
Output();
|
||||
}
|
||||
|
||||
static std::string GetDeviceTypeString(std::string dev_path)
|
||||
{
|
||||
// Read device_type for device name string
|
||||
std::string dev_type_path = dev_path + "/device_type";
|
||||
std::ifstream dev_type_file;
|
||||
std::string ret_str;
|
||||
|
||||
dev_type_file.open(dev_type_path);
|
||||
std::getline(dev_type_file, ret_str);
|
||||
dev_type_file.close();
|
||||
|
||||
return(ret_str);
|
||||
}
|
||||
|
||||
unsigned int RGBController_OpenRazer::GetTypeFromDeviceName(std::string dev_name)
|
||||
{
|
||||
if(dev_name == "Razer Mamba Tournament Edition")
|
||||
{
|
||||
return(RAZER_MAMBA_TOURNAMENT_EDITION_CHROMA);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer DeathAdder Chroma")
|
||||
{
|
||||
return(RAZER_DEATHADDER_CHROMA);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer Diamondback Chroma")
|
||||
{
|
||||
return(RAZER_DIAMONDBACK_CHROMA);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer DeathStalker Chroma")
|
||||
{
|
||||
return(RAZER_DEATHSTALKER_CHROMA);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer Tartarus Chroma")
|
||||
{
|
||||
return(RAZER_TARTARUS_CHROMA);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer Core")
|
||||
{
|
||||
return(RAZER_CORE);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer Firefly")
|
||||
{
|
||||
return(RAZER_FIREFLY_CHROMA);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer Goliathus Extended")
|
||||
{
|
||||
return(RAZER_GOLIATHUS_EXTENDED_CHROMA);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer Chroma Mug Holder")
|
||||
{
|
||||
return(RAZER_MUG_HOLDER);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer Kraken 7.1 Chroma")
|
||||
{
|
||||
return(RAZER_KRAKEN_V1);
|
||||
}
|
||||
|
||||
else if(dev_name == "Razer Kraken 7.1 V2")
|
||||
{
|
||||
return(RAZER_KRAKEN_V2);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return(RAZER_NO_DEVICE);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::SetupMatrixDevice(std::string dev_path)
|
||||
{
|
||||
matrix_custom_frame.open(dev_path + "/matrix_custom_frame");
|
||||
matrix_effect_custom.open(dev_path + "/matrix_effect_custom");
|
||||
matrix_effect_breath.open(dev_path + "/matrix_effect_breath");
|
||||
matrix_effect_none.open(dev_path + "/matrix_effect_none");
|
||||
matrix_effect_reactive.open(dev_path + "/matrix_effect_reactive");
|
||||
matrix_effect_spectrum.open(dev_path + "/matrix_effect_spectrum");
|
||||
matrix_effect_static.open(dev_path + "/matrix_effect_static");
|
||||
matrix_effect_wave.open(dev_path + "/matrix_effect_wave");
|
||||
|
||||
if(!matrix_custom_frame)
|
||||
{
|
||||
type = RAZER_TYPE_MATRIX_NOFRAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
type = RAZER_TYPE_MATRIX_FRAME;
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_OpenRazer::SetupNonMatrixDevice(std::string dev_path)
|
||||
{
|
||||
logo_led_effect.open(dev_path + "/logo_led_effect");
|
||||
logo_led_rgb.open(dev_path + "/logo_led_rgb");
|
||||
scroll_led_effect.open(dev_path + "/scroll_led_effect");
|
||||
scroll_led_rgb.open(dev_path + "/scroll_led_rgb");
|
||||
|
||||
type = RAZER_TYPE_NOMATRIX;
|
||||
}
|
||||
|
||||
RGBController_OpenRazer::RGBController_OpenRazer(std::string dev_path)
|
||||
{
|
||||
name = GetDeviceTypeString(dev_path);
|
||||
|
||||
device = GetTypeFromDeviceName(name);
|
||||
|
||||
mode razer_modes[RAZER_NUM_MODES];
|
||||
|
||||
razer_modes[0].name = "Custom";
|
||||
razer_modes[1].name = "Off";
|
||||
razer_modes[2].name = "Static";
|
||||
razer_modes[3].name = "Breathing";
|
||||
razer_modes[4].name = "Spectrum Cycle";
|
||||
razer_modes[5].name = "Wave";
|
||||
razer_modes[6].name = "Reactive";
|
||||
|
||||
for (int i = 0; i < RAZER_NUM_MODES; i++)
|
||||
{
|
||||
modes.push_back(razer_modes[i]);
|
||||
}
|
||||
|
||||
switch(device)
|
||||
{
|
||||
case RAZER_MAMBA_TOURNAMENT_EDITION_CHROMA:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Left Strip";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
for (int i = 7; i < 14; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Right Strip";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Logo";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Mouse Wheel";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone left_zone;
|
||||
left_zone.name = "Left Strip";
|
||||
left_zone.type = ZONE_TYPE_LINEAR;
|
||||
std::vector<int> left_zone_map;
|
||||
for(int i = 0; i < 7; i++)
|
||||
{
|
||||
left_zone_map.push_back(i);
|
||||
}
|
||||
left_zone.map.push_back(left_zone_map);
|
||||
zones.push_back(left_zone);
|
||||
|
||||
zone right_zone;
|
||||
right_zone.name = "Right Strip";
|
||||
right_zone.type = ZONE_TYPE_LINEAR;
|
||||
std::vector<int> right_zone_map;
|
||||
for(int i = 7; i < 14; i++)
|
||||
{
|
||||
right_zone_map.push_back(i);
|
||||
}
|
||||
right_zone.map.push_back(right_zone_map);
|
||||
zones.push_back(right_zone);
|
||||
|
||||
zone logo_zone;
|
||||
logo_zone.name = "Logo";
|
||||
logo_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> logo_zone_map;
|
||||
logo_zone_map.push_back(14);
|
||||
logo_zone.map.push_back(logo_zone_map);
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
zone wheel_zone;
|
||||
wheel_zone.name = "Mouse Wheel";
|
||||
wheel_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> wheel_zone_map;
|
||||
wheel_zone_map.push_back(15);
|
||||
wheel_zone.map.push_back(wheel_zone_map);
|
||||
zones.push_back(wheel_zone);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_DIAMONDBACK_CHROMA:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for (int i = 0; i < 21; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Left Strip";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
for (int i = 7; i < 19; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Right Strip";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Logo";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Mouse Wheel";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone left_zone;
|
||||
left_zone.name = "Left Strip";
|
||||
left_zone.type = ZONE_TYPE_LINEAR;
|
||||
std::vector<int> left_zone_map;
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
left_zone_map.push_back(i);
|
||||
}
|
||||
left_zone.map.push_back(left_zone_map);
|
||||
zones.push_back(left_zone);
|
||||
|
||||
zone right_zone;
|
||||
right_zone.name = "Right Strip";
|
||||
right_zone.type = ZONE_TYPE_LINEAR;
|
||||
std::vector<int> right_zone_map;
|
||||
for(int i = 7; i < 19; i++)
|
||||
{
|
||||
right_zone_map.push_back(i);
|
||||
}
|
||||
right_zone.map.push_back(right_zone_map);
|
||||
zones.push_back(right_zone);
|
||||
|
||||
zone logo_zone;
|
||||
logo_zone.name = "Logo";
|
||||
logo_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> logo_zone_map;
|
||||
logo_zone_map.push_back(19);
|
||||
logo_zone.map.push_back(logo_zone_map);
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
zone wheel_zone;
|
||||
wheel_zone.name = "Mouse Wheel";
|
||||
wheel_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> wheel_zone_map;
|
||||
wheel_zone_map.push_back(20);
|
||||
wheel_zone.map.push_back(wheel_zone_map);
|
||||
zones.push_back(wheel_zone);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_DEATHADDER_CHROMA:
|
||||
{
|
||||
SetupNonMatrixDevice(dev_path);
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Logo";
|
||||
leds.push_back(logo_led);
|
||||
|
||||
led wheel_led;
|
||||
wheel_led.name = "Mouse Wheel";
|
||||
leds.push_back(wheel_led);
|
||||
|
||||
zone logo_zone;
|
||||
logo_zone.name = "Logo";
|
||||
logo_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> logo_zone_map;
|
||||
logo_zone_map.push_back(0);
|
||||
logo_zone.map.push_back(logo_zone_map);
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
zone wheel_zone;
|
||||
wheel_zone.name = "Mouse Wheel";
|
||||
wheel_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> wheel_zone_map;
|
||||
wheel_zone_map.push_back(1);
|
||||
wheel_zone.map.push_back(wheel_zone_map);
|
||||
zones.push_back(wheel_zone);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_DEATHSTALKER_CHROMA:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 12; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "Keyboard";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone keyboard_zone;
|
||||
keyboard_zone.name = "Keyboard";
|
||||
keyboard_zone.type = ZONE_TYPE_LINEAR;
|
||||
std::vector<int> keyboard_zone_map;
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
keyboard_zone_map.push_back(i);
|
||||
}
|
||||
keyboard_zone.map.push_back(keyboard_zone_map);
|
||||
zones.push_back(keyboard_zone);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_TARTARUS_CHROMA:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Keypad";
|
||||
leds.push_back(logo_led);
|
||||
|
||||
zone logo_zone;
|
||||
logo_zone.name = "Keypad";
|
||||
logo_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> logo_zone_map;
|
||||
logo_zone_map.push_back(0);
|
||||
logo_zone.map.push_back(logo_zone_map);
|
||||
zones.push_back(logo_zone);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_CORE:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "GPU Lighting";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "LED Strip";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone zone_1;
|
||||
zone_1.name = "GPU Lighting";
|
||||
zone_1.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> zone_1_map;
|
||||
for(int i = 0; i < 1; i++)
|
||||
{
|
||||
zone_1_map.push_back(i);
|
||||
}
|
||||
zone_1.map.push_back(zone_1_map);
|
||||
zones.push_back(zone_1);
|
||||
|
||||
zone zone_2;
|
||||
zone_2.name = "LED Strip";
|
||||
zone_2.type = ZONE_TYPE_LINEAR;
|
||||
std::vector<int> zone_2_map;
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
zone_2_map.push_back(i);
|
||||
}
|
||||
zone_2.map.push_back(zone_2_map);
|
||||
zones.push_back(zone_2);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_FIREFLY_CHROMA:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for(int i = 0; i < 15; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "LED Strip";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone zone_1;
|
||||
zone_1.name = "LED Strip";
|
||||
zone_1.type = ZONE_TYPE_LINEAR;
|
||||
std::vector<int> zone_1_map;
|
||||
for(int i = 0; i < 15; i++)
|
||||
{
|
||||
zone_1_map.push_back(i);
|
||||
}
|
||||
zone_1.map.push_back(zone_1_map);
|
||||
zones.push_back(zone_1);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_GOLIATHUS_EXTENDED_CHROMA:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Logo";
|
||||
leds.push_back(logo_led);
|
||||
|
||||
zone logo_zone;
|
||||
logo_zone.name = "Logo";
|
||||
logo_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> logo_zone_map;
|
||||
logo_zone_map.push_back(0);
|
||||
logo_zone.map.push_back(logo_zone_map);
|
||||
zones.push_back(logo_zone);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_MUG_HOLDER:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for(int i = 0; i < 15; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
led* new_led = new led();
|
||||
new_led->name = "LED Strip";
|
||||
leds.push_back(*new_led);
|
||||
}
|
||||
|
||||
zone keyboard_zone;
|
||||
keyboard_zone.name = "LED Strip";
|
||||
keyboard_zone.type = ZONE_TYPE_LINEAR;
|
||||
std::vector<int> keyboard_zone_map;
|
||||
for(int i = 0; i < 15; i++)
|
||||
{
|
||||
keyboard_zone_map.push_back(i);
|
||||
}
|
||||
keyboard_zone.map.push_back(keyboard_zone_map);
|
||||
zones.push_back(keyboard_zone);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAZER_KRAKEN_V1:
|
||||
case RAZER_KRAKEN_V2:
|
||||
{
|
||||
SetupMatrixDevice(dev_path);
|
||||
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
RGBColor new_color = 0x00000000;
|
||||
color_buffer.push_back(new_color);
|
||||
}
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Logo";
|
||||
leds.push_back(logo_led);
|
||||
|
||||
zone logo_zone;
|
||||
logo_zone.name = "Logo";
|
||||
logo_zone.type = ZONE_TYPE_SINGLE;
|
||||
std::vector<int> logo_zone_map;
|
||||
logo_zone_map.push_back(0);
|
||||
logo_zone.map.push_back(logo_zone_map);
|
||||
zones.push_back(logo_zone);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
97
RGBController/RGBController_OpenRazer.h
Normal file
97
RGBController/RGBController_OpenRazer.h
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*-----------------------------------------*\
|
||||
| RGBController_OpenRazer.h |
|
||||
| |
|
||||
| Generic RGB Interface for OpenRazer |
|
||||
| kernel drivers for Chroma peripherals |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 6/15/2019 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include <fstream>
|
||||
|
||||
class RGBController_OpenRazer : public RGBController
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
RAZER_NO_DEVICE,
|
||||
RAZER_BLACKWIDOW_CHROMA,
|
||||
RAZER_DEATHSTALKER_CHROMA,
|
||||
RAZER_ORNATA_CHROMA,
|
||||
RAZER_BLADE_STEALTH,
|
||||
RAZER_BLADE_PRO,
|
||||
RAZER_TARTARUS_CHROMA,
|
||||
RAZER_DEATHADDER_CHROMA,
|
||||
RAZER_DEATHADDER_ELITE,
|
||||
RAZER_NAGA_CHROMA,
|
||||
RAZER_DIAMONDBACK_CHROMA,
|
||||
RAZER_MAMBA_TOURNAMENT_EDITION_CHROMA,
|
||||
RAZER_FIREFLY_CHROMA,
|
||||
RAZER_GOLIATHUS_EXTENDED_CHROMA,
|
||||
RAZER_MUG_HOLDER,
|
||||
RAZER_CORE,
|
||||
RAZER_KRAKEN_V1,
|
||||
RAZER_KRAKEN_V2,
|
||||
RAZER_NUM_DEVICES
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
RAZER_MODE_CUSTOM,
|
||||
RAZER_MODE_OFF,
|
||||
RAZER_MODE_STATIC,
|
||||
RAZER_MODE_BREATHING,
|
||||
RAZER_MODE_SPECTRUM_CYCLE,
|
||||
RAZER_MODE_WAVE,
|
||||
RAZER_MODE_REACTIVE,
|
||||
RAZER_NUM_MODES
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
RAZER_TYPE_MATRIX_FRAME,
|
||||
RAZER_TYPE_MATRIX_NOFRAME,
|
||||
RAZER_TYPE_NOMATRIX,
|
||||
RAZER_NUM_TYPES
|
||||
};
|
||||
|
||||
public:
|
||||
RGBController_OpenRazer(std::string dev_path);
|
||||
int GetMode();
|
||||
void SetMode(int mode);
|
||||
void SetCustomMode();
|
||||
void SetAllLEDs(RGBColor color);
|
||||
void SetAllZoneLEDs(int zone, RGBColor color);
|
||||
void SetLED(int led, RGBColor color);
|
||||
|
||||
unsigned int device;
|
||||
|
||||
private:
|
||||
std::vector<RGBColor> color_buffer;
|
||||
|
||||
void SetupMatrixDevice(std::string dev_path);
|
||||
void SetupNonMatrixDevice(std::string dev_path);
|
||||
unsigned int GetTypeFromDeviceName(std::string dev_name);
|
||||
void Output();
|
||||
|
||||
unsigned int type;
|
||||
|
||||
//OpenRazer Sysfs Entries for Matrix Devices
|
||||
std::ofstream matrix_custom_frame;
|
||||
std::ofstream matrix_effect_custom;
|
||||
std::ofstream matrix_effect_breath;
|
||||
std::ofstream matrix_effect_none;
|
||||
std::ofstream matrix_effect_reactive;
|
||||
std::ofstream matrix_effect_spectrum;
|
||||
std::ofstream matrix_effect_static;
|
||||
std::ofstream matrix_effect_wave;
|
||||
|
||||
//OpenRazer Sysfs Entries for Non-Matrix Devices
|
||||
std::ofstream logo_led_effect;
|
||||
std::ofstream logo_led_rgb;
|
||||
std::ofstream scroll_led_effect;
|
||||
std::ofstream scroll_led_rgb;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue