Compare commits
123
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd31956aaa | ||
|
|
c3bd47fe60 | ||
|
|
c6fe1e7023 | ||
|
|
407c304eab | ||
|
|
7c87d97889 | ||
|
|
6f3a6f1404 | ||
|
|
775e47774e | ||
|
|
1dc9b2ed53 | ||
|
|
0a494f6a12 | ||
|
|
5177acb4e7 | ||
|
|
fe1b5a7256 | ||
|
|
00e2b92ab6 | ||
|
|
4319150412 | ||
|
|
6dcddd2f8a | ||
|
|
30a1c332d3 | ||
|
|
c9cd346713 | ||
|
|
59051c7524 | ||
|
|
5e9469fe82 | ||
|
|
055b937ff7 | ||
|
|
0a95989edb | ||
|
|
ef3e48884d | ||
|
|
0f637c30e5 | ||
|
|
82d40f2d97 | ||
|
|
df6a498885 | ||
|
|
b252fe8629 | ||
|
|
c837fa2b7e | ||
|
|
41749dce59 | ||
|
|
08fbd285dc | ||
|
|
af7e3e150c | ||
|
|
bb9a3e8730 | ||
|
|
c69f7fdf57 | ||
|
|
aba88f1fe2 | ||
|
|
54a07077e1 | ||
|
|
0e288f3670 | ||
|
|
cf990ece4e | ||
|
|
ee52d2a7b0 | ||
|
|
a884aca165 | ||
|
|
464a590865 | ||
|
|
98767252e6 | ||
|
|
cbead40b32 | ||
|
|
b4be3b1a88 | ||
|
|
67c2e53221 | ||
|
|
4b90142d84 | ||
|
|
e3408ee9d0 | ||
|
|
643bfa880f | ||
|
|
f370eb79b4 | ||
|
|
0e45370b76 | ||
|
|
73ef9f5fb2 | ||
|
|
95512d56f1 | ||
|
|
405869fefe | ||
|
|
526d0bd2ca | ||
|
|
1b5a1aa561 | ||
|
|
8bafba65fd | ||
|
|
b26e3f25fd | ||
|
|
9c8c57cc39 | ||
|
|
d358f1d2da | ||
|
|
f4cd06df38 | ||
|
|
15d2c30fa6 | ||
|
|
4f3eb52e18 | ||
|
|
4c52e4bfba | ||
|
|
d586324885 | ||
|
|
5dd0c18194 | ||
|
|
f6f3633ec0 | ||
|
|
985120903b | ||
|
|
614f95a30a | ||
|
|
f732f57a4c | ||
|
|
7b299d7d7f | ||
|
|
ab3edd6df5 | ||
|
|
e6d1c37306 | ||
|
|
b083537b36 | ||
|
|
0c431c8340 | ||
|
|
e606b57acd | ||
|
|
77c70776cb | ||
|
|
cf79a04f05 | ||
|
|
3dc1365d39 | ||
|
|
b03cd94ae8 | ||
|
|
bbf348d273 | ||
|
|
dce48eb415 | ||
|
|
decf14635d | ||
|
|
db4f49bbba | ||
|
|
26824fcb6e | ||
|
|
8afad91b33 | ||
|
|
69de0b13c4 | ||
|
|
967153bc10 | ||
|
|
971d9be1bd | ||
|
|
7a3faef886 | ||
|
|
f67030fcc7 | ||
|
|
7353e99449 | ||
|
|
91d9597c89 | ||
|
|
2eb569912b | ||
|
|
9410d9c066 | ||
|
|
29d8788e25 | ||
|
|
0304c50bc6 | ||
|
|
dd22150cfe | ||
|
|
07e7feca56 | ||
|
|
a93eec8f50 | ||
|
|
88bad762e5 | ||
|
|
18dfe6ca8b | ||
|
|
96dfa7009f | ||
|
|
92a9d8ad11 | ||
|
|
2ab9094b41 | ||
|
|
f6154ccbc4 | ||
|
|
0be01dde19 | ||
|
|
e113e91423 | ||
|
|
28c63b8b9d | ||
|
|
c5aac4c44f | ||
|
|
42e7f2a5c3 | ||
|
|
ae9ae18d31 | ||
|
|
f89cdac198 | ||
|
|
e8f345ff77 | ||
|
|
aff0610df9 | ||
|
|
9199d062d1 | ||
|
|
0ec4aaa629 | ||
|
|
9fca99b4ef | ||
|
|
14853895f3 | ||
|
|
d79a400c8c | ||
|
|
f741385e43 | ||
|
|
840bd92afb | ||
|
|
96e1fb0b10 | ||
|
|
388557e5f9 | ||
|
|
3f32817272 | ||
|
|
056b383536 | ||
|
|
0691f40588 |
+4
-16
@@ -536,10 +536,7 @@ before_script:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/opt/homebrew/bin/brew shellenv)
|
||||
- qmake OpenRGB.pro
|
||||
- make -j16
|
||||
- macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt6 arm
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_ARM64_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -555,10 +552,7 @@ before_script:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/opt/homebrew/bin/brew shellenv)
|
||||
- /opt/homebrew/opt/qt@5/bin/qmake OpenRGB.pro
|
||||
- make -j16
|
||||
- /opt/homebrew/opt/qt@5/bin/macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt5 arm
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Qt5_ARM64_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -574,10 +568,7 @@ before_script:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/usr/local/bin/brew shellenv)
|
||||
- arch -x86_64 /usr/local/bin/qmake OpenRGB.pro
|
||||
- arch -x86_64 make -j16
|
||||
- arch -x86_64 /usr/local/bin/macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt6 intel
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Intel_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -593,10 +584,7 @@ before_script:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/usr/local/bin/brew shellenv)
|
||||
- arch -x86_64 /usr/local/opt/qt@5/bin/qmake OpenRGB.pro
|
||||
- arch -x86_64 make -j16
|
||||
- arch -x86_64 /usr/local/opt/qt@5/bin/macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt5 intel
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Intel_Qt5_${CI_COMMIT_SHORT_SHA}"
|
||||
|
||||
@@ -69,3 +69,7 @@ OpenRGB is written in C++, uses the Qt framework for UI, and uses the QMake buil
|
||||
|
||||
Translation files are located in [`OpenRGB/qt/i18n/`](https://gitlab.com/CalcProgrammer1/OpenRGB/-/tree/master/qt/i18n), where languages are formatted using ISO 639-1 format: `OpenRGB_xx_XX.ts` — `xx_XX` representing the language code.
|
||||
In order to translate a file, you need to [fork](https://gitlab.com/CalcProgrammer1/OpenRGB/-/forks/new) the project, create a new file for your language with `lupdate` (or edit an exisiting one), edit the file with `qtlinguist`, commit, push, and create a merge request.
|
||||
|
||||
## AI Guidelines
|
||||
|
||||
OpenRGB is an open source project developed by humans for humans. As a general rule, AI generated submissions are not permitted. The licensing behind AI generated code is problematic. If you choose to use AI for assistance in your development process, we can't stop you, but do not credit the AI in commits (no AI authorship/co-authorship). Ultimately, you as a human developer are responsible for the code you submit and it is expected that any code you submit you fully understand and have manually vetted before submission. Merge requests that appear to be straight from an AI output, commits with AI tool authorship or co-authorship tags, or otherwise AI generated submissions are subject to closure.
|
||||
|
||||
@@ -205,7 +205,6 @@ void RGBController_BloodyB820R::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_index];
|
||||
new_led.value = led_index;
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,13 +67,13 @@ void BloodyMouseController::InitDevice()
|
||||
hid_send_feature_report(dev, buffer, BLOODYMOUSE_WRITE_PACKET_SIZE);
|
||||
}
|
||||
|
||||
void BloodyMouseController::SetLedsDirect(std::vector<RGBColor> colors)
|
||||
void BloodyMouseController::SetLedsDirect(std::vector<RGBColor> colors, std::vector<uint8_t> offsets)
|
||||
{
|
||||
uint8_t buffer[BLOODYMOUSE_WRITE_PACKET_SIZE] = { 0x07, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
for(uint8_t i = 0; i < colors.size(); i++)
|
||||
{
|
||||
uint8_t offset = 3 * (colors[i] >> 24) + BLOODYMOUSE_DATA_BYTE;
|
||||
uint8_t offset = 3 * (offsets[i]) + BLOODYMOUSE_DATA_BYTE;
|
||||
|
||||
buffer[offset] = RGBGetRValue(colors[i]);
|
||||
buffer[offset + 1] = RGBGetGValue(colors[i]);
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
std::string GetLocation();
|
||||
std::string GetName();
|
||||
|
||||
void SetLedsDirect(std::vector<RGBColor> colors);
|
||||
void SetLedsDirect(std::vector<RGBColor> colors, std::vector<uint8_t> offsets);
|
||||
|
||||
private:
|
||||
uint16_t pid;
|
||||
|
||||
@@ -142,7 +142,7 @@ void RGBController_BloodyMouse::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
|
||||
new_led.value = mz.zone_leds[lp_idx];
|
||||
offsets.push_back(mz.zone_leds[lp_idx]);
|
||||
|
||||
if(bool_single)
|
||||
{
|
||||
@@ -163,14 +163,7 @@ void RGBController_BloodyMouse::SetupZones()
|
||||
|
||||
void RGBController_BloodyMouse::DeviceUpdateLEDs()
|
||||
{
|
||||
std::vector<RGBColor> colour;
|
||||
for(size_t i = 0; i < colors.size(); i++)
|
||||
{
|
||||
RGBColor c = colors[i] | (leds[i].value << 24);
|
||||
colour.push_back(c);
|
||||
}
|
||||
|
||||
controller->SetLedsDirect(colour);
|
||||
controller->SetLedsDirect(colors, offsets);
|
||||
}
|
||||
|
||||
void RGBController_BloodyMouse::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
|
||||
@@ -39,4 +39,5 @@ public:
|
||||
|
||||
private:
|
||||
BloodyMouseController* controller;
|
||||
std::vector<uint8_t> offsets;
|
||||
};
|
||||
|
||||
@@ -186,7 +186,7 @@ void AMBXController::SetLEDColor(unsigned int led, RGBColor color)
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
||||
void AMBXController::SetLEDColors(unsigned int* leds, RGBColor* colors, unsigned int count)
|
||||
void AMBXController::SetLEDColors(const unsigned int* leds, RGBColor* colors, unsigned int count)
|
||||
{
|
||||
for(unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
bool IsInitialized();
|
||||
void SetLEDColor(unsigned int led, RGBColor color);
|
||||
void SetLEDColors(unsigned int* leds, RGBColor* colors, unsigned int count);
|
||||
void SetLEDColors(const unsigned int* leds, RGBColor* colors, unsigned int count);
|
||||
|
||||
private:
|
||||
libusb_context* usb_context;
|
||||
|
||||
@@ -9,6 +9,15 @@
|
||||
|
||||
#include "RGBController_AMBX.h"
|
||||
|
||||
static const unsigned int led_values[] =
|
||||
{
|
||||
AMBX_LIGHT_LEFT,
|
||||
AMBX_LIGHT_RIGHT,
|
||||
AMBX_LIGHT_WALL_LEFT,
|
||||
AMBX_LIGHT_WALL_CENTER,
|
||||
AMBX_LIGHT_WALL_RIGHT
|
||||
};
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Philips amBX
|
||||
@category Accessory
|
||||
@@ -71,27 +80,22 @@ void RGBController_AMBX::SetupZones()
|
||||
// Set up LEDs
|
||||
led left_light;
|
||||
left_light.name = "Left";
|
||||
left_light.value = AMBX_LIGHT_LEFT;
|
||||
leds.push_back(left_light);
|
||||
|
||||
led right_light;
|
||||
right_light.name = "Right";
|
||||
right_light.value = AMBX_LIGHT_RIGHT;
|
||||
leds.push_back(right_light);
|
||||
|
||||
led wall_left;
|
||||
wall_left.name = "Wall Left";
|
||||
wall_left.value = AMBX_LIGHT_WALL_LEFT;
|
||||
leds.push_back(wall_left);
|
||||
|
||||
led wall_center;
|
||||
wall_center.name = "Wall Center";
|
||||
wall_center.value = AMBX_LIGHT_WALL_CENTER;
|
||||
leds.push_back(wall_center);
|
||||
|
||||
led wall_right;
|
||||
wall_right.name = "Wall Right";
|
||||
wall_right.value = AMBX_LIGHT_WALL_RIGHT;
|
||||
leds.push_back(wall_right);
|
||||
|
||||
SetupColors();
|
||||
@@ -104,16 +108,7 @@ void RGBController_AMBX::DeviceUpdateLEDs()
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int led_values[5];
|
||||
RGBColor led_colors[5];
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
led_values[led_idx] = leds[led_idx].value;
|
||||
led_colors[led_idx] = colors[led_idx];
|
||||
}
|
||||
|
||||
controller->SetLEDColors(led_values, led_colors, static_cast<unsigned int>(leds.size()));
|
||||
controller->SetLEDColors(led_values, colors.data(), static_cast<unsigned int>(colors.size()));
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateZoneLEDs(int zone)
|
||||
@@ -138,17 +133,17 @@ void RGBController_AMBX::DeviceUpdateZoneLEDs(int zone)
|
||||
start_idx += zones[z_idx].leds_count;
|
||||
}
|
||||
|
||||
unsigned int led_values[5];
|
||||
RGBColor led_colors[5];
|
||||
unsigned int tmp_values[5];
|
||||
RGBColor tmp_colors[5];
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < zone_size; led_idx++)
|
||||
{
|
||||
unsigned int current_idx = start_idx + led_idx;
|
||||
led_values[led_idx] = leds[current_idx].value;
|
||||
led_colors[led_idx] = colors[current_idx];
|
||||
tmp_values[led_idx] = led_values[current_idx];
|
||||
tmp_colors[led_idx] = colors[current_idx];
|
||||
}
|
||||
|
||||
controller->SetLEDColors(led_values, led_colors, zone_size);
|
||||
controller->SetLEDColors(tmp_values, tmp_colors, zone_size);
|
||||
}
|
||||
|
||||
void RGBController_AMBX::DeviceUpdateSingleLED(int led)
|
||||
@@ -158,7 +153,7 @@ void RGBController_AMBX::DeviceUpdateSingleLED(int led)
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int led_value = leds[led].value;
|
||||
unsigned int led_value = led_values[led];
|
||||
RGBColor color = colors[led];
|
||||
controller->SetLEDColor(led_value, color);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,33 @@
|
||||
|
||||
#include "RGBController_AMDWraithPrism.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| LED maps |
|
||||
\*---------------------------------------------------------*/
|
||||
const unsigned char led_values[] =
|
||||
{
|
||||
// Logo
|
||||
0x00,
|
||||
// Fan
|
||||
0x01,
|
||||
// Ring
|
||||
0x08,
|
||||
0x07,
|
||||
0x06,
|
||||
0x05,
|
||||
0x04,
|
||||
0x03,
|
||||
0x02,
|
||||
0x10,
|
||||
0x0F,
|
||||
0x0E,
|
||||
0x0D,
|
||||
0x0C,
|
||||
0x0B,
|
||||
0x0A,
|
||||
0x09
|
||||
};
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name AMD Wraith Prism
|
||||
@category Cooler
|
||||
@@ -139,14 +166,6 @@ RGBController_AMDWraithPrism::~RGBController_AMDWraithPrism()
|
||||
|
||||
void RGBController_AMDWraithPrism::SetupZones()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| LED maps |
|
||||
\*-----------------------------------------------------*/
|
||||
const unsigned int logo_leds[1] = { 0x00 };
|
||||
const unsigned int fan_leds[1] = { 0x01 };
|
||||
const unsigned int ring_leds[15] = { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x10,
|
||||
0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09 };
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up zones |
|
||||
\*-----------------------------------------------------*/
|
||||
@@ -181,7 +200,6 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
{
|
||||
led logo_led;
|
||||
logo_led.name = "Logo LED";
|
||||
logo_led.value = logo_leds[led_idx];
|
||||
leds.push_back(logo_led);
|
||||
}
|
||||
|
||||
@@ -189,7 +207,6 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
{
|
||||
led fan_led;
|
||||
fan_led.name = "Fan LED";
|
||||
fan_led.value = fan_leds[led_idx];
|
||||
leds.push_back(fan_led);
|
||||
}
|
||||
|
||||
@@ -197,7 +214,6 @@ void RGBController_AMDWraithPrism::SetupZones()
|
||||
{
|
||||
led ring_led;
|
||||
ring_led.name = "Ring LED";
|
||||
ring_led.value = ring_leds[led_idx];
|
||||
leds.push_back(ring_led);
|
||||
}
|
||||
|
||||
@@ -218,7 +234,7 @@ void RGBController_AMDWraithPrism::DeviceUpdateLEDs()
|
||||
leds_count = 0;
|
||||
for(std::size_t led_idx = 0; led_idx < 2; led_idx++)
|
||||
{
|
||||
led_ids[leds_count] = (unsigned char)leds[led_idx].value;
|
||||
led_ids[leds_count] = led_values[led_idx];
|
||||
color_buf[leds_count] = colors[led_idx];
|
||||
|
||||
leds_count++;
|
||||
@@ -231,7 +247,7 @@ void RGBController_AMDWraithPrism::DeviceUpdateLEDs()
|
||||
leds_count = 0;
|
||||
for(std::size_t led_idx = 0; led_idx < ( colors.size() - 2 ); led_idx++)
|
||||
{
|
||||
led_ids[leds_count] = (unsigned char)leds[led_idx + 2].value;
|
||||
led_ids[leds_count] = led_values[led_idx + 2];
|
||||
color_buf[leds_count] = colors[led_idx + 2];
|
||||
|
||||
leds_count++;
|
||||
|
||||
@@ -31,7 +31,7 @@ AOCKeyboardController::~AOCKeyboardController()
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceName()
|
||||
|
||||
@@ -286,7 +286,7 @@ void RGBController_AOCKeyboard::SetupZones()
|
||||
led new_led;
|
||||
|
||||
new_led.name = new_kb.GetKeyNameAt(led_idx);
|
||||
new_led.value = new_kb.GetKeyValueAt(led_idx);
|
||||
led_values.push_back(new_kb.GetKeyValueAt(led_idx));
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ void RGBController_AOCKeyboard::DeviceUpdateLEDs()
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
color_buf[leds[led_idx].value] = colors[led_idx];
|
||||
color_buf[led_values[led_idx]] = colors[led_idx];
|
||||
}
|
||||
|
||||
controller->SetCustom(&color_buf[0]);
|
||||
|
||||
@@ -29,5 +29,6 @@ public:
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
AOCKeyboardController* controller;
|
||||
AOCKeyboardController* controller;
|
||||
std::vector<unsigned int> led_values;
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ AOCMouseController::~AOCMouseController()
|
||||
|
||||
std::string AOCMouseController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCMouseController::GetDeviceName()
|
||||
|
||||
@@ -27,7 +27,7 @@ AOCMousematController::~AOCMousematController()
|
||||
|
||||
std::string AOCMousematController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCMousematController::GetDeviceName()
|
||||
|
||||
@@ -269,9 +269,9 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
new_led.name = zones[channel_idx].name;
|
||||
new_led.name.append(", LED ");
|
||||
new_led.name.append(std::to_string(led_ch_idx + 1));
|
||||
new_led.value = channel_idx;
|
||||
|
||||
leds.push_back(new_led);
|
||||
led_values.push_back(channel_idx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ void RGBController_PolychromeUSB::SetupZones()
|
||||
\*---------------------------------------------------------*/
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
unsigned char led = (unsigned char)leds[led_idx].value;
|
||||
unsigned char led = (unsigned char)led_values[led_idx];
|
||||
|
||||
colors[led_idx] = zones_info[led].color;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ void RGBController_PolychromeUSB::DeviceUpdateZoneLEDs(int zone)
|
||||
|
||||
void RGBController_PolychromeUSB::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned int channel = leds[led].value;
|
||||
unsigned int channel = led_values[led];
|
||||
unsigned char set_mode = zones_info[channel].mode;
|
||||
|
||||
if(set_mode > modes.size())
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
|
||||
private:
|
||||
PolychromeUSBController* controller;
|
||||
std::vector<unsigned int> led_values;
|
||||
std::vector<PolychromeZoneInfo> zones_info;
|
||||
|
||||
unsigned char GetDeviceMode(unsigned char zone);
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ ASRockASRRGBSMBusController::~ASRockASRRGBSMBusController()
|
||||
|
||||
std::string ASRockASRRGBSMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+7
-2
@@ -158,6 +158,11 @@ void RGBController_ASRockASRRGBSMBus::SetupZones()
|
||||
\*---------------------------------------------------------*/
|
||||
leds.push_back(*new_led);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Initialize led_values vector |
|
||||
\*---------------------------------------------------------*/
|
||||
led_values.push_back(0);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
@@ -184,9 +189,9 @@ void RGBController_ASRockASRRGBSMBus::DeviceUpdateSingleLED(int led)
|
||||
| If the LED value is non-zero, this LED overrides the LED |
|
||||
| index |
|
||||
\*---------------------------------------------------------*/
|
||||
if(leds[led].value != 0)
|
||||
if(led_values[led] != 0)
|
||||
{
|
||||
led = leds[led].value;
|
||||
led = led_values[led];
|
||||
}
|
||||
|
||||
controller->SetColorsAndSpeed(led, red, grn, blu);
|
||||
|
||||
+1
@@ -30,4 +30,5 @@ public:
|
||||
|
||||
private:
|
||||
ASRockASRRGBSMBusController* controller;
|
||||
std::vector<unsigned int> led_values;
|
||||
};
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ ASRockPolychromeV1SMBusController::~ASRockPolychromeV1SMBusController()
|
||||
|
||||
std::string ASRockPolychromeV1SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -285,13 +285,13 @@ void RGBController_ASRockPolychromeV1SMBus::SetupZones()
|
||||
led* new_led = new led();
|
||||
|
||||
new_led->name = polychrome_v1_zone_names[zone_idx];
|
||||
new_led->value = zone_idx;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Push new LED to LEDs vector |
|
||||
\*---------------------------------------------------------*/
|
||||
leds.push_back(*new_led);
|
||||
zoneIndexMap.push_back(zone_idx);
|
||||
led_values.push_back(zone_idx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-3
@@ -32,7 +32,9 @@ public:
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
ASRockPolychromeV1SMBusController* controller;
|
||||
uint8_t getModeIndex(uint8_t mode_value);
|
||||
std::vector<uint8_t> zoneIndexMap;
|
||||
ASRockPolychromeV1SMBusController* controller;
|
||||
std::vector<unsigned int> led_values;
|
||||
std::vector<uint8_t> zoneIndexMap;
|
||||
|
||||
uint8_t getModeIndex(uint8_t mode_value);
|
||||
};
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ ASRockPolychromeV2SMBusController::~ASRockPolychromeV2SMBusController()
|
||||
|
||||
std::string ASRockPolychromeV2SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+7
-4
@@ -256,11 +256,14 @@ void RGBController_ASRockPolychromeV2SMBus::SetupZones()
|
||||
new_led->name = polychrome_v2_zone_names[zone_idx];
|
||||
|
||||
new_led->name.append(" " + std::to_string(led_idx + 1));
|
||||
new_led->value = 0;
|
||||
|
||||
if(zone_idx == POLYCHROME_V2_ZONE_ADDRESSABLE)
|
||||
{
|
||||
new_led->value = 0x19;
|
||||
led_values.push_back(0x19);
|
||||
}
|
||||
else
|
||||
{
|
||||
led_values.push_back(0);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -311,9 +314,9 @@ void RGBController_ASRockPolychromeV2SMBus::DeviceUpdateSingleLED(int led)
|
||||
| If the LED value is non-zero, this LED overrides the LED |
|
||||
| index |
|
||||
\*---------------------------------------------------------*/
|
||||
if(leds[led].value != 0)
|
||||
if(led_values[led] != 0)
|
||||
{
|
||||
led = leds[led].value;
|
||||
led = led_values[led];
|
||||
}
|
||||
|
||||
controller->SetColorsAndSpeed(led, red, grn, blu);
|
||||
|
||||
+2
-1
@@ -32,5 +32,6 @@ public:
|
||||
void DeviceUpdateMode();
|
||||
|
||||
private:
|
||||
ASRockPolychromeV2SMBusController* controller;
|
||||
ASRockPolychromeV2SMBusController* controller;
|
||||
std::vector<unsigned int> led_values;
|
||||
};
|
||||
|
||||
@@ -91,9 +91,9 @@ DetectedControllers DetectASRockSMBusControllers(std::vector<i2c_smbus_interface
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_MOBO_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(buses[bus]->pci_subsystem_vendor == ASROCK_SUB_VEN)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == ASROCK_SUB_VEN)
|
||||
{
|
||||
LOG_DEBUG(SMBUS_CHECK_DEVICE_MESSAGE_EN, ASROCK_DETECTOR_NAME, bus, VENDOR_NAME, SMBUS_ADDRESS);
|
||||
// Check for Polychrome controller at 0x6A
|
||||
|
||||
+8
-8
@@ -313,7 +313,7 @@ void RGBController_AlienwareAW410K::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_idx].name;
|
||||
new_led.value = led_names[led_idx].idx;
|
||||
led_values.push_back(led_names[led_idx].idx);
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
@@ -329,14 +329,14 @@ void RGBController_AlienwareAW410K::DeviceUpdateLEDs()
|
||||
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
SelectedButtons key;
|
||||
SelectedButtons key;
|
||||
|
||||
key.idx = (unsigned char)leds[led_idx].value;
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
key.idx = led_values[led_idx];
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
|
||||
frame_buf_keys.push_back(key);
|
||||
frame_buf_keys.push_back(key);
|
||||
}
|
||||
|
||||
controller->SendInitialize();
|
||||
@@ -358,7 +358,7 @@ void RGBController_AlienwareAW410K::DeviceUpdateZoneLEDs(int zone)
|
||||
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
controller->DeviceUpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
controller->DeviceUpdateSingleLED(led_values[led], RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW410K::DeviceUpdateMode()
|
||||
|
||||
+1
@@ -32,4 +32,5 @@ public:
|
||||
private:
|
||||
AlienwareAW410KController* controller;
|
||||
std::vector<RGBColor> current_colors;
|
||||
std::vector<unsigned char> led_values;
|
||||
};
|
||||
|
||||
+9
-23
@@ -312,7 +312,7 @@ void RGBController_AlienwareAW510K::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_idx].name;
|
||||
new_led.value = led_names[led_idx].idx;
|
||||
led_values.push_back(led_names[led_idx].idx);
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
if (current_colors[led_idx]==new_colors[led_idx])
|
||||
if(current_colors[led_idx] == new_colors[led_idx])
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Don't send if key color is not changed |
|
||||
@@ -336,28 +336,14 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
|
||||
continue;
|
||||
}
|
||||
|
||||
if(RGBGetRValue(colors[led_idx]) != 0x00 || RGBGetBValue(colors[led_idx]) != 0x00 || RGBGetBValue(colors[led_idx]) != 0x00)
|
||||
{
|
||||
SelectedKeys key;
|
||||
SelectedKeys key;
|
||||
|
||||
key.idx = (unsigned char)leds[led_idx].value;
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
key.idx = led_values[led_idx];
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
|
||||
frame_buf_keys.push_back(key);
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectedKeys key;
|
||||
|
||||
key.idx = (unsigned char)leds[led_idx].value;
|
||||
key.red = RGBGetRValue(colors[led_idx]);
|
||||
key.green = RGBGetGValue(colors[led_idx]);
|
||||
key.blue = RGBGetBValue(colors[led_idx]);
|
||||
|
||||
frame_buf_keys.push_back(key);
|
||||
}
|
||||
frame_buf_keys.push_back(key);
|
||||
}
|
||||
|
||||
controller->SendInitialize();
|
||||
@@ -379,7 +365,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateZoneLEDs(int zone)
|
||||
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
controller->DeviceUpdateSingleLED(leds[led].value, RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
controller->DeviceUpdateSingleLED(led_values[led], RGBGetRValue(colors[led]), RGBGetGValue(colors[led]), RGBGetBValue(colors[led]));
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW510K::DeviceUpdateMode()
|
||||
|
||||
+1
@@ -31,4 +31,5 @@ public:
|
||||
private:
|
||||
AlienwareAW510KController* controller;
|
||||
std::vector<RGBColor> current_colors;
|
||||
std::vector<unsigned char> led_values;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
|
||||
#include "RGBController_AlienwareAW3423DWF.h"
|
||||
|
||||
static const unsigned char led_values[] =
|
||||
{
|
||||
0x01,
|
||||
0x02,
|
||||
0x08
|
||||
};
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name AW3423DWF
|
||||
@category Accessory
|
||||
@@ -63,7 +70,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
|
||||
led Logo_LED;
|
||||
Logo_LED.name = "Logo";
|
||||
Logo_LED.value = 0x01;
|
||||
leds.push_back(Logo_LED);
|
||||
|
||||
zone Number;
|
||||
@@ -76,7 +82,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
|
||||
led Number_LED;
|
||||
Number_LED.name = "Number";
|
||||
Number_LED.value = 0x02;
|
||||
leds.push_back(Number_LED);
|
||||
|
||||
zone PowerButton;
|
||||
@@ -89,7 +94,6 @@ void RGBController_AlienwareAW3423DWF::SetupZones()
|
||||
|
||||
led PowerButton_LED;
|
||||
PowerButton_LED.name = "Power Button";
|
||||
PowerButton_LED.value = 0x08;
|
||||
leds.push_back(PowerButton_LED);
|
||||
|
||||
SetupColors();
|
||||
@@ -128,7 +132,7 @@ void RGBController_AlienwareAW3423DWF::DeviceUpdateSingleLED(int led)
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
unsigned char blu = RGBGetBValue(colors[led]);
|
||||
controller->SendColor(leds[led].value, red, grn, blu);
|
||||
controller->SendColor(led_values[led], red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_AlienwareAW3423DWF::DeviceUpdateMode()
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
|
||||
#include "RGBController_AlienwareMonitor.h"
|
||||
|
||||
static const unsigned char led_values[] =
|
||||
{
|
||||
0x01,
|
||||
0x02,
|
||||
0x08
|
||||
};
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Alienware Monitor
|
||||
@category Accessory
|
||||
@@ -63,7 +70,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
|
||||
led Logo_LED;
|
||||
Logo_LED.name = "Logo";
|
||||
Logo_LED.value = 0x01;
|
||||
leds.push_back(Logo_LED);
|
||||
|
||||
zone Number;
|
||||
@@ -76,7 +82,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
|
||||
led Number_LED;
|
||||
Number_LED.name = "Number";
|
||||
Number_LED.value = 0x02;
|
||||
leds.push_back(Number_LED);
|
||||
|
||||
zone PowerButton;
|
||||
@@ -89,7 +94,6 @@ void RGBController_AlienwareMonitor::SetupZones()
|
||||
|
||||
led PowerButton_LED;
|
||||
PowerButton_LED.name = "Power Button";
|
||||
PowerButton_LED.value = 0x08;
|
||||
leds.push_back(PowerButton_LED);
|
||||
|
||||
SetupColors();
|
||||
@@ -128,7 +132,7 @@ void RGBController_AlienwareMonitor::DeviceUpdateSingleLED(int led)
|
||||
unsigned char red = RGBGetRValue(colors[led]);
|
||||
unsigned char grn = RGBGetGValue(colors[led]);
|
||||
unsigned char blu = RGBGetBValue(colors[led]);
|
||||
controller->SendColor(leds[led].value, red, grn, blu);
|
||||
controller->SendColor(led_values[led], red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_AlienwareMonitor::DeviceUpdateMode()
|
||||
|
||||
@@ -38,76 +38,69 @@ static const unsigned int zone_sizes[] =
|
||||
LED_COUNT,
|
||||
};
|
||||
|
||||
typedef struct
|
||||
static const char* led_names[] =
|
||||
{
|
||||
const char * name;
|
||||
const unsigned char idx;
|
||||
} annepro2_led_type;
|
||||
|
||||
static const annepro2_led_type led_names[] =
|
||||
{
|
||||
/* Key Label Index */
|
||||
{ KEY_EN_ESCAPE, 0 },
|
||||
{ KEY_EN_1, 1 },
|
||||
{ KEY_EN_2, 2 },
|
||||
{ KEY_EN_3, 3 },
|
||||
{ KEY_EN_4, 4 },
|
||||
{ KEY_EN_5, 5 },
|
||||
{ KEY_EN_6, 6 },
|
||||
{ KEY_EN_7, 7 },
|
||||
{ KEY_EN_8, 8 },
|
||||
{ KEY_EN_9, 9 },
|
||||
{ KEY_EN_0, 10 },
|
||||
{ KEY_EN_MINUS, 11 },
|
||||
{ KEY_EN_EQUALS, 12 },
|
||||
{ KEY_EN_BACKSPACE, 13 },
|
||||
{ KEY_EN_TAB, 14 },
|
||||
{ KEY_EN_Q, 15 },
|
||||
{ KEY_EN_W, 16 },
|
||||
{ KEY_EN_E, 17 },
|
||||
{ KEY_EN_R, 18 },
|
||||
{ KEY_EN_T, 19 },
|
||||
{ KEY_EN_Y, 20 },
|
||||
{ KEY_EN_U, 21 },
|
||||
{ KEY_EN_I, 22 },
|
||||
{ KEY_EN_O, 23 },
|
||||
{ KEY_EN_P, 24 },
|
||||
{ KEY_EN_LEFT_BRACKET, 25 },
|
||||
{ KEY_EN_RIGHT_BRACKET, 26 },
|
||||
{ KEY_EN_ANSI_BACK_SLASH, 27 },
|
||||
{ KEY_EN_CAPS_LOCK, 28 },
|
||||
{ KEY_EN_A, 29 },
|
||||
{ KEY_EN_S, 30 },
|
||||
{ KEY_EN_D, 31 },
|
||||
{ KEY_EN_F, 32 },
|
||||
{ KEY_EN_G, 33 },
|
||||
{ KEY_EN_H, 34 },
|
||||
{ KEY_EN_J, 35 },
|
||||
{ KEY_EN_K, 36 },
|
||||
{ KEY_EN_L, 37 },
|
||||
{ KEY_EN_SEMICOLON, 38 },
|
||||
{ KEY_EN_QUOTE, 39 },
|
||||
{ KEY_EN_ANSI_ENTER, 40 },
|
||||
{ KEY_EN_LEFT_SHIFT, 41 },
|
||||
{ KEY_EN_Z, 42 },
|
||||
{ KEY_EN_X, 43 },
|
||||
{ KEY_EN_C, 44 },
|
||||
{ KEY_EN_V, 45 },
|
||||
{ KEY_EN_B, 46 },
|
||||
{ KEY_EN_N, 47 },
|
||||
{ KEY_EN_M, 48 },
|
||||
{ KEY_EN_COMMA, 49 },
|
||||
{ KEY_EN_PERIOD, 50 },
|
||||
{ KEY_EN_FORWARD_SLASH, 51 },
|
||||
{ KEY_EN_RIGHT_SHIFT, 52 },
|
||||
{ KEY_EN_LEFT_CONTROL, 53 },
|
||||
{ KEY_EN_LEFT_WINDOWS, 54 },
|
||||
{ KEY_EN_LEFT_ALT, 55 },
|
||||
{ KEY_EN_SPACE, 56 },
|
||||
{ KEY_EN_RIGHT_ALT, 57 },
|
||||
{ KEY_EN_RIGHT_FUNCTION, 58 },
|
||||
{ KEY_EN_MENU, 59 },
|
||||
{ KEY_EN_RIGHT_CONTROL, 60 },
|
||||
KEY_EN_ESCAPE,
|
||||
KEY_EN_1,
|
||||
KEY_EN_2,
|
||||
KEY_EN_3,
|
||||
KEY_EN_4,
|
||||
KEY_EN_5,
|
||||
KEY_EN_6,
|
||||
KEY_EN_7,
|
||||
KEY_EN_8,
|
||||
KEY_EN_9,
|
||||
KEY_EN_0,
|
||||
KEY_EN_MINUS,
|
||||
KEY_EN_EQUALS,
|
||||
KEY_EN_BACKSPACE,
|
||||
KEY_EN_TAB,
|
||||
KEY_EN_Q,
|
||||
KEY_EN_W,
|
||||
KEY_EN_E,
|
||||
KEY_EN_R,
|
||||
KEY_EN_T,
|
||||
KEY_EN_Y,
|
||||
KEY_EN_U,
|
||||
KEY_EN_I,
|
||||
KEY_EN_O,
|
||||
KEY_EN_P,
|
||||
KEY_EN_LEFT_BRACKET,
|
||||
KEY_EN_RIGHT_BRACKET,
|
||||
KEY_EN_ANSI_BACK_SLASH,
|
||||
KEY_EN_CAPS_LOCK,
|
||||
KEY_EN_A,
|
||||
KEY_EN_S,
|
||||
KEY_EN_D,
|
||||
KEY_EN_F,
|
||||
KEY_EN_G,
|
||||
KEY_EN_H,
|
||||
KEY_EN_J,
|
||||
KEY_EN_K,
|
||||
KEY_EN_L,
|
||||
KEY_EN_SEMICOLON,
|
||||
KEY_EN_QUOTE,
|
||||
KEY_EN_ANSI_ENTER,
|
||||
KEY_EN_LEFT_SHIFT,
|
||||
KEY_EN_Z,
|
||||
KEY_EN_X,
|
||||
KEY_EN_C,
|
||||
KEY_EN_V,
|
||||
KEY_EN_B,
|
||||
KEY_EN_N,
|
||||
KEY_EN_M,
|
||||
KEY_EN_COMMA,
|
||||
KEY_EN_PERIOD,
|
||||
KEY_EN_FORWARD_SLASH,
|
||||
KEY_EN_RIGHT_SHIFT,
|
||||
KEY_EN_LEFT_CONTROL,
|
||||
KEY_EN_LEFT_WINDOWS,
|
||||
KEY_EN_LEFT_ALT,
|
||||
KEY_EN_SPACE,
|
||||
KEY_EN_RIGHT_ALT,
|
||||
KEY_EN_RIGHT_FUNCTION,
|
||||
KEY_EN_MENU,
|
||||
KEY_EN_RIGHT_CONTROL,
|
||||
};
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@@ -177,8 +170,7 @@ void RGBController_AnnePro2::SetupZones()
|
||||
for(unsigned int led_idx = 0; led_idx < total_led_count; led_idx++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_idx].name;
|
||||
new_led.value = led_names[led_idx].idx;
|
||||
new_led.name = led_names[led_idx];
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
@@ -194,7 +186,7 @@ void RGBController_AnnePro2::DeviceUpdateLEDs()
|
||||
| TODO: Send packets with multiple LED frames |
|
||||
\*---------------------------------------------------------*/
|
||||
std::size_t led_real_idx = 0;
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
for(std::size_t led_idx = 0; led_idx < colors.size(); led_idx++)
|
||||
{
|
||||
frame_buf[(led_real_idx * 3) + 0] = RGBGetRValue(colors[led_idx]);
|
||||
frame_buf[(led_real_idx * 3) + 1] = RGBGetGValue(colors[led_idx]);
|
||||
|
||||
@@ -75,7 +75,6 @@ void RGBController_Arctic::SetupZones()
|
||||
|
||||
led Led;
|
||||
Led.name = LedZone.name + " LED";
|
||||
Led.value = channel;
|
||||
|
||||
zones.push_back(LedZone);
|
||||
leds.push_back(Led);
|
||||
|
||||
+7
-16
@@ -351,11 +351,14 @@ void RGBController_AsusAuraCoreLaptop::SetupZones()
|
||||
new_zone.leds_count = new_kb.GetKeyCount();
|
||||
for(unsigned int led_idx = 0; led_idx < new_zone.leds_count; led_idx++)
|
||||
{
|
||||
led new_led;
|
||||
led new_led;
|
||||
unsigned int new_led_value;
|
||||
|
||||
new_led.name = new_kb.GetKeyNameAt(led_idx);
|
||||
new_led.value = new_kb.GetKeyValueAt(led_idx);
|
||||
max_led_value = std::max(max_led_value, new_led.value);
|
||||
new_led_value = new_kb.GetKeyValueAt(led_idx);
|
||||
max_led_value = std::max(max_led_value, new_led_value);
|
||||
|
||||
led_values.push_back(new_led_value);
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
@@ -385,24 +388,12 @@ void RGBController_AsusAuraCoreLaptop::SetupZones()
|
||||
|
||||
for(size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
buffer_map[leds[led_idx].value] = &colors[led_idx];
|
||||
buffer_map[led_values[led_idx]] = &colors[led_idx];
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_AsusAuraCoreLaptop::DeviceUpdateLEDs()
|
||||
{
|
||||
for(size_t i = 85; i < leds.size(); i++)
|
||||
{
|
||||
LOG_DEBUG("[%s] Setting %s @ LED index %d and buffer index %d to R: %02X G: %02X B: %02X",
|
||||
name.c_str(),
|
||||
leds[i].name.c_str(),
|
||||
i,
|
||||
leds[i].value,
|
||||
RGBGetRValue(colors[i]),
|
||||
RGBGetGValue(colors[i]),
|
||||
RGBGetBValue(colors[i]));
|
||||
}
|
||||
|
||||
controller->SetLedsDirect(buffer_map);
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ public:
|
||||
private:
|
||||
RGBColor null_color = 0;
|
||||
std::vector<RGBColor *> buffer_map;
|
||||
std::vector<unsigned int> led_values;
|
||||
|
||||
AsusAuraCoreLaptopController* controller;
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ std::string AuraGPUController::GetDeviceName()
|
||||
|
||||
std::string AuraGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
@@ -79,7 +79,7 @@ void AuraGPUController::AuraGPURegisterWrite(unsigned char reg, unsigned char va
|
||||
|
||||
bool AuraGPUController::SaveOnlyApplies()
|
||||
{
|
||||
switch (bus->pci_subsystem_device)
|
||||
switch (bus->info.pci_subsystem_device)
|
||||
{
|
||||
case ASUS_VEGA64_STRIX:
|
||||
return false;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
bool TestForAsusAuraGPUController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
if(bus->pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
if(bus->info.pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-2
@@ -471,8 +471,8 @@ void RGBController_AuraKeyboard::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_idx].name;
|
||||
new_led.value = led_names[led_idx].idx;
|
||||
|
||||
led_values.push_back(led_names[led_idx].idx);
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ void RGBController_AuraKeyboard::DeviceUpdateLEDs()
|
||||
\*---------------------------------------------------------*/
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
frame_buf[(led_idx * 4) + 0] = leds[led_idx].value;
|
||||
frame_buf[(led_idx * 4) + 0] = led_values[led_idx];
|
||||
frame_buf[(led_idx * 4) + 1] = RGBGetRValue(colors[led_idx]);
|
||||
frame_buf[(led_idx * 4) + 2] = RGBGetGValue(colors[led_idx]);
|
||||
frame_buf[(led_idx * 4) + 3] = RGBGetBValue(colors[led_idx]);
|
||||
|
||||
+1
@@ -54,4 +54,5 @@ public:
|
||||
private:
|
||||
AuraKeyboardController* controller;
|
||||
AuraKeyboardMappingLayoutType layout;
|
||||
std::vector<unsigned char> led_values;
|
||||
};
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define AURA_ROG_GLADIUS_II_WIRELESS_1_PID 0x189E
|
||||
#define AURA_ROG_GLADIUS_II_WIRELESS_2_PID 0x18A0
|
||||
#define AURA_ROG_GLADIUS_III_PID 0x197B
|
||||
#define AURA_ROG_GLADIUS_III_CORE_PID 0x1C8D
|
||||
#define AURA_ROG_GLADIUS_III_WIRELESS_USB_PID 0x197D
|
||||
#define AURA_ROG_GLADIUS_III_WIRELESS_2_4_PID 0x197F
|
||||
#define AURA_ROG_GLADIUS_III_WIRELESS_BT_PID 0x1981
|
||||
@@ -217,6 +218,20 @@ static std::map<int,mouse_type> aura_mouse_devices =
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM, AURA_MOUSE_MODE_WAVE, AURA_MOUSE_MODE_REACTIVE, AURA_MOUSE_MODE_COMET, AURA_MOUSE_MODE_BATTERY }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_ROG_GLADIUS_III_CORE_PID, // ROG Gladius III Core
|
||||
{
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
100,
|
||||
false,
|
||||
1,
|
||||
false,
|
||||
{ AURA_MOUSE_ZONE_LOGO, AURA_MOUSE_ZONE_SCROLL },
|
||||
{ AURA_MOUSE_MODE_STATIC, AURA_MOUSE_MODE_BREATHING, AURA_MOUSE_MODE_SPECTRUM, AURA_MOUSE_MODE_NONE, AURA_MOUSE_MODE_REACTIVE }
|
||||
}
|
||||
},
|
||||
{
|
||||
AURA_ROG_GLADIUS_III_WIRELESS_USB_PID, // ROG Gladius III Wireless USB
|
||||
{
|
||||
|
||||
+2
-2
@@ -207,8 +207,8 @@ void RGBController_AuraMouse::SetupZones()
|
||||
led mouse_led;
|
||||
|
||||
mouse_led.name = mouse_zone.name + " LED";
|
||||
mouse_led.value = *zone_it;
|
||||
|
||||
led_values.push_back(*zone_it);
|
||||
leds.push_back(mouse_led);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ void RGBController_AuraMouse::DeviceUpdateSingleLED(int led)
|
||||
uint8_t grn = RGBGetGValue(colors[led]);
|
||||
uint8_t blu = RGBGetBValue(colors[led]);
|
||||
|
||||
controller->SendUpdate(leds[led].value, modes[active_mode].value, red, grn, blu, 0, false, 0, modes[active_mode].brightness);
|
||||
controller->SendUpdate(led_values[led], modes[active_mode].value, red, grn, blu, 0, false, 0, modes[active_mode].brightness);
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::DeviceUpdateMode()
|
||||
|
||||
+1
@@ -31,5 +31,6 @@ public:
|
||||
|
||||
private:
|
||||
AuraMouseController* controller;
|
||||
std::vector<uint8_t> led_values;
|
||||
uint16_t pid;
|
||||
};
|
||||
|
||||
-1
@@ -141,7 +141,6 @@ void RGBController_AsusROGSpatha::SetupZones()
|
||||
led spatha_led;
|
||||
|
||||
spatha_led.name = zones_names[i];
|
||||
spatha_led.value = 1;
|
||||
|
||||
leds.push_back(spatha_led);
|
||||
}
|
||||
|
||||
-1
@@ -99,7 +99,6 @@ void RGBController_AsusROGStrixEvolve::SetupZones()
|
||||
led mouse_led;
|
||||
|
||||
mouse_led.name = "Underglow";
|
||||
mouse_led.value = 1;
|
||||
|
||||
leds.push_back(mouse_led);
|
||||
|
||||
|
||||
+4
-1
@@ -19,7 +19,10 @@ AsusAuraRyuoAIOController::AsusAuraRyuoAIOController(hid_device* dev_handle, con
|
||||
| Manually adding device info for now |
|
||||
| TODO: Implement config table accurately |
|
||||
\*-----------------------------------------------------*/
|
||||
device_info.push_back({0x00, 0x00, 12, 0, AuraDeviceType::FIXED});
|
||||
uint8_t leds = (dev_name.find("Ryujin") != std::string::npos) ? 5 : 12;
|
||||
|
||||
device_info.push_back({0x00, 0x00, leds, 0, AuraDeviceType::FIXED});
|
||||
|
||||
}
|
||||
|
||||
AsusAuraRyuoAIOController::~AsusAuraRyuoAIOController()
|
||||
|
||||
-1
@@ -163,7 +163,6 @@ void RGBController_AsusAuraRyuoAIO::SetupZones()
|
||||
|
||||
new_led.name = zones[zone_idx].name;
|
||||
new_led.name.append(" LED " + std::to_string(lp_idx));
|
||||
new_led.value = lp_idx;
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
+3
-3
@@ -520,7 +520,7 @@ void RGBController_AuraTUFKeyboard::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = keyboard[layout].led_names[led_id].name;
|
||||
new_led.value = keyboard[layout].led_names[led_id].id;
|
||||
led_values.push_back(keyboard[layout].led_names[led_id].id);
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateLEDs()
|
||||
|
||||
for(size_t i = 0; i < colors.size(); i++)
|
||||
{
|
||||
led_color_list.push_back({ leds[i].value, colors[i] });
|
||||
led_color_list.push_back({ led_values[i], colors[i] });
|
||||
}
|
||||
|
||||
controller->UpdateLeds(led_color_list);
|
||||
@@ -560,7 +560,7 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateSingleLED(int led)
|
||||
unsigned char green = RGBGetGValue(colors[led]);
|
||||
unsigned char blue = RGBGetBValue(colors[led]);
|
||||
|
||||
controller->UpdateSingleLed(leds[led].value, red, green, blue);
|
||||
controller->UpdateSingleLed(led_values[led], red, green, blue);
|
||||
}
|
||||
|
||||
static const uint8_t direction_map[2][6] =
|
||||
|
||||
+1
@@ -53,4 +53,5 @@ public:
|
||||
private:
|
||||
AuraTUFKeyboardController* controller;
|
||||
uint16_t pid;
|
||||
std::vector<uint8_t> led_values;
|
||||
};
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
#define AURA_TERMINAL_PID 0x1889
|
||||
#define ROG_STRIX_LC120_PID 0x879E
|
||||
#define AURA_RYUO_AIO_PID 0x1887
|
||||
#define AURA_RYUJIN_AIO_PID 0x18AE
|
||||
#define ASUS_ROG_ALLY_PID 0x1ABE
|
||||
#define ASUS_ROG_ALLY_X_PID 0x1B4C
|
||||
|
||||
@@ -463,6 +464,7 @@ REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Origin COD",
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Wireless", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_WIRELESS_1_PID, 1, 0xFF13);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius II Wireless", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_II_WIRELESS_2_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius III", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_III_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius III Core", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_III_CORE_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius III Wireless USB", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_III_WIRELESS_USB_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius III Wireless 2.4Ghz", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_III_WIRELESS_2_4_PID, 0, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("ASUS ROG Gladius III Wireless Bluetooth", DetectAsusAuraUSBMice, AURA_USB_VID, AURA_ROG_GLADIUS_III_WIRELESS_BT_PID, 0, 0xFF01);
|
||||
@@ -523,6 +525,7 @@ REGISTER_HID_DETECTOR_PU("ASUS ROG PG32UQ", DetectAs
|
||||
REGISTER_HID_DETECTOR ("ASUS ROG AURA Terminal", DetectAsusAuraUSBTerminal, AURA_USB_VID, AURA_TERMINAL_PID);
|
||||
REGISTER_HID_DETECTOR_PU ("ASUS ROG Strix LC", DetectAsusAuraUSBROGStrixLC, AURA_USB_VID, ROG_STRIX_LC120_PID, 0x00FF, 1);
|
||||
REGISTER_HID_DETECTOR_PU ("ASUS ROG Ryuo AIO", DetectAsusAuraUSBRyuoAIO, AURA_USB_VID, AURA_RYUO_AIO_PID, 0xFF72, 0x00A1);
|
||||
REGISTER_HID_DETECTOR_PU ("ASUS ROG Ryujin AIO", DetectAsusAuraUSBRyuoAIO, AURA_USB_VID, AURA_RYUJIN_AIO_PID, 0xFF72, 0x00A1);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_PID, 0);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne QI", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_QI_PID, 0);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne QI GUNDAM", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_QI_GUNDAM_PID, 0);
|
||||
|
||||
-1
@@ -164,7 +164,6 @@ void RGBController_AsusROGStrixLC::SetupZones()
|
||||
|
||||
new_led.name = zones[zone_idx].name;
|
||||
new_led.name.append(" LED " + std::to_string(lp_idx));
|
||||
new_led.value = lp_idx;
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
-2
@@ -71,7 +71,6 @@ void RGBController_StrixClaw::SetupZones()
|
||||
led scroll_wheel_led;
|
||||
|
||||
scroll_wheel_led.name = "Scroll Wheel LED";
|
||||
scroll_wheel_led.value = 1;
|
||||
|
||||
leds.push_back(scroll_wheel_led);
|
||||
|
||||
@@ -88,7 +87,6 @@ void RGBController_StrixClaw::SetupZones()
|
||||
led logo_led;
|
||||
|
||||
logo_led.name = "Logo LED";
|
||||
logo_led.value = 1;
|
||||
|
||||
leds.push_back(logo_led);
|
||||
|
||||
|
||||
@@ -241,9 +241,9 @@ void RGBController_ClevoKeyboard::SetupZones()
|
||||
led new_led;
|
||||
|
||||
new_led.name = new_kb.GetKeyNameAt(led_idx);
|
||||
new_led.value = new_kb.GetKeyValueAt(led_idx);
|
||||
|
||||
leds.push_back(new_led);
|
||||
led_values.push_back(new_kb.GetKeyValueAt(led_idx));
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
@@ -258,7 +258,7 @@ void RGBController_ClevoKeyboard::SetupZones()
|
||||
|
||||
for(size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
buffer_map[leds[led_idx].value] = &colors[led_idx];
|
||||
buffer_map[led_values[led_idx]] = &colors[led_idx];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,5 +32,6 @@ public:
|
||||
private:
|
||||
ClevoKeyboardController* controller;
|
||||
std::vector<RGBColor*> buffer_map;
|
||||
std::vector<unsigned int> led_values;
|
||||
RGBColor null_color;
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ ColorfulGPUController::~ColorfulGPUController()
|
||||
|
||||
std::string ColorfulGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
@@ -45,7 +45,7 @@ void ColorfulGPUController::SetDirect(RGBColor color)
|
||||
uint8_t g = RGBGetGValue(color);
|
||||
uint8_t b = RGBGetBValue(color);
|
||||
|
||||
if(this->bus->pci_subsystem_device == COLORFUL_IGAME_RTX_4070_VULCAN_OCV)
|
||||
if(this->bus->info.pci_subsystem_device == COLORFUL_IGAME_RTX_4070_VULCAN_OCV)
|
||||
{
|
||||
uint8_t data_pkt[COLORFUL_PACKET_LENGTH_V2] = { 0xAA, 0xEF, 0x01, 0x04, 0x88, 0x26 };
|
||||
for(int i=6; i < COLORFUL_PACKET_LENGTH_V2 -2; i = i + 3)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*---------------------------------------------------------*\
|
||||
/*---------------------------------------------------------*\
|
||||
| ColorfulGPUControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Colorful GPU |
|
||||
@@ -52,7 +52,7 @@ REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Advanced OC 12G L-V", Detec
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Ultra W OC 12G L-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060_LHR_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Ultra W OC 12G L-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060_GA106_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Ultra W OC 12G L-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060_LHR_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G_2, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Ti Ultra W OC LHR-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Ti Ultra W OC LHR-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Ti Ultra W OC LHR-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G_2, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Ti Advanced OC-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_3070_ADVANCED_OCV, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 3060 Ti Advanced OC-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_3060TI_ADVANCED_OC, 0x61);
|
||||
@@ -76,6 +76,8 @@ REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 4080 Ultra W OC-V", Detec
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 4080 Ultra W OC-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX4080_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_4080_ULTRAW_OCV2, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 4090 Advanced OC-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_4090_ADVANCED_OCV, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 4090 Advanced OC-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_4090_ADVANCED_OCV2, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 5060 Ti Ultra W DUO OC", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX5060TI_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_5060TI_ULTRAW_DUO_OC, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 5060 Ultra W OC", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX5060_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_5060_ULTRAW_OC, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 5060 Ti Ultra W DUO OC", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX5060TI_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_5060TI_ULTRAW_DUO_OC, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 5060 Ti Ultra W DUO OC", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX5060TI_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_5060TI_ULTRAW_DUO_OC_2, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 5070 Ultra W OC-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_5070_ULTRAW_OCV, 0x61);
|
||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 5070 Ultra W OC-V", DetectColorfulGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_5070_ULTRAW_OCV2, 0x61);
|
||||
@@ -24,7 +24,7 @@ ColorfulTuringGPUController::~ColorfulTuringGPUController()
|
||||
|
||||
std::string ColorfulTuringGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -17,7 +17,7 @@ DetectedControllers DetectColorfulTuringGPUControllers(i2c_smbus_interface* bus,
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
ColorfulTuringGPUController* controller = new ColorfulTuringGPUController(bus, i2c_addr, name);
|
||||
RGBController_ColorfulTuringGPU* rgb_controller = new RGBController_ColorfulTuringGPU(controller);
|
||||
|
||||
+2
-2
@@ -159,7 +159,7 @@ void RGBController_CMGD160Controller::SetupZones()
|
||||
{
|
||||
led l;
|
||||
l.name = "Front LED " + std::to_string(i + 1);
|
||||
l.value = i;
|
||||
|
||||
leds.push_back(l);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ void RGBController_CMGD160Controller::SetupZones()
|
||||
{
|
||||
led l;
|
||||
l.name = "Back LED " + std::to_string(i + 1);
|
||||
l.value = i;
|
||||
|
||||
leds.push_back(l);
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -146,12 +146,10 @@ void RGBController_CMMM711Controller::Init_Controller()
|
||||
|
||||
led wheel_led;
|
||||
wheel_led.name = "Scroll Wheel LED";
|
||||
wheel_led.value = 0;
|
||||
leds.push_back(wheel_led);
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Logo LED";
|
||||
logo_led.value = 1;
|
||||
leds.push_back(logo_led);
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -139,7 +139,6 @@ void RGBController_CMMM712Controller::Init_Controller()
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Logo LED";
|
||||
logo_led.value = 0;
|
||||
leds.push_back(logo_led);
|
||||
}
|
||||
|
||||
|
||||
@@ -183,28 +183,24 @@ void RGBController_CMMMController::Init_Controller()
|
||||
mouse_zone.leds_count = leds_count;
|
||||
zones.push_back(mouse_zone);
|
||||
|
||||
int value = 0;
|
||||
uint16_t pid = controller->GetProductID();
|
||||
|
||||
led wheel_led;
|
||||
wheel_led.name = "Scroll Wheel";
|
||||
wheel_led.value = value;
|
||||
leds.push_back(wheel_led);
|
||||
|
||||
value++;
|
||||
leds.push_back(wheel_led);
|
||||
|
||||
if(pid == 0x0065 || pid == 0x0097)
|
||||
{
|
||||
led buttons_led;
|
||||
buttons_led.name = "Buttons";
|
||||
buttons_led.value = value;
|
||||
|
||||
leds.push_back(buttons_led);
|
||||
value++;
|
||||
}
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Logo";
|
||||
logo_led.value = value;
|
||||
|
||||
leds.push_back(logo_led);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ void RGBController_CMMonitorController::SetupZones()
|
||||
{
|
||||
led l;
|
||||
l.name = std::to_string(i + 1);
|
||||
l.value = i;
|
||||
|
||||
leds.push_back(l);
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -169,7 +169,6 @@ void RGBController_CMR6000Controller::SetupZones()
|
||||
|
||||
led GP_led;
|
||||
GP_led.name = "Logo";
|
||||
GP_led.value = 0;
|
||||
leds.push_back(GP_led);
|
||||
|
||||
SetupColors();
|
||||
|
||||
@@ -52,7 +52,7 @@ unsigned char CorsairDRAMController::GetProtocolVersion()
|
||||
|
||||
std::string CorsairDRAMController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
@@ -366,7 +366,7 @@ void CorsairDRAMController::ReadDeviceInfo()
|
||||
/*-----------------------------------------------------*\
|
||||
| Log Device Information Data |
|
||||
\*-----------------------------------------------------*/
|
||||
if(LogManager::get()->getLoglevel() >= LL_TRACE)
|
||||
if(LogManager::get()->GetLogLevel() >= LL_TRACE)
|
||||
{
|
||||
char device_info_buf[256];
|
||||
unsigned int pos;
|
||||
|
||||
@@ -44,9 +44,9 @@ bool TestForCorsairDRAMController(i2c_smbus_interface *bus, unsigned char addres
|
||||
|
||||
res = bus->i2c_smbus_read_byte_data(address, 0x44);
|
||||
|
||||
if(!(res == 0x03 || res == 0x04))
|
||||
if(!(res == 0x01 || res == 0x03 || res == 0x04))
|
||||
{
|
||||
LOG_DEBUG("[%s] Failed: expected 0x03 or 0x04, got %04X", CORSAIR_DRAM_NAME, res);
|
||||
LOG_DEBUG("[%s] Failed: expected 0x01, 0x03, or 0x04, got %04X", CORSAIR_DRAM_NAME, res);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ DetectedControllers DetectCorsairDRAMControllers(std::vector<i2c_smbus_interface
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_DRAM_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_DRAM_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
LOG_DEBUG("[%s] Testing bus %d", CORSAIR_DRAM_NAME, bus);
|
||||
|
||||
|
||||
@@ -152,8 +152,8 @@ void RGBController_CorsairV2HW::SetupZones()
|
||||
led new_led;
|
||||
|
||||
new_led.name = new_kb.GetKeyNameAt(led_idx);
|
||||
new_led.value = new_kb.GetKeyValueAt(led_idx);
|
||||
max_led_value = std::max(max_led_value, new_led.value);
|
||||
led_values.push_back(new_kb.GetKeyValueAt(led_idx));
|
||||
max_led_value = std::max(max_led_value, led_values.back());
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ void RGBController_CorsairV2HW::SetupZones()
|
||||
|
||||
new_led.name = new_zone.name + " ";
|
||||
new_led.name.append(std::to_string( led_idx ));
|
||||
new_led.value = (unsigned int)leds.size();
|
||||
led_values.push_back((unsigned int)leds.size());
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
@@ -209,7 +209,7 @@ void RGBController_CorsairV2HW::SetupZones()
|
||||
|
||||
for(size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
buffer_map[leds[led_idx].value] = &colors[led_idx];
|
||||
buffer_map[led_values[led_idx]] = &colors[led_idx];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
private:
|
||||
CorsairPeripheralV2Controller* controller;
|
||||
|
||||
std::vector<unsigned int> led_values;
|
||||
RGBColor null_color = 0;
|
||||
std::vector<RGBColor *> buffer_map;
|
||||
|
||||
|
||||
@@ -139,8 +139,8 @@ void RGBController_CorsairV2SW::SetupZones()
|
||||
led new_led;
|
||||
|
||||
new_led.name = new_kb.GetKeyNameAt(led_idx);
|
||||
new_led.value = new_kb.GetKeyValueAt(led_idx);
|
||||
max_led_value = std::max(max_led_value, new_led.value);
|
||||
led_values.push_back(new_kb.GetKeyValueAt(led_idx));
|
||||
max_led_value = std::max(max_led_value, led_values.back());
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ void RGBController_CorsairV2SW::SetupZones()
|
||||
|
||||
new_led.name = new_zone.name + " ";
|
||||
new_led.name.append(std::to_string( led_idx ));
|
||||
new_led.value = (unsigned int)leds.size();
|
||||
led_values.push_back((unsigned int)leds.size());
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
@@ -196,7 +196,7 @@ void RGBController_CorsairV2SW::SetupZones()
|
||||
|
||||
for(size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
buffer_map[leds[led_idx].value] = &colors[led_idx];
|
||||
buffer_map[led_values[led_idx]] = &colors[led_idx];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ public:
|
||||
private:
|
||||
CorsairPeripheralV2Controller* controller;
|
||||
|
||||
std::vector<unsigned int> led_values;
|
||||
RGBColor null_color = 0;
|
||||
std::vector<RGBColor *> buffer_map;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ std::string CorsairVengeanceController::GetDeviceName()
|
||||
|
||||
std::string CorsairVengeanceController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -409,7 +409,7 @@ void RGBController_CougarKeyboard::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_index];
|
||||
new_led.value = led_index;
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ CreativeSoundBlasterXG6Controller::~CreativeSoundBlasterXG6Controller()
|
||||
|
||||
std::string CreativeSoundBlasterXG6Controller::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string CreativeSoundBlasterXG6Controller::GetDeviceName()
|
||||
|
||||
@@ -35,7 +35,7 @@ std::string CrucialController::GetDeviceVersion()
|
||||
|
||||
std::string CrucialController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -145,7 +145,7 @@ DetectedControllers DetectCrucialControllers(std::vector<i2c_smbus_interface*> &
|
||||
{
|
||||
int address_list_idx = -1;
|
||||
|
||||
IF_DRAM_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_DRAM_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
for(unsigned int slot = 0; slot < 4; slot++)
|
||||
{
|
||||
@@ -182,7 +182,7 @@ DetectedControllers DetectCrucialControllers(std::vector<i2c_smbus_interface*> &
|
||||
std::this_thread::sleep_for(1ms);
|
||||
}
|
||||
|
||||
LOG_DEBUG("[%s] In bus: %02X:%02X looking for devices at [%s]", CRUCIAL_CONTROLLER_NAME, buses[bus]->pci_vendor, buses[bus]->pci_device, TESTING_ADDRESSES);
|
||||
LOG_DEBUG("[%s] In bus: %02X:%02X looking for devices at [%s]", CRUCIAL_CONTROLLER_NAME, buses[bus]->info.pci_vendor, buses[bus]->info.pci_device, TESTING_ADDRESSES);
|
||||
|
||||
// Add Crucial controllers
|
||||
for(unsigned int address_list_idx = 0; address_list_idx < CRUCIAL_ADDRESS_COUNT; address_list_idx++)
|
||||
|
||||
@@ -206,7 +206,7 @@ void RGBController_CryorigH7QuadLumi::SetupZones()
|
||||
new_led.name = zone_names[zone_idx];
|
||||
new_led.name.append(", LED ");
|
||||
new_led.name.append(std::to_string(led_idx + 1));
|
||||
new_led.value = zone_idx;
|
||||
led_values.push_back(zone_idx);
|
||||
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ void RGBController_CryorigH7QuadLumi::DeviceUpdateZoneLEDs(int zone)
|
||||
|
||||
void RGBController_CryorigH7QuadLumi::DeviceUpdateSingleLED(int led)
|
||||
{
|
||||
unsigned int zone_idx = leds[led].value;
|
||||
unsigned int zone_idx = led_values[led];
|
||||
|
||||
DeviceUpdateZoneLEDs(zone_idx);
|
||||
}
|
||||
|
||||
@@ -33,5 +33,6 @@ public:
|
||||
private:
|
||||
CryorigH7QuadLumiController* controller;
|
||||
std::vector<unsigned int> leds_channel;
|
||||
std::vector<unsigned int> led_values;
|
||||
std::vector<unsigned int> zones_channel;
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "nlohmann/json.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "DetectionManager.h"
|
||||
#include "LogManager.h"
|
||||
#include "ResourceManager.h"
|
||||
|
||||
@@ -76,7 +76,6 @@ void RGBController_DDP::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = zones[zone_idx].name + " LED " + std::to_string(led_idx + 1);
|
||||
new_led.value = 0;
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,6 @@ void RGBController_DarkProjectKeyboard::SetupZones()
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_index];
|
||||
new_led.value = led_index;
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include "KeyboardLayoutManager.h"
|
||||
#include "JsonUtils.h"
|
||||
#include "RGBController_Debug.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@@ -51,100 +52,6 @@ RGBController_Debug::RGBController_Debug(bool custom, json settings)
|
||||
custom_controller = custom;
|
||||
debug_settings = settings;
|
||||
|
||||
if(custom_controller)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Set the name |
|
||||
\*-------------------------------------------------*/
|
||||
name = debug_settings["DeviceName"];
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Find the device type |
|
||||
\*-------------------------------------------------*/
|
||||
if (debug_settings["DeviceType"] == "motherboard") type = DEVICE_TYPE_MOTHERBOARD;
|
||||
else if (debug_settings["DeviceType"] == "dram") type = DEVICE_TYPE_DRAM;
|
||||
else if (debug_settings["DeviceType"] == "gpu") type = DEVICE_TYPE_GPU;
|
||||
else if (debug_settings["DeviceType"] == "cooler") type = DEVICE_TYPE_COOLER;
|
||||
else if (debug_settings["DeviceType"] == "led_strip") type = DEVICE_TYPE_LEDSTRIP;
|
||||
else if (debug_settings["DeviceType"] == "keyboard") type = DEVICE_TYPE_KEYBOARD;
|
||||
else if (debug_settings["DeviceType"] == "mouse") type = DEVICE_TYPE_MOUSE;
|
||||
else if (debug_settings["DeviceType"] == "mousemat") type = DEVICE_TYPE_MOUSEMAT;
|
||||
else if (debug_settings["DeviceType"] == "headset") type = DEVICE_TYPE_HEADSET;
|
||||
else if (debug_settings["DeviceType"] == "headset_stand") type = DEVICE_TYPE_HEADSET_STAND;
|
||||
else if (debug_settings["DeviceType"] == "gamepad") type = DEVICE_TYPE_GAMEPAD;
|
||||
else if (debug_settings["DeviceType"] == "light") type = DEVICE_TYPE_LIGHT;
|
||||
else if (debug_settings["DeviceType"] == "speaker") type = DEVICE_TYPE_SPEAKER;
|
||||
else if (debug_settings["DeviceType"] == "unknown") type = DEVICE_TYPE_UNKNOWN;
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Set description, location, version, and serial |
|
||||
\*-------------------------------------------------*/
|
||||
description = debug_settings["DeviceDescription"];
|
||||
location = debug_settings["DeviceLocation"];
|
||||
version = debug_settings["DeviceVersion"];
|
||||
serial = debug_settings["DeviceSerial"];
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string name_setting = "";
|
||||
std::string type_setting = "keyboard";
|
||||
|
||||
if(debug_settings.contains("name"))
|
||||
{
|
||||
name_setting = debug_settings["name"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("type"))
|
||||
{
|
||||
type_setting = debug_settings["type"];
|
||||
}
|
||||
|
||||
if(type_setting == "motherboard")
|
||||
{
|
||||
name = "Debug Motherboard";
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
}
|
||||
else if(type_setting == "dram")
|
||||
{
|
||||
name = "Debug DRAM";
|
||||
type = DEVICE_TYPE_DRAM;
|
||||
}
|
||||
else if(type_setting == "gpu")
|
||||
{
|
||||
name = "Debug GPU";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
}
|
||||
else if(type_setting == "keyboard")
|
||||
{
|
||||
name = "Debug Keyboard";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
}
|
||||
else if(type_setting == "mouse")
|
||||
{
|
||||
name = "Debug Mouse";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
}
|
||||
else if(type_setting == "argb")
|
||||
{
|
||||
name = "Debug ARGB Controller";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Fill in debug controller information |
|
||||
\*---------------------------------------------------------*/
|
||||
description = name + " Device";
|
||||
vendor = name + " Vendor String";
|
||||
location = name + " Location String";
|
||||
version = name + " Version String";
|
||||
serial = name + " Serial String";
|
||||
|
||||
if(name_setting != "")
|
||||
{
|
||||
name = name_setting;
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Create the mode |
|
||||
\*-----------------------------------------------------*/
|
||||
@@ -157,6 +64,7 @@ RGBController_Debug::RGBController_Debug(bool custom, json settings)
|
||||
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupDevice();
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
@@ -165,6 +73,137 @@ RGBController_Debug::~RGBController_Debug()
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
void RGBController_Debug::SetupDevice()
|
||||
{
|
||||
if(custom_controller)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Set the name, description, location, version, and |
|
||||
| serial |
|
||||
\*-------------------------------------------------*/
|
||||
name = JsonUtils::JsonGetString(debug_settings, "DeviceName", "Custom Device");
|
||||
description = JsonUtils::JsonGetString(debug_settings, "DeviceDescription");
|
||||
location = JsonUtils::JsonGetString(debug_settings, "DeviceLocation");
|
||||
version = JsonUtils::JsonGetString(debug_settings, "DeviceVersion");
|
||||
serial = JsonUtils::JsonGetString(debug_settings, "DeviceSerial");
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Find the device type |
|
||||
\*-------------------------------------------------*/
|
||||
std::string device_type = JsonUtils::JsonGetString(debug_settings, "DeviceType", "keyboard");
|
||||
|
||||
if( device_type == "motherboard") type = DEVICE_TYPE_MOTHERBOARD;
|
||||
else if(device_type == "dram") type = DEVICE_TYPE_DRAM;
|
||||
else if(device_type == "gpu") type = DEVICE_TYPE_GPU;
|
||||
else if(device_type == "cooler") type = DEVICE_TYPE_COOLER;
|
||||
else if(device_type == "led_strip") type = DEVICE_TYPE_LEDSTRIP;
|
||||
else if(device_type == "keyboard") type = DEVICE_TYPE_KEYBOARD;
|
||||
else if(device_type == "mouse") type = DEVICE_TYPE_MOUSE;
|
||||
else if(device_type == "mousemat") type = DEVICE_TYPE_MOUSEMAT;
|
||||
else if(device_type == "headset") type = DEVICE_TYPE_HEADSET;
|
||||
else if(device_type == "headset_stand") type = DEVICE_TYPE_HEADSET_STAND;
|
||||
else if(device_type == "gamepad") type = DEVICE_TYPE_GAMEPAD;
|
||||
else if(device_type == "light") type = DEVICE_TYPE_LIGHT;
|
||||
else if(device_type == "speaker") type = DEVICE_TYPE_SPEAKER;
|
||||
else if(device_type == "unknown") type = DEVICE_TYPE_UNKNOWN;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string name_value;
|
||||
std::string name_setting = JsonUtils::JsonGetString(debug_settings, "name");
|
||||
std::string type_setting = JsonUtils::JsonGetString(debug_settings, "type", "keyboard");
|
||||
|
||||
if(type_setting == "motherboard")
|
||||
{
|
||||
name_value = "Debug Motherboard";
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
}
|
||||
else if(type_setting == "dram")
|
||||
{
|
||||
name_value = "Debug DRAM";
|
||||
type = DEVICE_TYPE_DRAM;
|
||||
}
|
||||
else if(type_setting == "gpu")
|
||||
{
|
||||
name_value = "Debug GPU";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
}
|
||||
else if(type_setting == "keyboard")
|
||||
{
|
||||
name_value = "Debug Keyboard";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
}
|
||||
else if(type_setting == "mouse")
|
||||
{
|
||||
name_value = "Debug Mouse";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
}
|
||||
else if(type_setting == "argb")
|
||||
{
|
||||
name_value = "Debug ARGB Controller";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Fill in debug controller information |
|
||||
\*---------------------------------------------------------*/
|
||||
description = name_value + " Device";
|
||||
vendor = name_value + " Vendor String";
|
||||
location = name_value + " Location String";
|
||||
version = name_value + " Version String";
|
||||
serial = name_value + " Serial String";
|
||||
flags |= CONTROLLER_FLAG_MANUALLY_CONFIGURABLE_NAME | CONTROLLER_FLAG_MANUALLY_CONFIGURABLE_DEVICE_SPECIFIC;
|
||||
|
||||
if(name_setting != "")
|
||||
{
|
||||
name_value = name_setting;
|
||||
}
|
||||
|
||||
if((flags & CONTROLLER_FLAG_MANUALLY_CONFIGURED_NAME) == 0)
|
||||
{
|
||||
name = name_value;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Create test configuration |
|
||||
\*---------------------------------------------------------*/
|
||||
nlohmann::json configuration_json;
|
||||
JsonUtils::JsonParse(configuration, configuration_json);
|
||||
|
||||
configuration_json["schema"]["test_string"]["title"] = "String Setting";
|
||||
configuration_json["schema"]["test_string"]["type"] = "string";
|
||||
|
||||
configuration_json["schema"]["test_bool"]["title"] = "Boolean Setting";
|
||||
configuration_json["schema"]["test_bool"]["type"] = "bool";
|
||||
|
||||
configuration_json["schema"]["test_enum"]["title"] = "String Enum Setting";
|
||||
configuration_json["schema"]["test_enum"]["type"] = "string";
|
||||
configuration_json["schema"]["test_enum"]["enum"][0] = "Option 1";
|
||||
configuration_json["schema"]["test_enum"]["enum"][1] = "Option 2";
|
||||
configuration_json["schema"]["test_enum"]["enum"][2] = "Option 3";
|
||||
|
||||
configuration_json["schema"]["test_enum_int"]["title"] = "Integer Enum Setting";
|
||||
configuration_json["schema"]["test_enum_int"]["type"] = "integer";
|
||||
configuration_json["schema"]["test_enum_int"]["enum"][0] = 2;
|
||||
configuration_json["schema"]["test_enum_int"]["enum"][1] = 4;
|
||||
configuration_json["schema"]["test_enum_int"]["enum"][2] = 8;
|
||||
|
||||
configuration_json["schema"]["test_int"]["title"] = "Integer Setting";
|
||||
configuration_json["schema"]["test_int"]["type"] = "integer";
|
||||
|
||||
if((flags & CONTROLLER_FLAG_MANUALLY_CONFIGURED_DEVICE_SPECIFIC) == 0)
|
||||
{
|
||||
configuration_json["configuration"]["test_string"] = "This is a test";
|
||||
configuration_json["configuration"]["test_bool"] = true;
|
||||
configuration_json["configuration"]["test_enum"] = "Option 2";
|
||||
configuration_json["configuration"]["test_enum_int"] = 4;
|
||||
configuration_json["configuration"]["test_int"] = 12345;
|
||||
}
|
||||
|
||||
configuration = configuration_json.dump();
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_Debug::SetupZones()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
@@ -181,6 +220,7 @@ void RGBController_Debug::SetupZones()
|
||||
/*-------------------------------------------------*\
|
||||
| Clear any existing color/LED configuration |
|
||||
\*-------------------------------------------------*/
|
||||
led_display_names.clear();
|
||||
leds.clear();
|
||||
colors.clear();
|
||||
|
||||
@@ -216,9 +256,9 @@ void RGBController_Debug::SetupZones()
|
||||
continue;
|
||||
}
|
||||
|
||||
custom_zone.leds_min = ZoneJson["leds_min"];
|
||||
custom_zone.leds_max = ZoneJson["leds_max"];
|
||||
custom_zone.leds_count = ZoneJson["leds_count"];
|
||||
custom_zone.leds_min = JsonUtils::JsonGetInt(ZoneJson, "leds_min");
|
||||
custom_zone.leds_max = JsonUtils::JsonGetInt(ZoneJson, "leds_max");
|
||||
custom_zone.leds_count = JsonUtils::JsonGetInt(ZoneJson, "leds_count");
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Fill in the matrix map |
|
||||
@@ -241,8 +281,8 @@ void RGBController_Debug::SetupZones()
|
||||
continue;
|
||||
}
|
||||
|
||||
unsigned int H = ZoneJson["matrix_width"];
|
||||
unsigned int W = ZoneJson["matrix_height"];
|
||||
unsigned int H = JsonUtils::JsonGetInt(ZoneJson, "matrix_width");
|
||||
unsigned int W = JsonUtils::JsonGetInt(ZoneJson, "matrix_height");
|
||||
|
||||
BadVal = ((unsigned int)ZoneJson["matrix_map"].size() != H);
|
||||
|
||||
@@ -333,36 +373,11 @@ void RGBController_Debug::SetupZones()
|
||||
}
|
||||
else
|
||||
{
|
||||
bool zone_single = true;
|
||||
bool zone_linear = true;
|
||||
bool zone_resizable = false;
|
||||
bool zone_keyboard = false;
|
||||
bool zone_underglow = false;
|
||||
|
||||
if(debug_settings.contains("single"))
|
||||
{
|
||||
zone_single = debug_settings["single"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("linear"))
|
||||
{
|
||||
zone_linear = debug_settings["linear"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("resizable"))
|
||||
{
|
||||
zone_resizable = debug_settings["resizable"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("keyboard"))
|
||||
{
|
||||
zone_keyboard = debug_settings["keyboard"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("underglow"))
|
||||
{
|
||||
zone_underglow = debug_settings["underglow"];
|
||||
}
|
||||
bool zone_single = JsonUtils::JsonGetBool(debug_settings, "single", true);
|
||||
bool zone_linear = JsonUtils::JsonGetBool(debug_settings, "linear", true);
|
||||
bool zone_resizable = JsonUtils::JsonGetBool(debug_settings, "resizable", false);
|
||||
bool zone_keyboard = JsonUtils::JsonGetBool(debug_settings, "keyboard", false);
|
||||
bool zone_underglow = JsonUtils::JsonGetBool(debug_settings, "underglow", false);
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Create a single zone/LED |
|
||||
@@ -371,28 +386,51 @@ void RGBController_Debug::SetupZones()
|
||||
{
|
||||
zone single_zone;
|
||||
|
||||
single_zone.name = "Single Zone";
|
||||
single_zone.type = ZONE_TYPE_SINGLE;
|
||||
single_zone.leds_min = 1;
|
||||
single_zone.leds_max = 1;
|
||||
single_zone.leds_count = 1;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones.push_back(single_zone);
|
||||
}
|
||||
else
|
||||
|
||||
zones[zone_idx].name = "Single Zone";
|
||||
zones[zone_idx].type = ZONE_TYPE_SINGLE;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[zone_idx] = single_zone;
|
||||
zones[zone_idx].flags = ZONE_FLAG_MANUALLY_CONFIGURABLE_DEVICE_SPECIFIC;
|
||||
}
|
||||
|
||||
zones[zone_idx].leds_min = 1;
|
||||
zones[zone_idx].leds_max = 1;
|
||||
zones[zone_idx].leds_count = 1;
|
||||
|
||||
led single_led;
|
||||
|
||||
single_led.name = "Single LED";
|
||||
|
||||
leds.push_back(single_led);
|
||||
|
||||
led_alt_names.push_back("");
|
||||
led_display_names.push_back("");
|
||||
|
||||
nlohmann::json configuration_json;
|
||||
JsonUtils::JsonParse(configuration, configuration_json);
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
/*-----------------------------------------*\
|
||||
| Create test configuration |
|
||||
\*-----------------------------------------*/
|
||||
configuration_json["zones"][zone_idx]["schema"]["color_order"]["title"] = "Color Order";
|
||||
configuration_json["zones"][zone_idx]["schema"]["color_order"]["type"] = "string";
|
||||
configuration_json["zones"][zone_idx]["schema"]["color_order"]["enum"][0] = "RGB";
|
||||
configuration_json["zones"][zone_idx]["schema"]["color_order"]["enum"][1] = "GRB";
|
||||
}
|
||||
|
||||
if((zones[zone_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_DEVICE_SPECIFIC) == 0)
|
||||
{
|
||||
configuration_json["zones"][zone_idx]["configuration"]["color_order"] = "RGB";
|
||||
}
|
||||
|
||||
configuration = configuration_json.dump();
|
||||
|
||||
zone_idx++;
|
||||
}
|
||||
@@ -404,22 +442,18 @@ void RGBController_Debug::SetupZones()
|
||||
{
|
||||
zone linear_zone;
|
||||
|
||||
linear_zone.name = "Linear Zone";
|
||||
linear_zone.type = ZONE_TYPE_LINEAR;
|
||||
linear_zone.leds_min = 10;
|
||||
linear_zone.leds_max = 10;
|
||||
linear_zone.leds_count = 10;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones.push_back(linear_zone);
|
||||
}
|
||||
else
|
||||
{
|
||||
zones[zone_idx] = linear_zone;
|
||||
}
|
||||
|
||||
for(std::size_t led_idx = 0; led_idx < 10; led_idx++)
|
||||
zones[zone_idx].name = "Linear Zone";
|
||||
zones[zone_idx].type = ZONE_TYPE_LINEAR;
|
||||
zones[zone_idx].leds_min = 10;
|
||||
zones[zone_idx].leds_max = 10;
|
||||
zones[zone_idx].leds_count = 10;
|
||||
|
||||
for(std::size_t led_idx = 0; led_idx < zones[zone_idx].leds_count; led_idx++)
|
||||
{
|
||||
led linear_led;
|
||||
|
||||
@@ -427,7 +461,7 @@ void RGBController_Debug::SetupZones()
|
||||
|
||||
leds.push_back(linear_led);
|
||||
|
||||
led_alt_names.push_back("");
|
||||
led_display_names.push_back("");
|
||||
}
|
||||
|
||||
zone_idx++;
|
||||
@@ -441,6 +475,24 @@ void RGBController_Debug::SetupZones()
|
||||
KEYBOARD_LAYOUT layout = KEYBOARD_LAYOUT::KEYBOARD_LAYOUT_ANSI_QWERTY;
|
||||
KEYBOARD_SIZE size = KEYBOARD_SIZE::KEYBOARD_SIZE_FULL;
|
||||
|
||||
nlohmann::json configuration_json;
|
||||
JsonUtils::JsonParse(configuration, configuration_json);
|
||||
|
||||
zone keyboard_zone;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones.push_back(keyboard_zone);
|
||||
}
|
||||
|
||||
zones[zone_idx].name = "Keyboard Zone";
|
||||
zones[zone_idx].type = ZONE_TYPE_MATRIX;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[zone_idx].flags = ZONE_FLAG_MANUALLY_CONFIGURABLE_DEVICE_SPECIFIC | ZONE_FLAG_ZONE_GEOMETRY_MAY_CHANGE;
|
||||
}
|
||||
|
||||
if(debug_settings.contains("layout"))
|
||||
{
|
||||
KEYBOARD_LAYOUT temp_layout = debug_settings["layout"];
|
||||
@@ -451,6 +503,29 @@ void RGBController_Debug::SetupZones()
|
||||
}
|
||||
}
|
||||
|
||||
if(zones[zone_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_DEVICE_SPECIFIC)
|
||||
{
|
||||
if(configuration_json.contains("zones") && (zone_idx < (int)configuration_json["zones"].size()))
|
||||
{
|
||||
if(configuration_json["zones"][zone_idx].contains("configuration"))
|
||||
{
|
||||
if(configuration_json["zones"][zone_idx]["configuration"].contains("layout"))
|
||||
{
|
||||
std::string layout_string = configuration_json["zones"][zone_idx]["configuration"]["layout"];
|
||||
|
||||
for(std::size_t layout_idx = 0; layout_idx < NUM_LAYOUTS; layout_idx++)
|
||||
{
|
||||
if(layout_names[layout_idx] == layout_string)
|
||||
{
|
||||
layout = (KEYBOARD_LAYOUT)layout_idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(debug_settings.contains("size"))
|
||||
{
|
||||
size = debug_settings["size"];
|
||||
@@ -458,8 +533,6 @@ void RGBController_Debug::SetupZones()
|
||||
|
||||
KeyboardLayoutManager new_kb(layout, size);
|
||||
|
||||
description += ", Layout: " + layout_names[layout] + ", Size: " + new_kb.GetName();
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Check for custom key inserts and swaps |
|
||||
\*---------------------------------------------*/
|
||||
@@ -518,25 +591,12 @@ void RGBController_Debug::SetupZones()
|
||||
new_kb.ChangeKeys(change);
|
||||
}
|
||||
|
||||
zone keyboard_zone;
|
||||
zones[zone_idx].leds_min = new_kb.GetKeyCount();
|
||||
zones[zone_idx].leds_max = new_kb.GetKeyCount();
|
||||
zones[zone_idx].leds_count = new_kb.GetKeyCount();
|
||||
zones[zone_idx].matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
|
||||
keyboard_zone.name = "Keyboard Zone";
|
||||
keyboard_zone.type = ZONE_TYPE_MATRIX;
|
||||
keyboard_zone.leds_min = new_kb.GetKeyCount();
|
||||
keyboard_zone.leds_max = new_kb.GetKeyCount();
|
||||
keyboard_zone.leds_count = new_kb.GetKeyCount();
|
||||
keyboard_zone.matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones.push_back(keyboard_zone);
|
||||
}
|
||||
else
|
||||
{
|
||||
zones[zone_idx] = keyboard_zone;
|
||||
}
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < keyboard_zone.leds_count; led_idx++)
|
||||
for(unsigned int led_idx = 0; led_idx < zones[zone_idx].leds_count; led_idx++)
|
||||
{
|
||||
led keyboard_led;
|
||||
|
||||
@@ -544,9 +604,31 @@ void RGBController_Debug::SetupZones()
|
||||
|
||||
leds.push_back(keyboard_led);
|
||||
|
||||
led_alt_names.push_back(new_kb.GetKeyAltNameAt(led_idx));
|
||||
led_display_names.push_back(new_kb.GetKeyAltNameAt(led_idx));
|
||||
}
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
/*-----------------------------------------*\
|
||||
| Create test configuration |
|
||||
\*-----------------------------------------*/
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["title"] = "Layout";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["type"] = "string";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][0] = "Default",
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][1] = "ANSI QWERTY";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][2] = "ISO QWERTY";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][3] = "ISO QWERTZ";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][4] = "ISO AZERTY";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][5] = "JIS";
|
||||
}
|
||||
|
||||
if((zones[zone_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_DEVICE_SPECIFIC) == 0)
|
||||
{
|
||||
configuration_json["zones"][zone_idx]["configuration"]["layout"] = "Default";
|
||||
}
|
||||
|
||||
configuration = configuration_json.dump();
|
||||
|
||||
zone_idx++;
|
||||
}
|
||||
|
||||
@@ -581,7 +663,7 @@ void RGBController_Debug::SetupZones()
|
||||
|
||||
leds.push_back(underglow_led);
|
||||
|
||||
led_alt_names.push_back("");
|
||||
led_display_names.push_back("");
|
||||
}
|
||||
|
||||
zone_idx++;
|
||||
@@ -637,7 +719,7 @@ void RGBController_Debug::SetupZones()
|
||||
|
||||
leds.push_back(resizable_led);
|
||||
|
||||
led_alt_names.push_back("");
|
||||
led_display_names.push_back("");
|
||||
}
|
||||
|
||||
zone_idx++;
|
||||
@@ -647,6 +729,11 @@ void RGBController_Debug::SetupZones()
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_Debug::DeviceConfigureDevice()
|
||||
{
|
||||
SetupDevice();
|
||||
}
|
||||
|
||||
void RGBController_Debug::DeviceConfigureZone(int zone_idx)
|
||||
{
|
||||
if((size_t)zone_idx < zones.size())
|
||||
@@ -674,3 +761,13 @@ void RGBController_Debug::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_Debug::DeviceUpdateDeviceSpecificConfiguration()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_Debug::DeviceUpdateDeviceSpecificZoneConfiguration(int zone)
|
||||
{
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
@@ -23,8 +23,10 @@ public:
|
||||
RGBController_Debug(bool custom, json settings);
|
||||
~RGBController_Debug();
|
||||
|
||||
void SetupDevice();
|
||||
void SetupZones();
|
||||
|
||||
void DeviceConfigureDevice();
|
||||
void DeviceConfigureZone(int zone_idx);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
@@ -33,6 +35,9 @@ public:
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
void DeviceUpdateDeviceSpecificConfiguration();
|
||||
void DeviceUpdateDeviceSpecificZoneConfiguration(int zone);
|
||||
|
||||
private:
|
||||
json debug_settings;
|
||||
bool custom_controller;
|
||||
|
||||
@@ -235,8 +235,7 @@ void RGBController_E131::SetupZones()
|
||||
led_zone.leds_count = devices[zone_idx].num_leds;
|
||||
led_zone.flags = ZONE_FLAG_MANUALLY_CONFIGURABLE_TYPE
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_MATRIX_MAP
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_SEGMENTS
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_COLOR_ORDER;
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_SEGMENTS;
|
||||
|
||||
zones.push_back(led_zone);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ ENESMBusController::ENESMBusController(ENESMBusInterface* interface, ene_dev_id
|
||||
| If this is running with TRACE or higher loglevel |
|
||||
| then dump the entire Feature list to log |
|
||||
\*-------------------------------------------------*/
|
||||
if(LogManager::get()->getLoglevel() >= LL_TRACE)
|
||||
if(LogManager::get()->GetLogLevel() >= LL_TRACE)
|
||||
{
|
||||
LOG_TRACE("[ENE SMBus] ENE config table for 0x%02X:", dev);
|
||||
LOG_TRACE(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X", config_table[0], config_table[1], config_table[2], config_table[3],
|
||||
|
||||
@@ -154,7 +154,7 @@ DetectedControllers DetectENESMBusDRAMControllers(std::vector<i2c_smbus_interfac
|
||||
{
|
||||
int address_list_idx = -1;
|
||||
|
||||
IF_DRAM_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_DRAM_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
LOG_DEBUG("[ENE SMBus DRAM] Remapping ENE SMBus RAM modules on 0x77");
|
||||
|
||||
@@ -220,9 +220,9 @@ DetectedControllers DetectENESMBusMotherboardControllers(std::vector<i2c_smbus_i
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
// Add ENE (ASUS Aura) motherboard controllers
|
||||
IF_MOBO_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(buses[bus]->pci_subsystem_vendor == ASUS_SUB_VEN || buses[bus]->pci_subsystem_vendor == 0 || buses[bus]->pci_subsystem_vendor == 0xFFFF)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == ASUS_SUB_VEN || buses[bus]->info.pci_subsystem_vendor == 0 || buses[bus]->info.pci_subsystem_vendor == 0xFFFF)
|
||||
{
|
||||
for(unsigned int address_list_idx = 0; address_list_idx < AURA_MOBO_ADDRESS_COUNT; address_list_idx++)
|
||||
{
|
||||
@@ -302,6 +302,7 @@ REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 3060 Ti Gaming OC",
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3060 Ti OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3060TI_O8G_OC, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 3060 Ti OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_3060TI_O8G_OC_V2, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3060 Ti V2 OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3060TI_O8G_V2_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3060 Ti V2 OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3060TI_O8G_V2_2_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3070 OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3070_OC, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3070 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3070_O8G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3070 White OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3070_O8G_WHITE, 0x67);
|
||||
@@ -409,8 +410,10 @@ REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 4090 Gaming White",
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 4090 Gaming White OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_4090_O24G_GAMING_WHITE, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 4090 Gaming White OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_4090_O24G_GAMING_WHITE_2, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG MATRIX PLATINUM GeForce RTX 4090", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, ASUS_SUB_VEN, ASUS_ROG_MATRIX_PLATINUM_RTX_4090_24G, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5070 Gaming", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5070_O12G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5060 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5060_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5060_O8G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5070 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5070_O12G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5070 Ti Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5070TI_O16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5070 Ti Gaming White OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5070TI_O16G_GAMING_WHITE, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 5070 Ti Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_5070TI_O16G_GAMING_OC, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5080 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5080_O16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5090 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5090_O32G_GAMING, 0x67);
|
||||
@@ -418,6 +421,7 @@ REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5090 Gaming",
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG ASTRAL GeForce RTX 5080 OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, ASUS_SUB_VEN, ASUS_ROG_ASTRAL_RTX_5080_O16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG ASTRAL GeForce RTX 5080 OC WHITE", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, ASUS_SUB_VEN, ASUS_ROG_ASTRAL_RTX_5080_O16G_GAMING_WHITE, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG ASTRAL GeForce RTX 5080", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, ASUS_SUB_VEN, ASUS_ROG_ASTRAL_RTX_5080_16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG ASTRAL GeForce RTX 5080 WHITE", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, ASUS_SUB_VEN, ASUS_ROG_ASTRAL_RTX_5080_16G_GAMING_WHITE, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG ASTRAL GeForce RTX 5090 OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, ASUS_SUB_VEN, ASUS_ROG_ASTRAL_RTX_5090_O32G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG ASTRAL GeForce RTX 5090 OC BTF", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, ASUS_SUB_VEN, ASUS_ROG_ASTRAL_RTX_5090_O32G_GAMING_BTF, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG ASTRAL GeForce RTX 5090 OC WHITE", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, ASUS_SUB_VEN, ASUS_ROG_ASTRAL_RTX_5090_O32G_GAMING_WHITE, 0x67);
|
||||
@@ -448,6 +452,7 @@ REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7700 XT Gaming OC",
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7800 XT Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI32_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7800XT_O16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7800 XT Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI32_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7800XT_O16G_GAMING_0606, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7800 XT Gaming White OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI32_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7800XT_O16G_WHITE_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7900 GRE Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI31_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7900GRE_O16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7900 XT Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI31_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7900XT_020G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7900 XTX Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI31_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7900XTX_O24G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 9070 Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI48_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_9070_016G_GAMING, 0x67);
|
||||
|
||||
@@ -28,7 +28,7 @@ ene_interface_type ENESMBusInterface_i2c_smbus::GetInterfaceType()
|
||||
|
||||
std::string ENESMBusInterface_i2c_smbus::GetLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
return("I2C: " + return_string);
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ int RGBController_ENESMBus::GetDeviceMode()
|
||||
\*---------------------------------------------------------*/
|
||||
for(std::size_t led_idx = 0; led_idx < leds.size(); led_idx++)
|
||||
{
|
||||
unsigned int led = leds[led_idx].value;
|
||||
unsigned int led = led_values[led_idx];
|
||||
unsigned char red;
|
||||
unsigned char grn;
|
||||
unsigned char blu;
|
||||
@@ -306,7 +306,7 @@ void RGBController_ENESMBus::DeviceUpdateZoneLEDs(int zone)
|
||||
{
|
||||
for(std::size_t led_idx = 0; led_idx < zones[zone].leds_count; led_idx++)
|
||||
{
|
||||
int led = zones[zone].leds[led_idx].value;
|
||||
int led = led_values[zones[zone].start_idx + led_idx];
|
||||
RGBColor color = colors[led];
|
||||
unsigned char red = RGBGetRValue(color);
|
||||
unsigned char grn = RGBGetGValue(color);
|
||||
@@ -435,7 +435,7 @@ void RGBController_ENESMBus::SetupZones()
|
||||
new_led->name = zones[zone_idx].name + " LED ";
|
||||
new_led->name.append(std::to_string(zone_led_idx + 1));
|
||||
|
||||
new_led->value = led_idx;
|
||||
led_values.push_back(led_idx);
|
||||
led_idx++;
|
||||
|
||||
leds.push_back(*new_led);
|
||||
|
||||
@@ -30,7 +30,8 @@ public:
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
ENESMBusController* controller;
|
||||
ENESMBusController* controller;
|
||||
std::vector<unsigned int> led_values;
|
||||
|
||||
int GetDeviceMode();
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ DetectedControllers DetectEVGAAmpereGPUControllers(i2c_smbus_interface* bus, uin
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
EVGAGPUv3Controller* controller;
|
||||
RGBController_EVGAGPUv3* rgb_controller;
|
||||
|
||||
@@ -26,7 +26,7 @@ EVGAGPUv3Controller::~EVGAGPUv3Controller()
|
||||
|
||||
std::string EVGAGPUv3Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
|
||||
@@ -25,7 +25,7 @@ EVGAGP102Controller::~EVGAGP102Controller()
|
||||
|
||||
std::string EVGAGP102Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", zi.dev_addr);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -21,7 +21,7 @@ DetectedControllers DetectEVGAGP102GPUControllers(i2c_smbus_interface* bus, uint
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
std::vector<EVGAGP102Controller*> controllers;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ EVGAGPUv1Controller::~EVGAGPUv1Controller()
|
||||
|
||||
std::string EVGAGPUv1Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -20,7 +20,7 @@ DetectedControllers DetectEVGAPascalGPUControllers(i2c_smbus_interface* bus, uin
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
EVGAGPUv1Controller* controller = new EVGAGPUv1Controller(bus, address, name);
|
||||
RGBController_EVGAGPUv1* rgb_controller = new RGBController_EVGAGPUv1(controller);
|
||||
|
||||
@@ -32,7 +32,7 @@ EVGAACX30SMBusController::~EVGAACX30SMBusController()
|
||||
|
||||
std::string EVGAACX30SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -46,9 +46,9 @@ DetectedControllers DetectAcx30SMBusControllers(std::vector<i2c_smbus_interface
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_MOBO_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(buses[bus]->pci_subsystem_vendor == EVGA_SUB_VEN)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == EVGA_SUB_VEN)
|
||||
{
|
||||
LOG_DEBUG(SMBUS_CHECK_DEVICE_MESSAGE_EN, EVGA_DETECTOR_NAME, bus, VENDOR_NAME, SMBUS_ADDRESS);
|
||||
// Check for ACX 30 controller at 0x28
|
||||
|
||||
@@ -25,7 +25,7 @@ EVGAGPUv2Controller::~EVGAGPUv2Controller()
|
||||
|
||||
std::string EVGAGPUv2Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
|
||||
@@ -19,7 +19,7 @@ DetectedControllers DetectEVGATuringGPUControllers(i2c_smbus_interface* bus, uin
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
EVGAGPUv2Controller* controller = new EVGAGPUv2Controller(bus, address, name);
|
||||
RGBController_EVGAGPUv2* rgb_controller = new RGBController_EVGAGPUv2(controller);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user