Compare commits

..
Author SHA1 Message Date
Adam Honse e3e0f1a6a5 Get rid of zone_based_per_led_data buffer, just use the same configuration buffer for both as it overwrites the original configuration when written to the controller anyways 2026-09-06 20:54:37 -05:00
Adam Honse 63b780ee80 Fix update calls 2026-09-06 19:54:33 -05:00
Adam Honse b9068ccf68 Move mode setting to DeviceUpdateMode and leave LED setting to DeviceUpdateLEDs 2026-09-06 19:42:00 -05:00
Adam Honse 58140eed82 Test: try per-led mode on 7B93 after firmware update 2026-09-06 16:30:01 -05:00
Adam Honse 7acaf2d12d Zero out the Per-LED enable message buffer rather than initialize it from the configuration data 2026-09-06 16:05:03 -05:00
Adam Honse 717c257d8e More cleanup 2026-09-06 15:34:12 -05:00
Adam Honse c03d422b32 Fix Update 2026-09-06 13:46:35 -05:00
Adam Honse b3fa0c1b96 Remove zone checks 2026-09-06 04:33:33 -05:00
Adam Honse 8a9fe3f5bb Test fixes 2026-09-06 03:38:42 -05:00
Adam Honse b60084be2e Undo changes to per-LED switching messages 2026-09-06 02:23:33 -05:00
Adam Honse a5eb5a4d53 Add comments to better describe the functionality 2026-09-06 01:41:56 -05:00
Adam Honse 46d24fd9bc Add board filtering by name for boards with duplicate PIDs, add zone supported checks before modifying the zone blocks for any zone in the settings 2026-09-05 20:45:06 -05:00
Adam Honse b15358582f Treat 7C56 as B550-A PRO which does not have onboard LEDs 2026-09-05 19:57:12 -05:00
Adam Honse 81e0ea5cfa Add trace level settings packet log to MSI 185 controller 2026-09-05 18:47:20 -05:00
78 changed files with 2236 additions and 2334 deletions
-158
View File
@@ -1,158 +0,0 @@
/*---------------------------------------------------------*\
| AutoStart-Flatpak.cpp |
| |
| Autostart implementation for Linux via Flatpak Portal |
| |
| Adam Honse <[email protected]> 04 Sep 2026 |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "AutoStart-Flatpak.h"
#include <gio/gio.h>
AutoStart::AutoStart(std::string name)
{
InitAutoStart(name);
}
void AutoStart::InitAutoStart(std::string name)
{
app_name = name;
}
bool AutoStart::CallBackgroundPortal(bool enable, const AutoStartInfo& autostart_info)
{
GError* error = nullptr;
GDBusConnection* connection = g_bus_get_sync(G_BUS_TYPE_SESSION, nullptr, &error);
if(!connection)
{
if(error)
{
g_error_free(error);
}
return false;
}
/*-----------------------------------------------------*\
| FreeDesktop Background Portal parameters |
\*-----------------------------------------------------*/
const char* bus_name = "org.freedesktop.portal.Desktop";
const char* object_path = "/org/freedesktop/portal/desktop";
const char* interface_name = "org.freedesktop.portal.Background";
const char* method_name = "RequestBackground";
/*-----------------------------------------------------*\
| Build the options dictionary (vardict) required by |
| the Portal |
\*-----------------------------------------------------*/
GVariantBuilder options_builder;
g_variant_builder_init(&options_builder, G_VARIANT_TYPE_VARDICT);
/*-----------------------------------------------------*\
| Reason shown to the user in the system settings / |
| permission prompt |
\*-----------------------------------------------------*/
std::string reason_str = "Allow " + app_name + " to launch automatically at startup.";
g_variant_builder_add(&options_builder, "{sv}", "reason", g_variant_new_string(reason_str.c_str()));
/*-----------------------------------------------------*\
| Toggle the autostart feature state |
\*-----------------------------------------------------*/
g_variant_builder_add(&options_builder, "{sv}", "autostart", g_variant_new_boolean(enable));
if(enable)
{
/*-------------------------------------------------*\
| Pass command-line arguments to the background |
| request |
\*-------------------------------------------------*/
GVariantBuilder arg_builder;
g_variant_builder_init(&arg_builder, G_VARIANT_TYPE("as"));
/*-------------------------------------------------*\
| Add the primary executable path inside the |
| Flatpak sandbox |
\*-------------------------------------------------*/
g_variant_builder_add(&arg_builder, "s", GetExePath().c_str());
/*-------------------------------------------------*\
| Append any additional arguments provided by |
| OpenRGB's autostart config |
\*-------------------------------------------------*/
if(!autostart_info.args.empty())
{
g_variant_builder_add(&arg_builder, "s", autostart_info.args.c_str());
}
GVariant* commandline_args = g_variant_builder_end(&arg_builder);
g_variant_builder_add(&options_builder, "{sv}", "commandline", commandline_args);
}
/*-----------------------------------------------------*\
| An empty string window handle is used since this is a |
| background configuration request |
\*-----------------------------------------------------*/
const char* parent_window = "";
GVariant* options = g_variant_builder_end(&options_builder);
/*-----------------------------------------------------*\
| Bundle parameters: (s a{sv}) -> Parent window handle, |
| Options dictionary |
\*-----------------------------------------------------*/
GVariant* parameters = g_variant_new("(s@a{sv})", parent_window, options);
GVariant* reply;
reply = g_dbus_connection_call_sync(connection, bus_name, object_path, interface_name, method_name, parameters, G_VARIANT_TYPE("(o)"), G_DBUS_CALL_FLAGS_NONE, -1, nullptr, &error);
g_object_unref(connection);
if(error)
{
g_error_free(error);
return false;
}
if(reply)
{
g_variant_unref(reply);
return true;
}
return false;
}
bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info)
{
return CallBackgroundPortal(true, autostart_info);
}
bool AutoStart::DisableAutoStart()
{
return CallBackgroundPortal(false);
}
bool AutoStart::IsAutoStartEnabled()
{
/*-----------------------------------------------------*\
| The FreeDesktop Background Portal does not provide a |
| stateless status getter. Sandbox permissions are |
| securely managed and persisted internally by the |
| host's portal service. To implement a true state |
| track here, OpenRGB will need to manage a local |
| boolean flag inside its own configuration files (e.g. |
| OpenRGB.json). |
\*-----------------------------------------------------*/
return false;
}
std::string AutoStart::GetExePath()
{
/*-----------------------------------------------------*\
| Flatpak applications always run from this specific |
| exported path hierarchy |
\*-----------------------------------------------------*/
return "/app/bin/openrgb";
}
-31
View File
@@ -1,31 +0,0 @@
/*---------------------------------------------------------*\
| AutoStart-Flatpak.h |
| |
| Autostart implementation for Linux via Flatpak Portal |
| |
| Adam Honse <[email protected]> 04 Sep 2026 |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include <string>
#include "AutoStart.h"
class AutoStart : public AutoStartInterface
{
public:
AutoStart(std::string name);
bool DisableAutoStart();
bool EnableAutoStart(AutoStartInfo autostart_info);
bool IsAutoStartEnabled();
std::string GetExePath();
private:
void InitAutoStart(std::string name);
bool CallBackgroundPortal(bool enable, const AutoStartInfo& autostart_info = {});
std::string app_name;
};
-6
View File
@@ -40,15 +40,9 @@ protected:
#include "AutoStart-Windows.h"
#endif
#ifdef FLATPAK_BUILD
#include "AutoStart-Flatpak.h"
#endif
#ifdef __linux__
#ifndef FLATPAK_BUILD
#include "AutoStart-Linux.h"
#endif
#endif
#ifdef __APPLE__
#include "AutoStart-MacOS.h"
@@ -41,6 +41,5 @@ DetectedControllers DetectASRockGPUSMBusControllers(i2c_smbus_interface* bus, ui
return(detected_controllers);
}
REGISTER_I2C_PCI_DETECTOR("ASRock Radeon RX 9070 XT Steel Legend", DetectASRockGPUSMBusControllers, AMD_GPU_VEN, AMD_NAVI48_DEV, ASROCK_SUB_VEN, 0x5403, ASROCK_GPU_SMBUS_ADDRESS);
REGISTER_I2C_PCI_DETECTOR("ASRock Radeon RX 9070 XT Taichi 16GB OC", DetectASRockGPUSMBusControllers, AMD_GPU_VEN, AMD_NAVI48_DEV, ASROCK_SUB_VEN, 0x5401, ASROCK_GPU_SMBUS_ADDRESS);
REGISTER_I2C_PCI_DETECTOR("ASRock Radeon RX 9060 XT Steel Legend", DetectASRockGPUSMBusControllers, AMD_GPU_VEN, AMD_NAVI44_DEV, ASROCK_SUB_VEN, 0x5407, ASROCK_GPU_SMBUS_ADDRESS);
REGISTER_I2C_PCI_DETECTOR("ASRock Radeon RX 9070 XT Steel Legend", DetectASRockGPUSMBusControllers, AMD_GPU_VEN, AMD_NAVI48_DEV, ASROCK_SUB_VEN, 0x5403, ASROCK_GPU_SMBUS_ADDRESS);
REGISTER_I2C_PCI_DETECTOR("ASRock Radeon RX 9060 XT Steel Legend", DetectASRockGPUSMBusControllers, AMD_GPU_VEN, AMD_NAVI44_DEV, ASROCK_SUB_VEN, 0x5407, ASROCK_GPU_SMBUS_ADDRESS);
@@ -32,7 +32,6 @@ static const std::map<alienware_platform_id, uint8_t> zone_quirks_table =
{ 0x0C01, 4 }, // Dell G5 SE 5505
{ 0x0A01, 16 }, // Dell G7 15 7500
{ 0x0E03, 4 }, // Dell G15 5511
{ 0x0E07, 4 }, // Dell G15 5520
{ 0x0E0A, 4 } // Dell G15 5530
};
@@ -50,21 +49,9 @@ static const std::map<alienware_platform_id, std::vector<const char*>> zone_name
"Light Bar 7", "Light Bar 8", "Light Bar 9",
"Light Bar 10", "Light Bar 11", "Light Bar 12" } },
{ 0x0E03, { "Left", "Middle", "Right", "Numpad" } },
{ 0x0E07, { "Left", "Middle", "Right", "Numpad" } },
{ 0x0E0A, { "Left", "Middle", "Right", "Numpad" } }
};
/*---------------------------------------------------------*\
| Mapping the platform ID to the actual hardware zone IDs |
\*---------------------------------------------------------*/
static const std::map<alienware_platform_id, std::vector<uint8_t>> zone_ids_table =
{
{ 0x0C01, { 0x00, 0x01, 0x02, 0x03 } }, // Dell G5 SE 5505
{ 0x0E03, { 0x00, 0x01, 0x02, 0x03 } }, // Dell G15 5511
{ 0x0E07, { 0x10, 0x11, 0x12, 0x13 } }, // Dell G15 5520
{ 0x0E0A, { 0x10, 0x11, 0x12, 0x13 } } // Dell G15 5530
};
static void SendHIDReport(hid_device *dev, const unsigned char* usb_buf, size_t usb_buf_size)
{
using namespace std::chrono_literals;
@@ -151,21 +138,6 @@ AlienwareController::AlienwareController(hid_device* dev_handle, const hid_devic
}
}
/*-----------------------------------------------------*\
| Initialize hardware zone IDs |
\*-----------------------------------------------------*/
if(zone_ids_table.count(platform_id))
{
zone_ids = zone_ids_table.at(platform_id);
}
else
{
for(size_t i = 0; i < number_of_zones; i++)
{
zone_ids.push_back(static_cast<uint8_t>(i));
}
}
/*-----------------------------------------------------*\
| Set defaults for all zones |
| It doesn't seem possible to read the controller's |
@@ -183,7 +155,6 @@ AlienwareController::AlienwareController(hid_device* dev_handle, const hid_devic
zones[zone_idx].period = 2000;
zones[zone_idx].tempo = ALIENWARE_TEMPO_MAX;
zones[zone_idx].dim = 0;
zones[zone_idx].direction = 0;
}
/*-----------------------------------------------------*\
@@ -702,15 +673,6 @@ void AlienwareController::SetDim(uint8_t zone, uint8_t dim)
}
}
void AlienwareController::SetDirection(uint8_t zone, uint8_t direction)
{
if(zone < zones.size())
{
zones[zone].direction = direction;
dirty = true;
}
}
void AlienwareController::UpdateDim()
{
if(!dirty_dim)
@@ -726,8 +688,7 @@ void AlienwareController::UpdateDim()
for(size_t i = 0; i < zones.size(); i++)
{
uint8_t hw_zone = (i < zone_ids.size()) ? zone_ids[i] : static_cast<uint8_t>(i);
dim_zone_map[zones[i].dim].emplace_back(hw_zone);
dim_zone_map[zones[i].dim].emplace_back((uint8_t)i);
}
for(std::pair<const uint8_t, std::vector<uint8_t>> &pair : dim_zone_map)
@@ -754,8 +715,7 @@ bool AlienwareController::UpdateDirect()
for(size_t i = 0; i < zones.size(); i++)
{
uint8_t hw_zone = (i < zone_ids.size()) ? zone_ids[i] : static_cast<uint8_t>(i);
color_zone_map[zones[i].color[0]].emplace_back(hw_zone);
color_zone_map[zones[i].color[0]].emplace_back((uint8_t)i);
}
for(std::pair<const RGBColor, std::vector<uint8_t>> &pair : color_zone_map)
@@ -799,9 +759,8 @@ void AlienwareController::UpdateMode()
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
{
alienware_zone zone = zones[zone_idx];
uint8_t hw_zone = (zone_idx < zone_ids.size()) ? zone_ids[zone_idx] : static_cast<uint8_t>(zone_idx);
result = SelectZones({hw_zone});
result = SelectZones({static_cast<uint8_t>(zone_idx)});
if(!result)
{
@@ -824,18 +783,18 @@ void AlienwareController::UpdateMode()
case ALIENWARE_MODE_MORPH:
{
uint8_t modes[2] = { zone.mode, zone.mode };
uint8_t zones[2] = { zone.mode, zone.mode };
uint16_t periods[2] = { zone.period, zone.period };
uint16_t tempos[2] = { zone.tempo, zone.tempo };
RGBColor colors[2] = { zone.color[0], zone.color[1] };
result = MultiModeAction(modes, periods, tempos, colors, 2);
result = MultiModeAction(zones, periods, tempos, colors, 2);
}
break;
case ALIENWARE_MODE_SPECTRUM:
{
uint8_t modes[7] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
uint8_t zones[7] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH };
@@ -848,13 +807,13 @@ void AlienwareController::UpdateMode()
zone.tempo, zone.tempo,
zone.tempo };
result = MultiModeAction(modes, periods, tempos, rainbow_colors[0], 7);
result = MultiModeAction(zones, periods, tempos, rainbow_colors[0], 7);
}
break;
case ALIENWARE_MODE_RAINBOW:
{
uint8_t modes[7] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
uint8_t zones[7] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH };
@@ -867,19 +826,18 @@ void AlienwareController::UpdateMode()
zone.tempo, zone.tempo,
zone.tempo };
unsigned int color_idx = (zone.direction == MODE_DIRECTION_LEFT) ? (4 - 1 - (zone_idx % 4)) : (zone_idx % 4);
result = MultiModeAction(modes, periods, tempos, rainbow_colors[color_idx], 7);
result = MultiModeAction(zones, periods, tempos, rainbow_colors[zone_idx], 7);
}
break;
case ALIENWARE_MODE_BREATHING:
{
uint8_t modes[2] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH };
uint8_t zones[2] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH };
uint16_t periods[2] = { zone.period, zone.period };
uint16_t tempos[2] = { zone.tempo, zone.tempo };
RGBColor colors[2] = { zone.color[0], 0x0 };
result = MultiModeAction(modes, periods, tempos, colors, 2);
result = MultiModeAction(zones, periods, tempos, colors, 2);
}
break;
@@ -906,117 +864,6 @@ void AlienwareController::UpdateMode()
dirty = false;
}
void AlienwareController::SaveController()
{
/*-----------------------------------------------------*\
| Save current mode configuration to EEPROM slot 0x0061 |
\*-----------------------------------------------------*/
UserAnimation(ALIENWARE_COMMAND_USER_ANIM_REMOVE, ALIENWARE_ANIM_DEFAULT, 0);
bool result = UserAnimation(ALIENWARE_COMMAND_USER_ANIM_NEW, ALIENWARE_ANIM_DEFAULT, 0);
if(!result)
{
return;
}
for(std::size_t zone_idx = 0; zone_idx < zones.size(); zone_idx++)
{
alienware_zone zone = zones[zone_idx];
uint8_t hw_zone = (zone_idx < zone_ids.size()) ? zone_ids[zone_idx] : static_cast<uint8_t>(zone_idx);
result = SelectZones({hw_zone});
if(!result)
{
return;
}
switch (zone.mode)
{
case ALIENWARE_MODE_COLOR:
result = ModeAction(zone.mode, 2000, ALIENWARE_TEMPO_MAX, zone.color[0]);
break;
case ALIENWARE_MODE_PULSE:
result = ModeAction(zone.mode, zone.period, zone.tempo, zone.color[0]);
break;
case ALIENWARE_MODE_MORPH:
{
uint8_t modes[2] = { zone.mode, zone.mode };
uint16_t periods[2] = { zone.period, zone.period };
uint16_t tempos[2] = { zone.tempo, zone.tempo };
RGBColor colors[2] = { zone.color[0], zone.color[1] };
result = MultiModeAction(modes, periods, tempos, colors, 2);
}
break;
case ALIENWARE_MODE_SPECTRUM:
{
uint8_t modes[7] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH };
uint16_t periods[7] = { zone.period, zone.period,
zone.period, zone.period,
zone.period, zone.period,
zone.period };
uint16_t tempos[7] = { zone.tempo, zone.tempo,
zone.tempo, zone.tempo,
zone.tempo, zone.tempo,
zone.tempo };
result = MultiModeAction(modes, periods, tempos, rainbow_colors[0], 7);
}
break;
case ALIENWARE_MODE_RAINBOW:
{
uint8_t modes[7] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH,
ALIENWARE_MODE_MORPH };
uint16_t periods[7] = { zone.period, zone.period,
zone.period, zone.period,
zone.period, zone.period,
zone.period };
uint16_t tempos[7] = { zone.tempo, zone.tempo,
zone.tempo, zone.tempo,
zone.tempo, zone.tempo,
zone.tempo };
unsigned int color_idx = (zone.direction == MODE_DIRECTION_LEFT) ? (4 - 1 - (zone_idx % 4)) : (zone_idx % 4);
result = MultiModeAction(modes, periods, tempos, rainbow_colors[color_idx], 7);
}
break;
case ALIENWARE_MODE_BREATHING:
{
uint8_t modes[2] = { ALIENWARE_MODE_MORPH, ALIENWARE_MODE_MORPH };
uint16_t periods[2] = { zone.period, zone.period };
uint16_t tempos[2] = { zone.tempo, zone.tempo };
RGBColor colors[2] = { zone.color[0], 0x0 };
result = MultiModeAction(modes, periods, tempos, colors, 2);
}
break;
default:
result = false;
}
if(!result)
{
return;
}
}
UserAnimation(ALIENWARE_COMMAND_USER_ANIM_FINISH_SAVE, ALIENWARE_ANIM_DEFAULT, 0);
UserAnimation(ALIENWARE_COMMAND_USER_ANIM_DEFAULT, ALIENWARE_ANIM_DEFAULT, 0);
UserAnimation(ALIENWARE_COMMAND_USER_ANIM_STARTUP, ALIENWARE_ANIM_DEFAULT, 0);
}
void AlienwareController::UpdateController()
{
UpdateMode();
@@ -123,13 +123,11 @@ public:
void SetPeriod(uint8_t zone, uint16_t period);
void SetTempo(uint8_t zone, uint16_t tempo);
void SetDim(uint8_t zone, uint8_t dim);
void SetDirection(uint8_t zone, uint8_t direction);
AlienwareReport GetStatus(uint8_t subcommand);
void UpdateDim();
void UpdateMode();
void UpdateController();
void SaveController();
protected:
hid_device* dev;
@@ -142,7 +140,6 @@ private:
uint16_t period;
uint16_t tempo;
uint8_t dim;
uint8_t direction;
} alienware_zone;
typedef struct
@@ -156,7 +153,6 @@ private:
std::string serial_number;
std::string version;
std::vector<const char*> zone_names;
std::vector<uint8_t> zone_ids;
bool dirty;
bool dirty_dim;
@@ -39,7 +39,7 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* controller
mode Color;
Color.name = "Static";
Color.value = ALIENWARE_MODE_COLOR;
Color.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Color.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS;
Color.color_mode = MODE_COLORS_PER_LED;
Color.colors_min = 1;
Color.colors_max = 1;
@@ -51,13 +51,13 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* controller
mode Pulse;
Pulse.name = "Flashing";
Pulse.value = ALIENWARE_MODE_PULSE;
Pulse.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE;
Pulse.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
Pulse.color_mode = MODE_COLORS_PER_LED;
Pulse.colors_min = 1;
Pulse.colors_max = 1;
Pulse.speed_min = ALIENWARE_TEMPO_MAX;
Pulse.speed_max = 50;
Pulse.speed = 150;
Pulse.speed_min = ALIENWARE_TEMPO_MIN;
Pulse.speed_max = ALIENWARE_TEMPO_MAX;
Pulse.speed = ALIENWARE_TEMPO_MIN;
Pulse.brightness_min = 100;
Pulse.brightness_max = 0;
Pulse.brightness = 0;
@@ -66,16 +66,14 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* controller
mode Morph;
Morph.name = "Morph";
Morph.value = ALIENWARE_MODE_MORPH;
Morph.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE;
Morph.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
Morph.color_mode = MODE_COLORS_MODE_SPECIFIC;
Morph.colors_min = 2;
Morph.colors_max = 2 * controller->GetZoneCount();
Morph.colors.resize(2);
Morph.colors[0] = 0x0000FF;
Morph.colors[1] = 0xFF0000;
Morph.speed_min = ALIENWARE_TEMPO_MAX;
Morph.speed_max = 20;
Morph.speed = 100;
Morph.colors_min = 2 * controller->GetZoneCount();
Morph.colors_max = Morph.colors_min;
Morph.colors.resize(Morph.colors_max);
Morph.speed_min = ALIENWARE_TEMPO_MIN;
Morph.speed_max = ALIENWARE_TEMPO_MAX;
Morph.speed = ALIENWARE_TEMPO_MIN;
Morph.brightness_min = 100;
Morph.brightness_max = 0;
Morph.brightness = 0;
@@ -84,11 +82,11 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* controller
mode Spectrum;
Spectrum.name = "Spectrum Cycle";
Spectrum.value = ALIENWARE_MODE_SPECTRUM;
Spectrum.flags = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE;
Spectrum.flags = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
Spectrum.color_mode = MODE_COLORS_NONE;
Spectrum.speed_min = ALIENWARE_TEMPO_MAX;
Spectrum.speed_max = ALIENWARE_TEMPO_SPECTRUM;
Spectrum.speed = 40;
Spectrum.speed_min = ALIENWARE_TEMPO_SPECTRUM;
Spectrum.speed_max = ALIENWARE_TEMPO_MAX;
Spectrum.speed = ALIENWARE_TEMPO_SPECTRUM;
Spectrum.brightness_min = 100;
Spectrum.brightness_max = 0;
Spectrum.brightness = 0;
@@ -97,12 +95,11 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* controller
mode Rainbow;
Rainbow.name = "Rainbow Wave";
Rainbow.value = ALIENWARE_MODE_RAINBOW;
Rainbow.flags = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_MANUAL_SAVE;
Rainbow.flags = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
Rainbow.color_mode = MODE_COLORS_NONE;
Rainbow.speed_min = ALIENWARE_TEMPO_MAX;
Rainbow.speed_max = ALIENWARE_TEMPO_SPECTRUM;
Rainbow.speed = 40;
Rainbow.direction = MODE_DIRECTION_RIGHT;
Rainbow.speed_min = ALIENWARE_TEMPO_SPECTRUM;
Rainbow.speed_max = ALIENWARE_TEMPO_MAX;
Rainbow.speed = ALIENWARE_TEMPO_SPECTRUM;
Rainbow.brightness_min = 100;
Rainbow.brightness_max = 0;
Rainbow.brightness = 0;
@@ -111,13 +108,13 @@ RGBController_Alienware::RGBController_Alienware(AlienwareController* controller
mode Breathing;
Breathing.name = "Breathing";
Breathing.value = ALIENWARE_MODE_BREATHING;
Breathing.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_MANUAL_SAVE;
Breathing.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED;
Breathing.color_mode = MODE_COLORS_PER_LED;
Breathing.colors_min = 1;
Breathing.colors_max = 1;
Breathing.speed_min = ALIENWARE_TEMPO_MAX;
Breathing.speed_max = 50;
Breathing.speed = 150;
Breathing.speed_min = ALIENWARE_TEMPO_MIN;
Breathing.speed_max = ALIENWARE_TEMPO_MAX;
Breathing.speed = ALIENWARE_TEMPO_MIN;
Breathing.brightness_min = 100;
Breathing.brightness_max = 0;
Breathing.brightness = 0;
@@ -227,7 +224,6 @@ void RGBController_Alienware::DeviceUpdateMode()
uint16_t period = 0x07d0;
controller->SetMode(zone_idx, current_mode.value);
controller->SetDirection(zone_idx, current_mode.direction);
switch(current_mode_idx)
{
@@ -239,7 +235,6 @@ void RGBController_Alienware::DeviceUpdateMode()
break;
case ALIENWARE_MODE_PULSE:
period = std::max<uint16_t>(500, (uint16_t)(current_mode.speed * 10));
controller->SetPeriod(zone_idx, period);
controller->SetColor( zone_idx, colors[current_zone.start_idx]);
controller->SetTempo( zone_idx, current_mode.speed);
@@ -247,22 +242,10 @@ void RGBController_Alienware::DeviceUpdateMode()
break;
case ALIENWARE_MODE_MORPH:
{
RGBColor c1 = (current_mode.colors.size() >= 1) ? current_mode.colors[0] : 0x0000FF;
RGBColor c2 = (current_mode.colors.size() >= 2) ? current_mode.colors[1] : 0xFF0000;
if(current_mode.colors.size() >= (std::size_t)((zone_idx + 1) * 2))
{
c1 = current_mode.colors[zone_idx * 2];
c2 = current_mode.colors[(zone_idx * 2) + 1];
}
period = std::max<uint16_t>(400, (uint16_t)(current_mode.speed * 10));
controller->SetPeriod(zone_idx, period);
controller->SetColor( zone_idx, c1, c2);
controller->SetTempo( zone_idx, current_mode.speed);
controller->SetDim( zone_idx, modes[current_mode_idx].brightness);
}
controller->SetPeriod(zone_idx, period);
controller->SetColor( zone_idx, current_mode.colors[zone_idx * 2], current_mode.colors[(zone_idx * 2) + 1]);
controller->SetTempo( zone_idx, current_mode.speed);
controller->SetDim( zone_idx, modes[current_mode_idx].brightness);
break;
case ALIENWARE_MODE_SPECTRUM:
@@ -273,7 +256,6 @@ void RGBController_Alienware::DeviceUpdateMode()
break;
case ALIENWARE_MODE_BREATHING:
period = std::max<uint16_t>(500, (uint16_t)(current_mode.speed * 10));
controller->SetPeriod(zone_idx, period);
controller->SetColor( zone_idx, colors[current_zone.start_idx], 0x0);
controller->SetTempo( zone_idx, current_mode.speed);
@@ -300,9 +282,3 @@ void RGBController_Alienware::DeviceUpdateMode()
current_mode = new_current_mode;
}
}
void RGBController_Alienware::DeviceSaveMode()
{
controller->SaveController();
}
@@ -28,7 +28,6 @@ public:
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
void DeviceSaveMode();
private:
AlienwareController* controller;
@@ -18,79 +18,71 @@
| |
| Based on KEYBOARD_SIZE_TKL with numpad added and |
| navigation cluster adjusted to match Clevo's layout. |
| |
| Hardware LED indices (value field): |
| - Row 5 (F-keys): 105-124 |
| - Row 4 (numbers): 84-102 |
| - Row 3 (QWERTY): 63-81 |
| - Row 2 (home): 42-59 |
| - Row 1 (Z row): 22-39 |
| - Row 0 (modifiers): 0-18 |
\*---------------------------------------------------------*/
/*---------------------------------------------------------*\
| LED values, in physical (row, then column) order. |
| |
| This must match the order KeyboardLayoutManager assigns |
| default_values against: the structural keymap sorted by |
| (row, col) across main+fn_row+extras combined, NOT the |
| fn_row-then-main-then-extras order the zone tables below |
| are declared in. Getting this wrong silently misassigns |
| almost every key from Print Screen onward, not just a few.|
| LED values in TKL order (fn_row + main + extras) |
| |
| Values follow the key order in KeyboardLayoutManager.cpp. |
| For ANSI-only keys (not present on this ISO keyboard), |
| use 0 as a placeholder - they won't be displayed. |
| Numpad values are added via edit_keys. |
\*---------------------------------------------------------*/
static const std::vector<unsigned int> clevo_tkl_values =
{
/*-----------------------------------------------------*\
| Row 0: fn_row + Print Screen/Scroll Lock/Pause |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| Function row (keyboard_zone_fn_row) |
\*---------------------------------------------------------*/
105, // Escape
106, 107, 108, 109, // F1-F4
110, 111, 112, 113, // F5-F8
114, 115, 116, 117, // F9-F12
118, // Print Screen
0, // Scroll Lock (removed via edit_keys)
0, // Pause (removed via edit_keys)
/*-----------------------------------------------------*\
| Row 1: numbers row + Insert/Home/Page Up |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| Main block - Row 1 (keyboard_zone_main) |
\*---------------------------------------------------------*/
84, // Back tick
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, // 1-0
95, 96, // Minus, Equals
98, // Backspace
119, // Insert
121, // Home
122, // Page Up
/*-----------------------------------------------------*\
| Row 2: Tab/QWERTY row + Delete/End/PageDown |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| Main block - Row 2 |
\*---------------------------------------------------------*/
63, // Tab
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, // Q-P
75, 76, // [ ]
0, // ANSI backslash (not on ISO)
120, // Delete
124, // End
123, // Page Down
/*-----------------------------------------------------*\
| Row 3: Caps Lock/home row/Enter |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| Main block - Row 3 |
\*---------------------------------------------------------*/
42, // Caps Lock
44, 45, 46, 47, 48, 49, 50, 51, 52, // A-L
53, 54, // ; '
55, // ISO # (POUND)
56, // Enter
77, // Enter (ANSI/ISO share same LED)
/*-----------------------------------------------------*\
| Row 4: Left Shift/ISO backslash/Z row + Up |
\*-----------------------------------------------------*/
21, // Left Shift
77, // ISO backslash
/*---------------------------------------------------------*\
| Main block - Row 4 |
\*---------------------------------------------------------*/
22, // Left Shift
23, // ISO backslash
24, 25, 26, 27, 28, 29, 30, 31, 32, // Z-. (9 keys)
33, // /
35, // Right Shift
14, // Up
/*-----------------------------------------------------*\
| Row 5: bottom modifier row + Left/Down/Right |
\*-----------------------------------------------------*/
/*---------------------------------------------------------*\
| Main block - Row 5 |
\*---------------------------------------------------------*/
0, // Left Ctrl
3, // Left Win
4, // Left Alt
@@ -99,6 +91,24 @@ static const std::vector<unsigned int> clevo_tkl_values =
0, // Right Fn (removed via edit_keys)
0, // Menu (removed via edit_keys)
12, // Right Ctrl
/*---------------------------------------------------------*\
| Extras - Navigation cluster (keyboard_zone_extras) |
\*---------------------------------------------------------*/
118, // Print Screen
0, // Scroll Lock (removed via edit_keys)
0, // Pause (removed via edit_keys)
119, // Insert
121, // Home
123, // Page Up
120, // Delete
122, // End
124, // Page Down
/*---------------------------------------------------------*\
| Extras - Arrow keys |
\*---------------------------------------------------------*/
14, // Up
13, // Left
18, // Down
15, // Right
@@ -232,7 +232,7 @@ void CorsairLightingNodeController::SendFirmwareRequest()
/*-----------------------------------------------------*\
| Send packet |
\*-----------------------------------------------------*/
actual = WriteAndRead(usb_buf, CORSAIR_LIGHTING_NODE_READ_TIMEOUT);
actual = WriteAndRead(usb_buf);
if(actual > 0)
{
@@ -0,0 +1,102 @@
/*---------------------------------------------------------*\
| GainwardGPUControllerDetect.cpp |
| |
| Detector for Gainward GPU |
| |
| TheRogueZeta 05 Nov 2020 |
| KundaPanda 04 Jan 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "DetectionManager.h"
#include "GainwardGPUv1Controller.h"
#include "GainwardGPUv2Controller.h"
#include "i2c_smbus.h"
#include "pci_ids.h"
#include "RGBController_GainwardGPUv1.h"
#include "RGBController_GainwardGPUv2.h"
bool TestForGainwardGPUController(i2c_smbus_interface* bus, uint8_t i2c_addr)
{
bool pass = false;
switch(i2c_addr)
{
/*-------------------------------------------------*\
| V1 Controller |
\*-------------------------------------------------*/
case 0x08:
pass = bus->i2c_smbus_write_quick(i2c_addr, I2C_SMBUS_WRITE);
break;
/*-------------------------------------------------*\
| V2 Controller |
\*-------------------------------------------------*/
case 0x49:
/*---------------------------------------------*\
| This detection might need some modifications |
| Reading 0x6F*0x73 and comparing to 0x64 might |
| be a possibility |
\*---------------------------------------------*/
s32 data = bus->i2c_smbus_read_byte_data(i2c_addr, 0x0);
s32 mode_data = bus->i2c_smbus_read_byte_data(i2c_addr, 0xe0);
pass = (data == 0x0) && (mode_data < 0x5);
break;
}
return(pass);
}
DetectedControllers DetectGainwardGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
{
DetectedControllers detected_controllers;
if(TestForGainwardGPUController(bus, i2c_addr))
{
switch(i2c_addr)
{
/*---------------------------------------------*\
| V1 Controller |
\*---------------------------------------------*/
case 0x08:
{
GainwardGPUv1Controller* controller = new GainwardGPUv1Controller(bus, i2c_addr, name);
RGBController_GainwardGPUv1* rgb_controller = new RGBController_GainwardGPUv1(controller);
detected_controllers.push_back(rgb_controller);
}
break;
/*---------------------------------------------*\
| V2 Controller |
\*---------------------------------------------*/
case 0x49:
{
GainwardGPUv2Controller* controller = new GainwardGPUv2Controller(bus, i2c_addr, name);
RGBController_GainwardGPUv2* rgb_controller = new RGBController_GainwardGPUv2(controller);
detected_controllers.push_back(rgb_controller);
}
break;
}
}
return(detected_controllers);
}
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce GTX 1080 Phoenix", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_GTX1080_DEV, GAINWARD_SUB_VEN, GAINWARD_GTX_1080_PHOENIX, 0x08);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce GTX 1080 Ti Phoenix", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_GTX1080TI_DEV, GAINWARD_SUB_VEN, GAINWARD_GTX_1080TI_PHOENIX, 0x08);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce GTX 1660 SUPER Ghost", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_GTX1660S_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1660S_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 2070 SUPER Phantom", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX2070S_OC_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 2080 Phoenix GS", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX2080_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX2080_A_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3060 Pegasus 12G", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX3060_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3070 Phantom", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, GAINWARD_SUB_VEN, GAINWARD_RTX_3070_PHANTOM, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3070 Phoenix", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3070_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3070 Ti Phoenix", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070TI_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3070TI_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3080 Phoenix", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3080_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3080 Ti Phoenix", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080TI_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3080TI_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3090 Phoenix", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX3090_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3090_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3090 Ti Phantom", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX3090TI_DEV, GAINWARD_SUB_VEN, GAINWARD_RTX_3090TI_PHANTOM, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 4080 Phantom GS", DetectGainwardGPUControllers, NVIDIA_VEN, NVIDIA_RTX4080_DEV, GAINWARD_SUB_VEN, GAINWARD_RTX_4080_PHANTOM_GS_SUB_DEV, 0x49);
@@ -0,0 +1,78 @@
/*---------------------------------------------------------*\
| GainwardGPUv1Controller.cpp |
| |
| Driver for Gainward v1 GPU |
| |
| TheRogueZeta 05 Nov 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <cstring>
#include "GainwardGPUv1Controller.h"
GainwardGPUv1Controller::GainwardGPUv1Controller(i2c_smbus_interface* bus, gainward_gpu_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
GainwardGPUv1Controller::~GainwardGPUv1Controller()
{
}
std::string GainwardGPUv1Controller::GetDeviceLocation()
{
std::string return_string(bus->info.device_name);
char addr[5];
snprintf(addr, 5, "0x%02X", dev);
return_string.append(", address ");
return_string.append(addr);
return("I2C: " + return_string);
}
std::string GainwardGPUv1Controller::GetDeviceName()
{
return(name);
}
unsigned char GainwardGPUv1Controller::GetLEDRed()
{
return(GainwardGPURegisterRead(GAINWARD_RED_REGISTER));
}
unsigned char GainwardGPUv1Controller::GetLEDGreen()
{
return(GainwardGPURegisterRead(GAINWARD_GREEN_REGISTER));
}
unsigned char GainwardGPUv1Controller::GetLEDBlue()
{
return(GainwardGPURegisterRead(GAINWARD_BLUE_REGISTER));
}
void GainwardGPUv1Controller::SetLEDColors(unsigned char red, unsigned char green, unsigned char blue)
{
GainwardGPURegisterWrite(GAINWARD_RED_REGISTER, red);
GainwardGPURegisterWrite(GAINWARD_GREEN_REGISTER, green);
GainwardGPURegisterWrite(GAINWARD_BLUE_REGISTER, blue);
GainwardGPURegisterWrite(GAINWARD_06_REGISTER, 0xFF);
}
void GainwardGPUv1Controller::SetMode()
{
}
unsigned char GainwardGPUv1Controller::GainwardGPURegisterRead(unsigned char reg)
{
return(bus->i2c_smbus_read_byte_data(dev, reg));
}
void GainwardGPUv1Controller::GainwardGPURegisterWrite(unsigned char reg, unsigned char val)
{
bus->i2c_smbus_write_byte_data(dev, reg, val);
}
@@ -1,10 +1,9 @@
/*---------------------------------------------------------*\
| PalitGPUv1Controller.h |
| GainwardGPUv1Controller.h |
| |
| Driver for Palit v1 GPU |
| Driver for Gainward v1 GPU |
| |
| TheRogueZeta 05 Nov 2020 |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
@@ -15,19 +14,22 @@
#include <string>
#include "i2c_smbus.h"
typedef unsigned char palit_gpu_dev_id;
typedef unsigned char gainward_gpu_dev_id;
enum
{
/* RGB Registers */
PALIT_V1_RED_REGISTER = 0x03, /* Red Register */
GAINWARD_RED_REGISTER = 0x03, /* Red Register */
GAINWARD_GREEN_REGISTER = 0x04, /* Green Register */
GAINWARD_BLUE_REGISTER = 0x05, /* Blue Register */
GAINWARD_06_REGISTER = 0x06, /* Unknown (Brightness/Mode?) Register */
};
class PalitGPUv1Controller
class GainwardGPUv1Controller
{
public:
PalitGPUv1Controller(i2c_smbus_interface* bus, palit_gpu_dev_id, std::string dev_name);
~PalitGPUv1Controller();
GainwardGPUv1Controller(i2c_smbus_interface* bus, gainward_gpu_dev_id, std::string dev_name);
~GainwardGPUv1Controller();
std::string GetDeviceLocation();
std::string GetDeviceName();
@@ -36,9 +38,13 @@ public:
unsigned char GetLEDGreen();
unsigned char GetLEDBlue();
void SetLEDColors(unsigned char red, unsigned char green, unsigned char blue);
void SetMode();
unsigned char GainwardGPURegisterRead(unsigned char reg);
void GainwardGPURegisterWrite(unsigned char reg, unsigned char val);
private:
i2c_smbus_interface * bus;
palit_gpu_dev_id dev;
gainward_gpu_dev_id dev;
std::string name;
};
@@ -0,0 +1,115 @@
/*---------------------------------------------------------*\
| RGBController_GainwardGPUv1.cpp |
| |
| RGBController for Gainward v1 GPU |
| |
| TheRogueZeta 05 Nov 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "RGBController_GainwardGPUv1.h"
int RGBController_GainwardGPUv1::GetDeviceMode()
{
active_mode = 1;
return(active_mode);
}
/**------------------------------------------------------------------*\
@name Gainward GPU v1
@category GPU
@type I2C
@save :x:
@direct :white_check_mark:
@effects :x:
@detectors DetectGainwardGPUControllers
@comment
\*-------------------------------------------------------------------*/
RGBController_GainwardGPUv1::RGBController_GainwardGPUv1(GainwardGPUv1Controller* controller_ptr)
{
controller = controller_ptr;
name = controller->GetDeviceName();
vendor = "Gainward";
type = DEVICE_TYPE_GPU;
description = "Gainward GPU V1 Device";
location = controller->GetDeviceLocation();
mode Direct;
Direct.name = "Direct";
Direct.value = 1;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
SetupZones();
}
RGBController_GainwardGPUv1::~RGBController_GainwardGPUv1()
{
Shutdown();
delete controller;
}
void RGBController_GainwardGPUv1::SetupZones()
{
/*---------------------------------------------------------*\
| Set up zone |
\*---------------------------------------------------------*/
zone gainward_gpu_zone;
gainward_gpu_zone.name = "GPU";
gainward_gpu_zone.type = ZONE_TYPE_SINGLE;
gainward_gpu_zone.leds_min = 1;
gainward_gpu_zone.leds_max = 1;
gainward_gpu_zone.leds_count = 1;
zones.push_back(gainward_gpu_zone);
/*---------------------------------------------------------*\
| Set up LED |
\*---------------------------------------------------------*/
led gainward_gpu_led;
gainward_gpu_led.name = "GPU";
leds.push_back(gainward_gpu_led);
SetupColors();
/*---------------------------------------------------------*\
| Initialize color |
\*---------------------------------------------------------*/
unsigned char red = controller->GetLEDRed();
unsigned char grn = controller->GetLEDGreen();
unsigned char blu = controller->GetLEDBlue();
colors[0] = ToRGBColor(red, grn, blu);
}
void RGBController_GainwardGPUv1::DeviceUpdateLEDs()
{
for(std::size_t led = 0; led < colors.size(); led++)
{
unsigned char red = RGBGetRValue(colors[led]);
unsigned char grn = RGBGetGValue(colors[led]);
unsigned char blu = RGBGetBValue(colors[led]);
controller->SetLEDColors(red, grn, blu);
}
}
void RGBController_GainwardGPUv1::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_GainwardGPUv1::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}
void RGBController_GainwardGPUv1::DeviceUpdateMode()
{
}
@@ -1,36 +1,35 @@
/*---------------------------------------------------------*\
| RGBController_PalitGPUv1.h |
| |
| RGBController for Palit v1 GPU |
| |
| TheRogueZeta 05 Nov 2020 |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "PalitGPUv1Controller.h"
class RGBController_PalitGPUv1 : public RGBController
{
public:
RGBController_PalitGPUv1(PalitGPUv1Controller* controller_ptr);
~RGBController_PalitGPUv1();
void SetupZones();
void DeviceUpdateLEDs();
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
PalitGPUv1Controller* controller;
int GetDeviceMode();
};
/*---------------------------------------------------------*\
| RGBController_GainwardGPUv1.h |
| |
| RGBController for Gainward v1 GPU |
| |
| TheRogueZeta 05 Nov 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "GainwardGPUv1Controller.h"
class RGBController_GainwardGPUv1 : public RGBController
{
public:
RGBController_GainwardGPUv1(GainwardGPUv1Controller* controller_ptr);
~RGBController_GainwardGPUv1();
void SetupZones();
void DeviceUpdateLEDs();
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
GainwardGPUv1Controller* controller;
int GetDeviceMode();
};
@@ -0,0 +1,97 @@
/*---------------------------------------------------------*\
| GainwardGPUv2Controller.cpp |
| |
| Driver for Gainward v2 GPU |
| |
| KundaPanda 04 Jan 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <cstring>
#include "GainwardGPUv2Controller.h"
GainwardGPUv2Controller::GainwardGPUv2Controller(i2c_smbus_interface* bus, gainward_gpu_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
GainwardGPUv2Controller::~GainwardGPUv2Controller() = default;
std::string GainwardGPUv2Controller::GetDeviceLocation()
{
std::string return_string(bus->info.device_name);
char addr[5];
snprintf(addr, 5, "0x%02X", dev);
return_string.append(", address ");
return_string.append(addr);
return("I2C: " + return_string);
}
std::string GainwardGPUv2Controller::GetDeviceName()
{
return(name);
}
unsigned char GainwardGPUv2Controller::GetLEDRed()
{
return(bus->i2c_smbus_read_byte_data(dev, GAINWARD_V2_RED_REGISTER));
}
unsigned char GainwardGPUv2Controller::GetLEDGreen()
{
return(bus->i2c_smbus_read_byte_data(dev, GAINWARD_V2_GREEN_REGISTER));
}
unsigned char GainwardGPUv2Controller::GetLEDBlue()
{
return(bus->i2c_smbus_read_byte_data(dev, GAINWARD_V2_BLUE_REGISTER));
}
void GainwardGPUv2Controller::SetLEDColors(unsigned char red, unsigned char green, unsigned char blue, unsigned char color_register)
{
switch (color_register)
{
default:
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_RED_REGISTER, red);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_GREEN_REGISTER, green);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_BLUE_REGISTER, blue);
break;
case GAINWARD_V2_COLOR_REGISTER_SECONDARY:
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_RED_SECONDARY_REGISTER, red);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_GREEN_SECONDARY_REGISTER, green);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_BLUE_SECONDARY_REGISTER, blue);
break;
case GAINWARD_V2_COLOR_REGISTER_TERTIARY:
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_RED_TERTIARY_REGISTER, red);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_GREEN_TERTIARY_REGISTER, green);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_BLUE_TERTIARY_REGISTER, blue);
break;
}
}
void GainwardGPUv2Controller::SetMode(unsigned char mode, unsigned char speed, unsigned char static_mode)
{
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_MODE_REGISTER, mode);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_STATIC_CONTROL_REGISTER, static_mode);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_SPEED_REGISTER, speed);
}
void GainwardGPUv2Controller::SetDirection(unsigned char direction)
{
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_MODE_DIRECTION_REGISTER, direction);
}
void GainwardGPUv2Controller::SetBreathingSpeed(unsigned int speed)
{
unsigned char lower = speed & 0xFF;
unsigned char upper = (speed >> 2 * 4) & 0xFF;
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_BREATHE_SPEED_REGISTER_A, lower);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_BREATHE_SPEED_SECONDARY_REGISTER_A, lower);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_BREATHE_SPEED_REGISTER_B, upper);
bus->i2c_smbus_write_byte_data(dev, GAINWARD_V2_BREATHE_SPEED_SECONDARY_REGISTER_B, upper);
}
@@ -0,0 +1,101 @@
/*---------------------------------------------------------*\
| GainwardGPUv2Controller.h |
| |
| Driver for Gainward v2 GPU |
| |
| KundaPanda 04 Jan 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include <string>
#include "i2c_smbus.h"
typedef unsigned char gainward_gpu_dev_id;
/*---------------------------------------------------------------------------------*\
| Newer Gainward models seem to use addresses very similar to those used by EVGA |
\*-------------------------------------------------------------------------------**/
enum
{
/* RGB Registers */
GAINWARD_V2_RED_REGISTER = 0x6C, /* Red Register */
GAINWARD_V2_GREEN_REGISTER = 0x6D, /* Green Register */
GAINWARD_V2_BLUE_REGISTER = 0x6E, /* Blue Register */
GAINWARD_V2_RED_SECONDARY_REGISTER = 0x70, /* Red Register 2 */
GAINWARD_V2_GREEN_SECONDARY_REGISTER = 0x71, /* Green Register 2 */
GAINWARD_V2_BLUE_SECONDARY_REGISTER = 0x72, /* Blue Register 2 */
GAINWARD_V2_RED_TERTIARY_REGISTER = 0xE4, /* Red Register 3 */
GAINWARD_V2_GREEN_TERTIARY_REGISTER = 0xE5, /* Green Register 3 */
GAINWARD_V2_BLUE_TERTIARY_REGISTER = 0xE6, /* Blue Register 3 */
GAINWARD_V2_MODE_REGISTER = 0xE0, /* Mode Register */
/* Direct mode switch register
* 0x1 Software control
* 0x22 Breathing */
GAINWARD_V2_STATIC_CONTROL_REGISTER = 0x60,
GAINWARD_V2_BREATHE_SPEED_REGISTER_A = 0x62, /* Lower part of speed control for breathe effect */
GAINWARD_V2_BREATHE_SPEED_REGISTER_B = 0x63, /* Upper part of speed control for breathe effect */
GAINWARD_V2_BREATHE_SPEED_SECONDARY_REGISTER_A = 0x64, /* Lower part of speed control for breathe effect - prob. secondary color */
GAINWARD_V2_BREATHE_SPEED_SECONDARY_REGISTER_B = 0x65, /* Upper part of speed control for breathe effect - prob. secondary color */
/* Mode direction Register
* 0x0
* 0x1 */
GAINWARD_V2_MODE_DIRECTION_REGISTER = 0xE1,
/* Mode speed Register
* 0x0 MAX
* 0xF MIN */
GAINWARD_V2_SPEED_REGISTER = 0xE2,
};
enum
{
/* Manual color selection using primary registers */
GAINWARD_V2_MODE_STATIC = 0x00,
/* Rainbow cycling with direction and speed controls */
GAINWARD_V2_MODE_CYCLE = 0x01,
/* One strobing color running around the fan
* Color using primary registers, direction and speed control */
GAINWARD_V2_MODE_STROBE = 0x02,
};
enum
{
GAINWARD_V2_COLOR_REGISTER_PRIMARY,
GAINWARD_V2_COLOR_REGISTER_SECONDARY,
GAINWARD_V2_COLOR_REGISTER_TERTIARY,
};
enum
{
/* Software controlled direct mode */
GAINWARD_V2_STATIC_SOFTWARE = 0x01,
/* GPU controlled direct mode with breathing effect */
GAINWARD_V2_STATIC_BREATHING = 0x22,
};
class GainwardGPUv2Controller
{
public:
GainwardGPUv2Controller(i2c_smbus_interface* bus, gainward_gpu_dev_id, std::string dev_name);
~GainwardGPUv2Controller();
std::string GetDeviceLocation();
std::string GetDeviceName();
unsigned char GetLEDRed();
unsigned char GetLEDGreen();
unsigned char GetLEDBlue();
void SetLEDColors(unsigned char red, unsigned char green, unsigned char blue, unsigned char color_register = GAINWARD_V2_COLOR_REGISTER_PRIMARY);
void SetMode(unsigned char mode, unsigned char speed, unsigned char direct_mode = GAINWARD_V2_STATIC_SOFTWARE);
void SetBreathingSpeed(unsigned int speed);
void SetDirection(unsigned char direction);
private:
i2c_smbus_interface * bus;
gainward_gpu_dev_id dev;
std::string name;
};
@@ -0,0 +1,187 @@
/*---------------------------------------------------------*\
| RGBController_GainwardGPUv2.cpp |
| |
| RGBController for Gainward v2 GPU |
| |
| KundaPanda 04 Jan 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "RGBController_GainwardGPUv2.h"
/**------------------------------------------------------------------*\
@name Gainward GPU v2
@category GPU
@type I2C
@save :x:
@direct :x:
@effects :white_check_mark:
@detectors DetectGainwardGPUControllers
@comment
\*-------------------------------------------------------------------*/
RGBController_GainwardGPUv2::RGBController_GainwardGPUv2(GainwardGPUv2Controller* controller_ptr)
{
controller = controller_ptr;
name = controller->GetDeviceName();
vendor = "Gainward";
type = DEVICE_TYPE_GPU;
description = "Gainward GPU V2 Device";
location = controller->GetDeviceLocation();
mode Static;
Static.name = "Static";
Static.value = GAINWARD_V2_MODE_STATIC;
Static.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Static.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Static);
mode Breathe;
Breathe.name = "Breathing";
Breathe.value = GAINWARD_V2_MODE_STATIC;
Breathe.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED;
Breathe.speed_max = 0x000a;
Breathe.speed_min = 0x1324;
Breathe.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathe.colors_min = 2;
Breathe.colors_max = 2;
Breathe.colors.resize(2);
modes.push_back(Breathe);
mode RainbowWave;
RainbowWave.name = "Rainbow Wave";
RainbowWave.value = GAINWARD_V2_MODE_CYCLE;
RainbowWave.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR;
RainbowWave.speed_max = 0x0;
RainbowWave.speed_min = 0xF;
RainbowWave.color_mode = MODE_COLORS_NONE;
modes.push_back(RainbowWave);
mode Strobe;
Strobe.name = "Strobe";
Strobe.value = GAINWARD_V2_MODE_STROBE;
Strobe.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Strobe.color_mode = MODE_COLORS_MODE_SPECIFIC;
Strobe.colors_min = 1;
Strobe.colors_max = 1;
Strobe.colors.resize(1);
Strobe.speed_max = 0x0;
Strobe.speed_min = 0xF;
modes.push_back(Strobe);
SetupZones();
/*-------------------------*\
| Initialize active mode |
\*-------------------------*/
active_mode = 0;
}
RGBController_GainwardGPUv2::~RGBController_GainwardGPUv2()
{
Shutdown();
delete controller;
}
void RGBController_GainwardGPUv2::SetupZones()
{
/*---------------------------------------------------------*\
| Set up zone |
\*---------------------------------------------------------*/
zone gainward_gpu_zone;
gainward_gpu_zone.name = "GPU";
gainward_gpu_zone.type = ZONE_TYPE_SINGLE;
gainward_gpu_zone.leds_min = 1;
gainward_gpu_zone.leds_max = 1;
gainward_gpu_zone.leds_count = 1;
zones.push_back(gainward_gpu_zone);
/*---------------------------------------------------------*\
| Set up LED |
\*---------------------------------------------------------*/
led gainward_gpu_led;
gainward_gpu_led.name = "GPU";
leds.push_back(gainward_gpu_led);
SetupColors();
/*---------------------------------------------------------*\
| Initialize color |
\*---------------------------------------------------------*/
unsigned char red = controller->GetLEDRed();
unsigned char grn = controller->GetLEDGreen();
unsigned char blu = controller->GetLEDBlue();
colors[0] = ToRGBColor(red, grn, blu);
}
void RGBController_GainwardGPUv2::DeviceUpdateLEDs()
{
for(unsigned int color : colors)
{
unsigned char red = RGBGetRValue(color);
unsigned char grn = RGBGetGValue(color);
unsigned char blu = RGBGetBValue(color);
controller->SetLEDColors(red, grn, blu);
controller->SetMode(GAINWARD_V2_MODE_STATIC, 0x2);
}
}
void RGBController_GainwardGPUv2::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_GainwardGPUv2::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}
void RGBController_GainwardGPUv2::DeviceUpdateMode()
{
mode current_mode = modes[(unsigned int)active_mode];
switch (active_mode)
{
case 1:
{
controller->SetBreathingSpeed(current_mode.speed);
unsigned char r1 = RGBGetRValue(current_mode.colors[0]);
unsigned char g1 = RGBGetGValue(current_mode.colors[0]);
unsigned char b1 = RGBGetBValue(current_mode.colors[0]);
controller->SetLEDColors(r1, g1, b1);
unsigned char r2 = RGBGetRValue(current_mode.colors[1]);
unsigned char g2 = RGBGetGValue(current_mode.colors[1]);
unsigned char b2 = RGBGetBValue(current_mode.colors[1]);
controller->SetLEDColors(r2, g2, b2, GAINWARD_V2_COLOR_REGISTER_SECONDARY);
controller->SetMode(GAINWARD_V2_MODE_STATIC, 0x2, GAINWARD_V2_STATIC_BREATHING);
}
break;
/*---------------------------------------------*\
| Case 3 intentionally falls through to case 2 |
\*---------------------------------------------*/
case 3:
{
unsigned char r = RGBGetRValue(current_mode.colors[0]);
unsigned char g = RGBGetGValue(current_mode.colors[0]);
unsigned char b = RGBGetBValue(current_mode.colors[0]);
controller->SetLEDColors(r, g, b, GAINWARD_V2_COLOR_REGISTER_TERTIARY);
}
case 2:
controller->SetMode((unsigned char)(current_mode.value), (unsigned char)(current_mode.speed));
controller->SetDirection(current_mode.direction);
break;
default:
controller->SetMode((unsigned char)(current_mode.value), (unsigned char)(current_mode.speed));
break;
}
}
@@ -1,34 +1,33 @@
/*---------------------------------------------------------*\
| RGBController_PalitGPUv2.h |
| |
| RGBController for Palit v2 GPU |
| |
| KundaPanda 04 Jan 2021 |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "PalitGPUv2Controller.h"
class RGBController_PalitGPUv2 : public RGBController
{
public:
RGBController_PalitGPUv2(PalitGPUv2Controller* controller_ptr);
~RGBController_PalitGPUv2();
void SetupZones();
void DeviceUpdateLEDs();
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
PalitGPUv2Controller* controller;
};
/*---------------------------------------------------------*\
| RGBController_GainwardGPUv2.h |
| |
| RGBController for Gainward v2 GPU |
| |
| KundaPanda 04 Jan 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "GainwardGPUv2Controller.h"
class RGBController_GainwardGPUv2 : public RGBController
{
public:
RGBController_GainwardGPUv2(GainwardGPUv2Controller* controller_ptr);
~RGBController_GainwardGPUv2();
void SetupZones();
void DeviceUpdateLEDs();
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
GainwardGPUv2Controller* controller;
};
@@ -1472,12 +1472,8 @@ void RGBController_RGBFusion2USB::DeviceUpdateZoneLEDs(int zone)
| Apply the mode and color to the zone |
\*---------------------------------------------------------*/
controller->SetLEDEffect(zones[zone].leds[led_idx].value, led_mode_value, selected_mode->speed, selected_mode->brightness, random, led_color);
controller->ApplyEffect();
}
/*---------------------------------------------------------*\
| Apply once for the whole zone, not once per LED |
\*---------------------------------------------------------*/
controller->ApplyEffect();
}
/*---------------------------------------------------------*\
@@ -196,7 +196,7 @@ static const char *HIDUsageIDsToKeyNames[HID_KEYBOARD_USAGE_IDS_COUNT] =
KEY_EN_NUMPAD_0, // Keypad 0 and Insert
KEY_EN_NUMPAD_PERIOD, // Keypad . and Delete
KEY_EN_BACK_SLASH, // Keyboard Non-US \ and |
KEY_EN_MENU, // Keyboard Application
KEY_EN_UNUSED, // Keyboard Application
KEY_EN_POWER, // Keyboard Power
KEY_EN_NUMPAD_EQUAL, // Keypad =
KEY_EN_F13, // Keyboard F13
@@ -260,16 +260,6 @@ static const char *HIDUsageIDsToKeyNames[HID_KEYBOARD_USAGE_IDS_COUNT] =
KEY_EN_UNUSED, // Keyboard Clear/Again
KEY_EN_UNUSED, // Keyboard CrSel/Props
KEY_EN_UNUSED, // Keyboard ExSel
KEY_EN_UNUSED, // A5 Reserved
KEY_EN_UNUSED, // A6 Reserved
KEY_EN_UNUSED, // A7 Reserved
KEY_EN_UNUSED, // A8 Reserved
KEY_EN_UNUSED, // A9 Reserved
KEY_EN_UNUSED, // AA Reserved
KEY_EN_UNUSED, // AB Reserved
KEY_EN_UNUSED, // AC Reserved
KEY_EN_UNUSED, // AD Reserved
KEY_EN_UNUSED, // AE Reserved
KEY_EN_UNUSED, // AF Reserved
KEY_EN_UNUSED, // Keypad 00
KEY_EN_UNUSED, // Keypad 000
@@ -317,7 +307,6 @@ static const char *HIDUsageIDsToKeyNames[HID_KEYBOARD_USAGE_IDS_COUNT] =
KEY_EN_UNUSED, // Keypad Octal
KEY_EN_UNUSED, // Keypad Decimal
KEY_EN_UNUSED, // Keypad Hexadecimal
KEY_EN_UNUSED, // DE Reserved
KEY_EN_UNUSED, // DF Reserved
KEY_EN_LEFT_CONTROL, // Keyboard LeftControl
KEY_EN_LEFT_SHIFT, // Keyboard LeftShift
@@ -368,11 +357,9 @@ void RGBController_HIDLampArray::SetupZones()
{
led new_led;
unsigned char lamp_key = controller->GetLamps()[lamp_idx].LampKey;
if(lamp_key < HID_KEYBOARD_USAGE_IDS_COUNT && HIDUsageIDsToKeyNames[lamp_key] != nullptr)
if(controller->GetLamps()[lamp_idx].LampKey < HID_KEYBOARD_USAGE_IDS_COUNT)
{
new_led.name = HIDUsageIDsToKeyNames[lamp_key];
new_led.name = HIDUsageIDsToKeyNames[controller->GetLamps()[lamp_idx].LampKey];
}
else
{
@@ -38,24 +38,17 @@ MSIMotherboard112Controller::MSIMotherboard112Controller(hid_device* handle, con
location = path;
name = dev_name;
/*-----------------------------------------------------*\
| Perform initial reads - get the controller's firmware |
| version and then read the controller's active |
| configuration data |
\*-----------------------------------------------------*/
ReadFwVersion();
ReadSettings();
if(dev)
{
ReadFwVersion();
ReadSettings();
}
/*-----------------------------------------------------*\
| The last byte of the packet is the save flag. This |
| byte is stored as a zero in the data flash, but is |
| set to 1 at the protocol level to tell the firmware |
| to save the active configuration to flash. |
| Also set onboard zone to act as sync master for all |
| of the onboard LEDs. |
| Initialize save flag |
\*-----------------------------------------------------*/
data.save_data = 0;
data.on_board_led.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR | MSI_COLOR_FLAG_SYNC_SETTING_ONBOARD;
data.save_data = 0;
data.on_board_led.colorFlags = 0x81; // force MS bit of color flags to 1 to have expected zone control
/*-----------------------------------------------------*\
| Initialize zone based per LED data |
@@ -63,25 +56,25 @@ MSIMotherboard112Controller::MSIMotherboard112Controller(hid_device* handle, con
numof_onboard_leds = 7;
supported_zones = &zones_set;
zone_based_per_led_data.j_rgb_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.j_rgb_1.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.j_rainbow_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.j_rainbow_1.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_1.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_2.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_3.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_3.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_4.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_4.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_5.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_5.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_6.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_6.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.save_data = 0;
zone_based_per_led_data.j_rgb_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2;
zone_based_per_led_data.j_rgb_1.colorFlags = BITSET(zone_based_per_led_data.j_rgb_1.colorFlags, true, 7u);
zone_based_per_led_data.j_rainbow_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2;
zone_based_per_led_data.j_rainbow_1.colorFlags = BITSET(zone_based_per_led_data.j_rainbow_1.colorFlags, true, 7u);
zone_based_per_led_data.on_board_led.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2;
zone_based_per_led_data.on_board_led.colorFlags = BITSET(zone_based_per_led_data.on_board_led.colorFlags, true, 7u);
zone_based_per_led_data.on_board_led_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2;
zone_based_per_led_data.on_board_led_1.colorFlags = BITSET(zone_based_per_led_data.on_board_led_1.colorFlags, true, 7u);
zone_based_per_led_data.on_board_led_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2;
zone_based_per_led_data.on_board_led_2.colorFlags = BITSET(zone_based_per_led_data.on_board_led_2.colorFlags, true, 7u);
zone_based_per_led_data.on_board_led_3.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2;
zone_based_per_led_data.on_board_led_3.colorFlags = BITSET(zone_based_per_led_data.on_board_led_3.colorFlags, true, 7u);
zone_based_per_led_data.on_board_led_4.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2;
zone_based_per_led_data.on_board_led_4.colorFlags = BITSET(zone_based_per_led_data.on_board_led_4.colorFlags, true, 7u);
zone_based_per_led_data.on_board_led_5.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2;
zone_based_per_led_data.on_board_led_5.colorFlags = BITSET(zone_based_per_led_data.on_board_led_5.colorFlags, true, 7u);
zone_based_per_led_data.on_board_led_6.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << 2 << 2;
zone_based_per_led_data.on_board_led_6.colorFlags = BITSET(zone_based_per_led_data.on_board_led_6.colorFlags, true, 7u);
zone_based_per_led_data.save_data = 0;
direct_mode = false;
}
@@ -100,27 +93,18 @@ void MSIMotherboard112Controller::SetMode
bool rainbow_color
)
{
/*-----------------------------------------------------*\
| Get the zone data pointer within the configuration |
| data buffer |
\*-----------------------------------------------------*/
ZoneData* zone_data = GetZoneData(data, zone);
/*-----------------------------------------------------*\
| Return if zone is invalid |
\*-----------------------------------------------------*/
if(zone_data == nullptr)
{
return;
}
if(zone <= MSI_ZONE_ON_BOARD_LED_0)
if (zone <= MSI_ZONE_ON_BOARD_LED_0)
{
zone_data->effect = mode;
zone_data->speedAndBrightnessFlags = ((brightness << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_MASK)
| ((speed << MSI_SPEED_BRIGHTNESS_FLAG_SPEED_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_SPEED_MASK);
zone_data->colorFlags = (rainbow_color ? (zone_data->colorFlags & ~MSI_COLOR_FLAG_USE_CUSTOM_COLOR)
: (zone_data->colorFlags | MSI_COLOR_FLAG_USE_CUSTOM_COLOR));
zone_data->speedAndBrightnessFlags = (brightness << 2) | (speed & 0x03);
zone_data->colorFlags = (rainbow_color ? 0 : MSI_COLOR_FLAG_USE_CUSTOM_COLOR);
zone_data->padding = 0x00;
if(mode > MSI_MODE_DOUBLE_FLASHING)
@@ -142,10 +126,8 @@ void MSIMotherboard112Controller::SetMode
if(zone_data != nullptr)
{
zone_data->effect = mode;
zone_data->speedAndBrightnessFlags = ((brightness << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_MASK)
| ((speed << MSI_SPEED_BRIGHTNESS_FLAG_SPEED_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_SPEED_MASK);
zone_data->colorFlags = (rainbow_color ? (zone_data->colorFlags & ~MSI_COLOR_FLAG_USE_CUSTOM_COLOR)
: (zone_data->colorFlags | MSI_COLOR_FLAG_USE_CUSTOM_COLOR));
zone_data->speedAndBrightnessFlags = (brightness << 2) | (speed & 0x03);
zone_data->colorFlags = (rainbow_color ? 0 : MSI_COLOR_FLAG_USE_CUSTOM_COLOR);
zone_data->padding = 0x00;
}
}
@@ -219,21 +201,14 @@ void MSIMotherboard112Controller::SetZoneColor
unsigned char blu2
)
{
/*-----------------------------------------------------*\
| Get the zone data pointer within the configuration |
| data buffer |
\*-----------------------------------------------------*/
ZoneData* zone_data = GetZoneData(data, zone);
/*-----------------------------------------------------*\
| Return if zone is invalid |
\*-----------------------------------------------------*/
if(zone_data == nullptr)
{
return;
}
if(zone <= MSI_ZONE_ON_BOARD_LED_0)
if (zone <= MSI_ZONE_ON_BOARD_LED_0)
{
zone_data->color.R = red1;
zone_data->color.G = grn1;
@@ -12,12 +12,9 @@
#include <algorithm>
#include <array>
#include <bitset>
#include "MSIMotherboard162Controller.h"
#include "StringUtils.h"
#define BITSET(val, bit, pos) ((unsigned char)std::bitset<8>(val).set((pos), (bit)).to_ulong())
struct mystic_light_162_config
{
unsigned short pid; // PID of the board
@@ -85,32 +82,24 @@ MSIMotherboard162Controller::MSIMotherboard162Controller(hid_device* handle, con
location = path;
name = dev_name;
/*-----------------------------------------------------*\
| Perform initial reads - get the controller's firmware |
| version and then read the controller's active |
| configuration data |
\*-----------------------------------------------------*/
ReadFwVersion();
ReadSettings();
if(dev)
{
ReadFwVersion();
ReadSettings();
}
/*-----------------------------------------------------*\
| The last byte of the packet is the save flag. This |
| byte is stored as a zero in the data flash, but is |
| set to 1 at the protocol level to tell the firmware |
| to save the active configuration to flash. |
| Also set onboard zone to act as sync master for all |
| of the onboard LEDs. |
| Initialize save flag |
\*-----------------------------------------------------*/
data.save_data = 0;
data.on_board_led.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR | MSI_COLOR_FLAG_SYNC_SETTING_ONBOARD;
data.save_data = 0;
data.on_board_led.colorFlags = 0x81; // force MS bit of color flags to 1 to have expectd zone control
/*-----------------------------------------------------*\
| Search for the board configuration matching this |
| board. |
| Initialize zone based per LED data |
\*-----------------------------------------------------*/
const mystic_light_162_config* board_config = nullptr;
for(std::size_t i = 0; i < NUMOF_CONFIGS; i++)
for(std::size_t i = 0; i < NUMOF_CONFIGS; ++i)
{
if (board_configs[i].pid == pid)
{
@@ -119,10 +108,6 @@ MSIMotherboard162Controller::MSIMotherboard162Controller(hid_device* handle, con
}
}
/*-----------------------------------------------------*\
| Fill in the number of each zone type based on the |
| board configuration |
\*-----------------------------------------------------*/
if(board_config != nullptr)
{
numof_onboard_leds = board_config->numof_onboard_leds;
@@ -149,27 +134,19 @@ void MSIMotherboard162Controller::SetMode
bool rainbow_color
)
{
/*-----------------------------------------------------*\
| Get the zone data pointer within the configuration |
| data buffer |
\*-----------------------------------------------------*/
ZoneData* zone_data = GetZoneData(data, zone);
/*-----------------------------------------------------*\
| Return if zone is invalid |
\*-----------------------------------------------------*/
if(zone_data == nullptr)
{
return;
}
if(zone <= MSI_ZONE_ON_BOARD_LED_0)
if (zone <= MSI_ZONE_ON_BOARD_LED_0)
{
zone_data->effect = mode;
zone_data->speedAndBrightnessFlags = ((brightness << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_MASK)
| ((speed << MSI_SPEED_BRIGHTNESS_FLAG_SPEED_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_SPEED_MASK);
zone_data->colorFlags = (rainbow_color ? (zone_data->colorFlags & ~MSI_COLOR_FLAG_USE_CUSTOM_COLOR)
: (zone_data->colorFlags | MSI_COLOR_FLAG_USE_CUSTOM_COLOR));
zone_data->colorFlags = (rainbow_color ? 0 : MSI_COLOR_FLAG_USE_CUSTOM_COLOR);
zone_data->padding = 0x00;
if(mode > MSI_MODE_DOUBLE_FLASHING)
@@ -193,8 +170,7 @@ void MSIMotherboard162Controller::SetMode
zone_data->effect = mode;
zone_data->speedAndBrightnessFlags = ((brightness << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_MASK)
| ((speed << MSI_SPEED_BRIGHTNESS_FLAG_SPEED_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_SPEED_MASK);
zone_data->colorFlags = (rainbow_color ? (zone_data->colorFlags & ~MSI_COLOR_FLAG_USE_CUSTOM_COLOR)
: (zone_data->colorFlags | MSI_COLOR_FLAG_USE_CUSTOM_COLOR));
zone_data->colorFlags = (rainbow_color ? 0 : MSI_COLOR_FLAG_USE_CUSTOM_COLOR);
zone_data->padding = 0x00;
}
}
@@ -261,21 +237,14 @@ void MSIMotherboard162Controller::SetZoneColor
unsigned char blu2
)
{
/*-----------------------------------------------------*\
| Get the zone data pointer within the configuration |
| data buffer |
\*-----------------------------------------------------*/
ZoneData* zone_data = GetZoneData(data, zone);
/*-----------------------------------------------------*\
| Return if zone is invalid |
\*-----------------------------------------------------*/
if(zone_data == nullptr)
{
return;
}
if(zone <= MSI_ZONE_ON_BOARD_LED_0)
if (zone <= MSI_ZONE_ON_BOARD_LED_0)
{
zone_data->color.R = red1;
zone_data->color.G = grn1;
@@ -17,15 +17,13 @@
#include <algorithm>
#include <array>
#include <bitset>
#include <cstdio>
#include "MSIMotherboard185Controller.h"
#include "LogManager.h"
#include "StringUtils.h"
using namespace std::chrono_literals;
#define BITSET(val, bit, pos) ((unsigned char)std::bitset<8>(val).set((pos), (bit)).to_ulong())
#define SYNC_PER_LED_MODE_JRAINBOW_LED_COUNT 40
#define SYNC_PER_LED_MODE_CORSAIR_LED_COUNT 120
#define JRAINBOW1_MAX_LED_COUNT 200
@@ -33,19 +31,19 @@ using namespace std::chrono_literals;
#define JCORSAIR_MAX_LED_COUNT 240
#define MSI_DIRECT_MODE 0x25
#define PER_LED_BASIC_SYNC_MODE (MSI_COLOR_FLAG_USE_CUSTOM_COLOR | MSI_COLOR_FLAG_SYNC_SETTING_ONBOARD | MSI_COLOR_FLAG_SYNC_SETTING_JPIPE1 | MSI_COLOR_FLAG_SYNC_SETTING_JPIPE2)
#define PER_LED_BASIC_SYNC_MODE (MSI_SPEED_BRIGHTNESS_FLAG_SYNC_SETTING_JRGB | MSI_COLOR_FLAG_SYNC_SETTING_ONBOARD | MSI_COLOR_FLAG_SYNC_SETTING_JPIPE1 | MSI_COLOR_FLAG_SYNC_SETTING_JPIPE2)
#define PER_LED_FULL_SYNC_MODE (PER_LED_BASIC_SYNC_MODE | MSI_COLOR_FLAG_SYNC_SETTING_JRAINBOW1 | MSI_COLOR_FLAG_SYNC_SETTING_JRAINBOW2 | MSI_COLOR_FLAG_SYNC_SETTING_JCORSAIR)
struct mystic_light_185_config
{
unsigned short pid; // PID of the board
int numof_onboard_leds; // number of onboard leds
int numof_pipe1_leds; // number of pipe 1 leds (used in per LED mode only)
int numof_pipe2_leds; // number of pipe 2 leds (used in per LED mode only)
int numof_JRGBs; // number of supported JRGB headers (used in per LED mode only)
const std::vector<MSI_ZONE>* supported_zones; // pointer to vector of supported zones
MSIMotherboard185Controller::DIRECT_MODE per_led_mode; // type of direct mode support
unsigned char minimum_firmware_version; // minimum required firmware version for this config (0 = all versions acceptable)
unsigned short pid; // PID of the board
const char* name; // DMI board name for filtering (nullptr = match any name)
int numof_onboard_leds; // number of onboard leds
int numof_pipe1_leds; // number of pipe 1 leds (used in per LED mode only)
int numof_pipe2_leds; // number of pipe 2 leds (used in per LED mode only)
int numof_JRGBs; // number of supported JRGB headers (used in per LED mode only)
const std::vector<MSI_ZONE>* supported_zones; // pointer to vector of supported zones
MSIMotherboard185Controller::DIRECT_MODE per_led_mode; // type of direct mode support
};
const std::vector<MSI_ZONE> all_zones =
@@ -258,103 +256,105 @@ const std::vector<MSI_ZONE> zones_set21 =
static const mystic_light_185_config board_configs[] =
{
{ 0x7B93, 6, 1, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED, 0 }, // MPG X570 GAMING PRO CARBON WIFI
{ 0x7C34, 0, 1, 1, 1, &zones_set8, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED, 0 }, // MEG X570 GODLIKE
{ 0x7C35, 0, 1, 0, 1, &zones_set9, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED, 0 }, // MEG X570 ACE
{ 0x7C36, 6, 1, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED, 0 }, // PRESTIGE X570 CREATION
{ 0x7C37, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED, 0 }, // MPG X570 GAMING PLUS
{ 0x7C56, 6, 0, 0, 1, &zones_set2, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 6 }, // MPG B550 GAMING PLUS
{ 0x7C59, 0, 8, 0, 1, &zones_set9, MSIMotherboard185Controller::DIRECT_MODE_DISABLED, 0 }, // CREATOR TRX40
{ 0x7C60, 6, 0, 0, 1, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // TRX40-A PRO
{ 0x7C67, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B365M MORTAR
{ 0x7C71, 6, 6, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG Z490 ACE
{ 0x7C73, 6, 4, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z490 GAMING CARBON WIFI
{ 0x7C75, 6, 0, 0, 1, &zones_set2, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z490 GAMING PLUS
{ 0x7C76, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_DISABLED, 0 }, // MPG Z490M GAMING EDGE
{ 0x7C77, 0, 0, 0, 0, &zones_set14, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG Z490I UNIFY
{ 0x7C79, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z490 GAMING EDGE WIFI
{ 0x7C80, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG Z490 TOMAHAWK
{ 0x7C02, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B450 TOMAHAWK MAX
{ 0x7C81, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B460 TOMAHAWK
{ 0x7C82, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B460M MORTAR WIFI
{ 0x7C83, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_DISABLED, 0 }, // B460M PRO-VDH WIFI
{ 0x7C84, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED, 0 }, // MAG X570 TOMAHAWK WIFI
{ 0x7C86, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_DISABLED, 0 }, // MPG B460I GAMING EDGE
{ 0x7C87, 6, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // B450M BAZOOKA MAX WIFI
{ 0x7C90, 6, 4, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG B550 GAMING CARBON WIFI
{ 0x7C91, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B550 TOMAHAWK
{ 0x7C92, 6, 0, 0, 0, &zones_set6, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG B550I GAMING EDGE WIFI
{ 0x7C94, 6, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B550M MORTAR
{ 0x7C95, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // B550M PRO-VDH WIFI
{ 0x7C98, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // Z490 PLUS
{ 0x7D03, 0, 15, 18, 1, &zones_set8, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z590 GODLIKE
{ 0x7D06, 4, 4, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z590 GAMING FORCE
{ 0x7D07, 4, 5, 0, 2, &zones_set7, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z590 GAMING EDGE WIFI
{ 0x7D08, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG Z590 TOMAHAWK
{ 0x7D09, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // Z590-A PRO WIFI
{ 0x7D13, 6, 0, 0, 1, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG B550 UNIFY
{ 0x7D14, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // A520M PRO
{ 0x7D15, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B560 TOMAHAWK WIFI
{ 0x7D17, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B560M MORTAR
{ 0x7D18, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B560M PRO-VDH
{ 0x7D19, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG B560I GAMIING EDGE WIFI
{ 0x7D20, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B560M PRO
{ 0x7D25, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO Z690-A WIFI DDR4
{ 0x7D27, 6, 0, 0, 2, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG Z690 ACE
{ 0x7D28, 6, 0, 0, 1, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG Z690 UNIFY-X
{ 0x7D29, 6, 0, 0, 0, &zones_set6, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG Z690I UNIFY
{ 0x7D30, 6, 6, 0, 2, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z690 CARBON WIFI
{ 0x7D31, 4, 8, 0, 2, &zones_set12, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG EDGE WIFI DDR4
{ 0x7D32, 1, 0, 0, 1, &zones_set10, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG Z690 TOMAHAWK WIFI DDR4
{ 0x7D33, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO Z790-VC WIFI
{ 0x7D36, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO Z690-P DDR4
{ 0x7D37, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO B760M-VC WIFI (MS-7D37) - fans on JRAINBOW2
{ 0x7D38, 0, 0, 0, 1, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG Z590 UNIFY-X
{ 0x7D40, 0, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG B760i EDGE WIFI DDR4
{ 0x7D41, 6, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B660M TOMAHAWK WIFI DDR4
{ 0x7D42, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B660 MORTAR WIFI DDR4
{ 0x7D43, 0, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO B660M-A WIFI DDR4
{ 0x7D46, 0, 1, 1, 0, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO H610M-G DDR4
{ 0x7D50, 6, 12, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG X570S ACE MAX
{ 0x7D51, 6, 0, 0, 2, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG X570S UNIFY-X MAX
{ 0x7D52, 6, 14, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG X570S CARBON EK X
{ 0x7D53, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG X570S EDGE MAX WIFI
{ 0x7D54, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG X570S TOMAHAWK MAX WIFI
{ 0x7D59, 0, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO B660-A DDR4
{ 0x7D67, 0, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO X670-P WIFI
{ 0x7D69, 9, 2, 4, 1, &zones_set15, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG X670E ACE
{ 0x7D70, 0, 6, 0, 1, &zones_set9, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG X670E Carbon WIFI
{ 0x7D73, 1, 0, 0, 0, &zones_set6, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG B650I EDGE WIFI
{ 0x7D74, 0, 6, 0, 1, &zones_set18, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG B650 CARBON WIFI
{ 0x7D75, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B650 TOMAHAWK WIFI
{ 0x7D76, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B650M MORTAR WIFI
{ 0x7D77, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO B650M-A WIFI
{ 0x7D78, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO B650-P WIFI
{ 0x7D86, 0, 18, 4, 1, &zones_set16, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MEG Z790 ACE
{ 0x7D88, 0, 0, 0, 1, &zones_set20, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z790-S WIFI
{ 0x7D89, 0, 6, 0, 1, &zones_set18, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z790 CARBON WIFI
{ 0x7D90, 0, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // B760M BOMBER DDR4
{ 0x7D91, 1, 0, 0, 1, &zones_set10, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG Z790 TOMAHAWK WIFI
{ 0x7D93, 6, 0, 0, 1, &zones_set2, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // Z790 GAMING PRO WIFI
{ 0x7D96, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B760 TOMAHAWK WIFI DDR5
{ 0x7D97, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B660 MORTAR MAX WIFI DDR4
{ 0x7D98, 0, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO B760-P WIFI DDR4
{ 0x7D99, 6, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO B760M-A WIFI DDR4
{ 0x7E01, 0, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG B760M MORTAR MAX
{ 0x7E03, 6, 0, 0, 0, &zones_set6, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG Z790I EDGE WIFI
{ 0x7E06, 0, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO Z790-P WIFI DDR4
{ 0x7E07, 0, 0, 0, 2, &zones_set10, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO Z790-A WIFI DDR4
{ 0x7E09, 0, 0, 0, 0, &zones_set19, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // B650M PROJECT ZERO
{ 0x7E10, 0, 6, 0, 2, &zones_set17, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MPG B650 EDGE WIFI
{ 0x7E12, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG X670E TOMAHAWK WIFI
{ 0x0076, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // MAG X670E TOMAHAWK WIFI (Common PID)
{ 0x7E16, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // X670E GAMING PLUS WIFI
{ 0x7E24, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // B650M GAMING PLUS WIFI
{ 0x7E26, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // B650 GAMING PLUS WIFI
{ 0x7E27, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED, 0 }, // PRO B650M-P
{ 0x7E28, 6, 0, 0, 2, &zones_set21, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED, 0 }, // MSI PRO A620M-B (MS-7E28)
{ 0x7B93, nullptr, 6, 1, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED }, // MPG X570 GAMING PRO CARBON WIFI
{ 0x7C34, nullptr, 0, 1, 1, 1, &zones_set8, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED }, // MEG X570 GODLIKE
{ 0x7C35, nullptr, 0, 1, 0, 1, &zones_set9, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED }, // MEG X570 ACE
{ 0x7C36, nullptr, 6, 1, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED }, // PRESTIGE X570 CREATION
{ 0x7C37, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED }, // MPG X570 GAMING PLUS
{ 0x7C56, "MSI B550-A PRO (MS-7C56)", 6, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B550-A PRO
{ 0x7C56, "MSI MPG B550 GAMING PLUS (MS-7C56)", 6, 0, 0, 1, &zones_set2, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B550 GAMING PLUS
{ 0x7C59, nullptr, 0, 8, 0, 1, &zones_set9, MSIMotherboard185Controller::DIRECT_MODE_DISABLED }, // CREATOR TRX40
{ 0x7C60, nullptr, 6, 0, 0, 1, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // TRX40-A PRO
{ 0x7C67, nullptr, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B365M MORTAR
{ 0x7C71, nullptr, 6, 6, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG Z490 ACE
{ 0x7C73, nullptr, 6, 4, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z490 GAMING CARBON WIFI
{ 0x7C75, nullptr, 6, 0, 0, 1, &zones_set2, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z490 GAMING PLUS
{ 0x7C76, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_DISABLED }, // MPG Z490M GAMING EDGE
{ 0x7C77, nullptr, 0, 0, 0, 0, &zones_set14, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG Z490I UNIFY
{ 0x7C79, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z490 GAMING EDGE WIFI
{ 0x7C80, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG Z490 TOMAHAWK
{ 0x7C02, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B450 TOMAHAWK MAX
{ 0x7C81, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B460 TOMAHAWK
{ 0x7C82, nullptr, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B460M MORTAR WIFI
{ 0x7C83, nullptr, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_DISABLED }, // B460M PRO-VDH WIFI
{ 0x7C84, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED }, // MAG X570 TOMAHAWK WIFI
{ 0x7C86, nullptr, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_DISABLED }, // MPG B460I GAMING EDGE
{ 0x7C87, nullptr, 6, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // B450M BAZOOKA MAX WIFI
{ 0x7C90, nullptr, 6, 4, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B550 GAMING CARBON WIFI
{ 0x7C91, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B550 TOMAHAWK
{ 0x7C92, nullptr, 6, 0, 0, 0, &zones_set6, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B550I GAMING EDGE WIFI
{ 0x7C94, nullptr, 6, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B550M MORTAR
{ 0x7C95, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // B550M PRO-VDH WIFI
{ 0x7C98, nullptr, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // Z490 PLUS
{ 0x7D03, nullptr, 0, 15, 18, 1, &zones_set8, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z590 GODLIKE
{ 0x7D06, nullptr, 4, 4, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z590 GAMING FORCE
{ 0x7D07, nullptr, 4, 5, 0, 2, &zones_set7, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z590 GAMING EDGE WIFI
{ 0x7D08, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG Z590 TOMAHAWK
{ 0x7D09, nullptr, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // Z590-A PRO WIFI
{ 0x7D13, nullptr, 6, 0, 0, 1, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG B550 UNIFY
{ 0x7D14, nullptr, 6, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // A520M PRO
{ 0x7D15, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B560 TOMAHAWK WIFI
{ 0x7D17, nullptr, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B560M MORTAR
{ 0x7D18, nullptr, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B560M PRO-VDH
{ 0x7D19, nullptr, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B560I GAMIING EDGE WIFI
{ 0x7D20, nullptr, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B560M PRO
{ 0x7D25, nullptr, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO Z690-A WIFI DDR4
{ 0x7D27, nullptr, 6, 0, 0, 2, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG Z690 ACE
{ 0x7D28, nullptr, 6, 0, 0, 1, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG Z690 UNIFY-X
{ 0x7D29, nullptr, 6, 0, 0, 0, &zones_set6, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG Z690I UNIFY
{ 0x7D30, nullptr, 6, 6, 0, 2, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z690 CARBON WIFI
{ 0x7D31, nullptr, 4, 8, 0, 2, &zones_set12, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG EDGE WIFI DDR4
{ 0x7D32, nullptr, 1, 0, 0, 1, &zones_set10, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG Z690 TOMAHAWK WIFI DDR4
{ 0x7D33, nullptr, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO Z790-VC WIFI
{ 0x7D36, nullptr, 6, 0, 0, 2, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO Z690-P DDR4
{ 0x7D37, nullptr, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO B760M-VC WIFI (MS-7D37) - fans on JRAINBOW2
{ 0x7D38, nullptr, 0, 0, 0, 1, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG Z590 UNIFY-X
{ 0x7D40, nullptr, 0, 0, 0, 1, &zones_set5, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B760i EDGE WIFI DDR4
{ 0x7D41, nullptr, 6, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B660M TOMAHAWK WIFI DDR4
{ 0x7D42, nullptr, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B660 MORTAR WIFI DDR4
{ 0x7D43, nullptr, 0, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO B660M-A WIFI DDR4
{ 0x7D46, nullptr, 0, 1, 1, 0, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO H610M-G DDR4
{ 0x7D50, nullptr, 6, 12, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG X570S ACE MAX
{ 0x7D51, nullptr, 6, 0, 0, 2, &zones_set1, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG X570S UNIFY-X MAX
{ 0x7D52, nullptr, 6, 14, 0, 1, &zones_set3, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG X570S CARBON EK X
{ 0x7D53, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG X570S EDGE MAX WIFI
{ 0x7D54, nullptr, 6, 0, 0, 2, &zones_set0, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG X570S TOMAHAWK MAX WIFI
{ 0x7D59, nullptr, 0, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO B660-A DDR4
{ 0x7D67, nullptr, 0, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO X670-P WIFI
{ 0x7D69, nullptr, 9, 2, 4, 1, &zones_set15, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG X670E ACE
{ 0x7D70, nullptr, 0, 6, 0, 1, &zones_set9, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG X670E Carbon WIFI
{ 0x7D73, nullptr, 1, 0, 0, 0, &zones_set6, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B650I EDGE WIFI
{ 0x7D74, nullptr, 0, 6, 0, 1, &zones_set18, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B650 CARBON WIFI
{ 0x7D75, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B650 TOMAHAWK WIFI
{ 0x7D76, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B650M MORTAR WIFI
{ 0x7D77, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO B650M-A WIFI
{ 0x7D78, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO B650-P WIFI
{ 0x7D86, nullptr, 0, 18, 4, 1, &zones_set16, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MEG Z790 ACE
{ 0x7D88, nullptr, 0, 0, 0, 1, &zones_set20, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z790-S WIFI
{ 0x7D89, nullptr, 0, 6, 0, 1, &zones_set18, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z790 CARBON WIFI
{ 0x7D90, nullptr, 0, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // B760M BOMBER DDR4
{ 0x7D91, nullptr, 1, 0, 0, 1, &zones_set10, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG Z790 TOMAHAWK WIFI
{ 0x7D93, nullptr, 6, 0, 0, 1, &zones_set2, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // Z790 GAMING PRO WIFI
{ 0x7D96, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B760 TOMAHAWK WIFI DDR5
{ 0x7D97, nullptr, 6, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B660 MORTAR MAX WIFI DDR4
{ 0x7D98, nullptr, 0, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO B760-P WIFI DDR4
{ 0x7D99, nullptr, 6, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO B760M-A WIFI DDR4
{ 0x7E01, nullptr, 0, 0, 0, 1, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG B760M MORTAR MAX
{ 0x7E03, nullptr, 6, 0, 0, 0, &zones_set6, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG Z790I EDGE WIFI
{ 0x7E06, nullptr, 0, 0, 0, 2, &zones_set11, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO Z790-P WIFI DDR4
{ 0x7E07, nullptr, 0, 0, 0, 2, &zones_set10, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO Z790-A WIFI DDR4
{ 0x7E09, nullptr, 0, 0, 0, 0, &zones_set19, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // B650M PROJECT ZERO
{ 0x7E10, nullptr, 0, 6, 0, 2, &zones_set17, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MPG B650 EDGE WIFI
{ 0x7E12, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG X670E TOMAHAWK WIFI
{ 0x0076, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // MAG X670E TOMAHAWK WIFI (Common PID)
{ 0x7E16, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // X670E GAMING PLUS WIFI
{ 0x7E24, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // B650M GAMING PLUS WIFI
{ 0x7E26, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // B650 GAMING PLUS WIFI
{ 0x7E27, nullptr, 0, 0, 0, 2, &zones_set13, MSIMotherboard185Controller::DIRECT_MODE_PER_LED }, // PRO B650M-P
{ 0x7E28, nullptr, 6, 0, 0, 2, &zones_set21, MSIMotherboard185Controller::DIRECT_MODE_ZONE_BASED }, // MSI PRO A620M-B (MS-7E28)
};
FeaturePacket_185 enable_per_led_msg;
Color* per_led_onboard_leds;
@@ -365,17 +365,32 @@ Color* per_led_jrainbow1_sync;
Color* per_led_jrainbow2_sync;
Color* per_led_jcorsair_sync;
/*-----------------------------------------------------*\
| Static helper to check if a zone is supported by the |
| given supported_zones vector |
\*-----------------------------------------------------*/
bool MSIMotherboard185Controller::IsZoneSupported(MSI_ZONE zone, const std::vector<MSI_ZONE>* supported_zones)
{
if(supported_zones == nullptr)
{
return false;
}
return std::find(supported_zones->begin(), supported_zones->end(), zone) != supported_zones->end();
}
MSIMotherboard185Controller::MSIMotherboard185Controller(hid_device* handle, const char* path, unsigned short pid, std::string dev_name)
{
dev = handle;
location = path;
name = dev_name;
version_invalid = false;
dev = handle;
location = path;
name = dev_name;
/*-----------------------------------------------------*\
| Read the controller's firmware version |
| Perform initial reads - get the controller's firmware |
| version and then read the controller's active |
| configuration data |
\*-----------------------------------------------------*/
ReadFwVersion();
ReadConfigurationData();
/*-----------------------------------------------------*\
| Common PID boards embed their virtual PID in the |
@@ -402,11 +417,10 @@ MSIMotherboard185Controller::MSIMotherboard185Controller(hid_device* handle, con
| byte is stored as a zero in the data flash, but is |
| set to 1 at the protocol level to tell the firmware |
| to save the active configuration to flash. |
| Also set onboard zone to act as sync master for all |
| of the onboard LEDs. |
\*-----------------------------------------------------*/
data.save_data = 0;
data.on_board_led.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR | MSI_COLOR_FLAG_SYNC_SETTING_ONBOARD;
configuration_data.save_data = 0;
configuration_data.on_board_led.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR | MSI_COLOR_FLAG_SYNC_SETTING_ONBOARD; // always enable onboard sync flag to have expected zone control
/*-----------------------------------------------------*\
| Search for the board configuration matching this |
@@ -414,23 +428,36 @@ MSIMotherboard185Controller::MSIMotherboard185Controller(hid_device* handle, con
\*-----------------------------------------------------*/
const mystic_light_185_config* board_config = nullptr;
for(std::size_t i = 0; i < NUMOF_CONFIGS; i++)
/*-----------------------------------------------------*\
| First pass: look for a config that matches both PID |
| and board name (when name is specified in the config) |
\*-----------------------------------------------------*/
for(std::size_t i = 0; i < NUMOF_CONFIGS; ++i)
{
if(board_configs[i].pid == pid)
if(board_configs[i].pid == pid && board_configs[i].name != nullptr)
{
board_config = &board_configs[i];
break;
if(name.find(board_configs[i].name) != std::string::npos)
{
board_config = &board_configs[i];
break;
}
}
}
/*-----------------------------------------------------*\
| If the firmware version is below the minimum, set |
| invalid version flag and return |
| Second pass: fall back to PID-only match for entries |
| without a name filter (backward compatible) |
\*-----------------------------------------------------*/
if(version_APROM_val < board_config->minimum_firmware_version)
if(board_config == nullptr)
{
version_invalid = true;
return;
for(std::size_t i = 0; i < NUMOF_CONFIGS; ++i)
{
if(board_configs[i].pid == pid && board_configs[i].name == nullptr)
{
board_config = &board_configs[i];
break;
}
}
}
/*-----------------------------------------------------*\
@@ -456,11 +483,6 @@ MSIMotherboard185Controller::MSIMotherboard185Controller(hid_device* handle, con
per_led_mode = DIRECT_MODE_DISABLED;
}
/*-----------------------------------------------------*\
| Read the controller's active configuration data |
\*-----------------------------------------------------*/
ReadSettings();
/*-----------------------------------------------------*\
| Initialize per-LED data |
\*-----------------------------------------------------*/
@@ -516,84 +538,49 @@ MSIMotherboard185Controller::MSIMotherboard185Controller(hid_device* handle, con
| Set up per-LED switching message for synchronized |
| mode. |
\*-----------------------------------------------------*/
memset(&enable_per_led_msg, 0, sizeof(enable_per_led_msg));
enable_per_led_msg.j_rgb_1.speedAndBrightnessFlags = 0x08;
enable_per_led_msg.j_rgb_1.colorFlags = 0x80;
enable_per_led_msg.j_rgb_1.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.j_pipe_1.speedAndBrightnessFlags = 0x2A;
enable_per_led_msg.j_pipe_1.colorFlags = 0x80;
enable_per_led_msg.j_pipe_1.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.j_pipe_2.speedAndBrightnessFlags = 0x2A;
enable_per_led_msg.j_pipe_2.colorFlags = 0x80;
enable_per_led_msg.j_pipe_2.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.j_rainbow_1.speedAndBrightnessFlags = 0x29;
enable_per_led_msg.j_rainbow_1.colorFlags = 0x80;
enable_per_led_msg.j_rainbow_1.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.j_rainbow_1.cycle_or_led_num = 0x28;
enable_per_led_msg.j_rainbow_2.speedAndBrightnessFlags = 0x29;
enable_per_led_msg.j_rainbow_2.colorFlags = 0x80;
enable_per_led_msg.j_rainbow_2.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.j_rainbow_2.cycle_or_led_num = 0x28;
enable_per_led_msg.j_corsair.fan_flags = 0x29;
enable_per_led_msg.j_corsair.corsair_quantity = 0x00;
enable_per_led_msg.j_corsair.padding[2] = 0x82;
enable_per_led_msg.j_corsair.is_individual = 0x78;
enable_per_led_msg.j_corsair_outerll120.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.j_corsair_outerll120.colorFlags = 0x80;
enable_per_led_msg.j_corsair_outerll120.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led.effect = MSI_DIRECT_MODE;
enable_per_led_msg.on_board_led.speedAndBrightnessFlags = 0x29 | MSI_SPEED_BRIGHTNESS_FLAG_SYNC_SETTING_JRGB;
enable_per_led_msg.on_board_led.colorFlags = PER_LED_FULL_SYNC_MODE;
enable_per_led_msg.on_board_led_1.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_1.colorFlags = 0x80;
enable_per_led_msg.on_board_led_1.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led_2.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_2.colorFlags = 0x80;
enable_per_led_msg.on_board_led_2.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led_3.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_3.colorFlags = 0x80;
enable_per_led_msg.on_board_led_3.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led_4.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_4.colorFlags = 0x80;
enable_per_led_msg.on_board_led_4.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led_5.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_5.colorFlags = 0x80;
enable_per_led_msg.on_board_led_5.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led_6.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_6.colorFlags = 0x80;
enable_per_led_msg.on_board_led_6.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led_7.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_7.colorFlags = 0x80;
enable_per_led_msg.on_board_led_7.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led_8.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_8.colorFlags = 0x80;
enable_per_led_msg.on_board_led_8.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.on_board_led_9.speedAndBrightnessFlags = 0x28;
enable_per_led_msg.on_board_led_9.colorFlags = 0x80;
enable_per_led_msg.on_board_led_9.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.j_rgb_2.speedAndBrightnessFlags = 0x2A;
enable_per_led_msg.j_rgb_2.colorFlags = 0x80;
/*-----------------------------------------------------*\
| Initialize zone based per LED data |
\*-----------------------------------------------------*/
zone_based_per_led_data.j_rgb_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.j_rgb_1.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.j_pipe_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.j_pipe_1.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.j_pipe_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.j_pipe_2.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.j_rainbow_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.j_rainbow_1.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.j_rainbow_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.j_rainbow_2.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_1.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_2.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_3.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_3.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_4.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_4.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_5.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_5.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_6.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_6.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_7.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_7.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_8.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_8.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.on_board_led_9.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.on_board_led_9.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.j_rgb_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
zone_based_per_led_data.j_rgb_2.colorFlags |= MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
zone_based_per_led_data.save_data = 0;
enable_per_led_msg.j_rgb_2.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
enable_per_led_msg.save_data = 0;
direct_mode = false;
direct_mode_configured = false;
@@ -605,11 +592,6 @@ MSIMotherboard185Controller::~MSIMotherboard185Controller()
hid_close(dev);
}
bool MSIMotherboard185Controller::GetFirmwareVersionInvalid()
{
return(version_invalid);
}
void MSIMotherboard185Controller::SetMode
(
MSI_ZONE zone,
@@ -628,7 +610,7 @@ void MSIMotherboard185Controller::SetMode
| Get the zone data pointer within the configuration |
| data buffer |
\*-----------------------------------------------------*/
ZoneData* zone_data = GetZoneData(data, zone);
ZoneData* zone_data = GetZoneData(configuration_data, zone);
/*-----------------------------------------------------*\
| Return if zone is invalid |
@@ -644,8 +626,7 @@ void MSIMotherboard185Controller::SetMode
zone_data->effect = mode;
zone_data->speedAndBrightnessFlags = ((brightness << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_MASK)
| ((speed << MSI_SPEED_BRIGHTNESS_FLAG_SPEED_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_SPEED_MASK);
zone_data->colorFlags = (rainbow_color ? (zone_data->colorFlags & ~MSI_COLOR_FLAG_USE_CUSTOM_COLOR)
: (zone_data->colorFlags | MSI_COLOR_FLAG_USE_CUSTOM_COLOR));
zone_data->colorFlags = (rainbow_color ? 0 : MSI_COLOR_FLAG_USE_CUSTOM_COLOR);
/*-----------------------------------------------------*\
| J_RAINBOW_3 zone needs padding of 4 |
@@ -655,7 +636,7 @@ void MSIMotherboard185Controller::SetMode
/*-----------------------------------------------------*\
| Get the zone data pointer to the on-board LED 0 zone |
\*-----------------------------------------------------*/
ZoneData* on_board_zone = GetZoneData(data, MSI_ZONE_ON_BOARD_LED_0);
ZoneData* on_board_zone = GetZoneData(configuration_data, MSI_ZONE_ON_BOARD_LED_0);
/*-----------------------------------------------------*\
| If the zone is JRGB or JPIPE and the board has no |
@@ -664,13 +645,11 @@ void MSIMotherboard185Controller::SetMode
\*-----------------------------------------------------*/
if(no_onboards && ((zone == MSI_ZONE_J_RGB_1) || (zone == MSI_ZONE_J_RGB_2) || (zone == MSI_ZONE_J_PIPE_1) || (zone == MSI_ZONE_J_PIPE_2)))
{
on_board_zone->effect = zone_data->effect;
zone_data->speedAndBrightnessFlags = ((brightness << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_MASK)
| ((speed << MSI_SPEED_BRIGHTNESS_FLAG_SPEED_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_SPEED_MASK);
zone_data->colorFlags = (rainbow_color ? (zone_data->colorFlags & ~MSI_COLOR_FLAG_USE_CUSTOM_COLOR)
: (zone_data->colorFlags | MSI_COLOR_FLAG_USE_CUSTOM_COLOR));
on_board_zone->colorFlags |= MSI_COLOR_FLAG_SYNC_SETTING_ONBOARD;
on_board_zone->padding = 0x00;
on_board_zone->effect = zone_data->effect;
on_board_zone->speedAndBrightnessFlags = zone_data->speedAndBrightnessFlags;
on_board_zone->colorFlags = zone_data->colorFlags;
on_board_zone->colorFlags |= MSI_COLOR_FLAG_SYNC_SETTING_ONBOARD;
on_board_zone->padding = 0x00;
}
/*-----------------------------------------------------*\
@@ -696,15 +675,14 @@ void MSIMotherboard185Controller::SetMode
{
for(int i = 0; i < numof_onboard_leds; ++i)
{
zone_data = GetZoneData(data, (MSI_ZONE)((int)MSI_ZONE_ON_BOARD_LED_1 + i));
zone_data = GetZoneData(configuration_data, (MSI_ZONE)((int)MSI_ZONE_ON_BOARD_LED_1 + i));
if(zone_data != nullptr)
{
zone_data->effect = mode;
zone_data->speedAndBrightnessFlags = ((brightness << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_MASK)
| ((speed << MSI_SPEED_BRIGHTNESS_FLAG_SPEED_SHIFT) & MSI_SPEED_BRIGHTNESS_FLAG_SPEED_MASK);
zone_data->colorFlags = (rainbow_color ? (zone_data->colorFlags & ~MSI_COLOR_FLAG_USE_CUSTOM_COLOR)
: (zone_data->colorFlags | MSI_COLOR_FLAG_USE_CUSTOM_COLOR));
zone_data->colorFlags = (rainbow_color ? 0 : MSI_COLOR_FLAG_USE_CUSTOM_COLOR);
zone_data->padding = 0x00;
}
}
@@ -739,12 +717,33 @@ std::string MSIMotherboard185Controller::GetSerial()
return(StringUtils::wstring_to_string(serial_string));
}
bool MSIMotherboard185Controller::ReadSettings()
bool MSIMotherboard185Controller::ReadConfigurationData()
{
/*-----------------------------------------------------*\
| Read packet from hardware, return true if successful |
\*-----------------------------------------------------*/
return(hid_get_feature_report(dev, (unsigned char*)&data, sizeof(data)) == sizeof data);
int ret = hid_get_feature_report(dev, (unsigned char*)&configuration_data, sizeof(configuration_data));
/*-----------------------------------------------------*\
| Log the configuration data in hex at TRACE level |
\*-----------------------------------------------------*/
if(LogManager::get()->GetLogLevel() >= LL_TRACE)
{
LOG_TRACE("[MSIMotherboard185Controller] Read configuration data packet (%zu bytes):", sizeof(configuration_data));
for(size_t i = 0; i < sizeof(configuration_data); i += 16)
{
std::string hex_line = "";
for(size_t j = i; j < i + 16 && j < sizeof(configuration_data); j++)
{
char buf[4];
snprintf(buf, sizeof(buf), "%02X ", ((unsigned char*)&configuration_data)[j]);
hex_line += buf;
}
LOG_TRACE(" %04zX: %s", i, hex_line.c_str());
}
}
return(ret == sizeof configuration_data);
}
bool MSIMotherboard185Controller::Update
@@ -825,27 +824,43 @@ bool MSIMotherboard185Controller::Update
}
else
{
return(hid_send_feature_report(dev, (unsigned char*)&zone_based_per_led_data, sizeof(zone_based_per_led_data)) == sizeof(zone_based_per_led_data));
return(hid_send_feature_report(dev, (unsigned char*)&configuration_data, sizeof(configuration_data)) == sizeof(configuration_data));
}
}
else
{
/*-------------------------------------------------*\
| Save new state, read current state from board, |
| send old state first, then new state. |
| Windows Mystic Light sends two consecutive |
| reports. |
| Set the save flag |
\*-------------------------------------------------*/
FeaturePacket_185 new_data = data;
memcpy((unsigned char*)&new_data, (unsigned char*)&data, sizeof(data));
configuration_data.save_data = save;
ReadSettings();
data.save_data = save;
hid_send_feature_report(dev, (unsigned char*)&data, sizeof(data));
/*-------------------------------------------------*\
| Save a copy of the new configuration data |
\*-------------------------------------------------*/
FeaturePacket_185 new_configuration;
memcpy((unsigned char*)&data, (unsigned char*)&new_data, sizeof(data));
data.save_data = save;
return(hid_send_feature_report(dev, (unsigned char*)&data, sizeof(data)) == sizeof(data));
memcpy((unsigned char*)&new_configuration, (unsigned char*)&configuration_data, sizeof(configuration_data));
/*-------------------------------------------------*\
| Read the existing configuration data |
\*-------------------------------------------------*/
ReadConfigurationData();
/*-------------------------------------------------*\
| First, send a copy of the existing configuration |
| data |
\*-------------------------------------------------*/
hid_send_feature_report(dev, (unsigned char*)&configuration_data, sizeof(configuration_data));
/*-------------------------------------------------*\
| Second, restore the new configuration data into |
| the buffer and then send it. MSI software on |
| Windows sends the old data followed by new data |
| so this mimics that flow. |
\*-------------------------------------------------*/
memcpy((unsigned char*)&configuration_data, (unsigned char*)&new_configuration, sizeof(new_configuration));
return(hid_send_feature_report(dev, (unsigned char*)&configuration_data, sizeof(configuration_data)) == sizeof(configuration_data));
}
}
@@ -869,7 +884,7 @@ void MSIMotherboard185Controller::SetZoneColor
| Get the zone data pointer within the configuration |
| data buffer |
\*-----------------------------------------------------*/
ZoneData* zone_data = GetZoneData(data, zone);
ZoneData* zone_data = GetZoneData(configuration_data, zone);
/*-----------------------------------------------------*\
| Return if zone is invalid |
@@ -896,7 +911,7 @@ void MSIMotherboard185Controller::SetZoneColor
\*-----------------------------------------------------*/
if(no_onboards && ((zone == MSI_ZONE_J_RGB_1) || (zone == MSI_ZONE_J_RGB_2) || (zone == MSI_ZONE_J_PIPE_1) || (zone == MSI_ZONE_J_PIPE_2)))
{
ZoneData* on_board_zone = GetZoneData(data, MSI_ZONE_ON_BOARD_LED_0);
ZoneData* on_board_zone = GetZoneData(configuration_data, MSI_ZONE_ON_BOARD_LED_0);
on_board_zone->color.R = red1;
on_board_zone->color.G = grn1;
@@ -914,7 +929,7 @@ void MSIMotherboard185Controller::SetZoneColor
{
for(int i = 0; i < numof_onboard_leds; ++i)
{
zone_data = GetZoneData(data, (MSI_ZONE)((int)MSI_ZONE_ON_BOARD_LED_1 + i));
zone_data = GetZoneData(configuration_data, (MSI_ZONE)((int)MSI_ZONE_ON_BOARD_LED_1 + i));
if(zone_data != nullptr)
{
@@ -982,17 +997,27 @@ void MSIMotherboard185Controller::SetLedColor
\*-----------------------------------------------------*/
else
{
/*-------------------------------------------------*\
| The JRAINBOW and JPIPE zones have a single LED |
| each at the RGBController layer, so index must be |
| 0. |
\*-------------------------------------------------*/
if(((zone == MSI_ZONE_J_RAINBOW_1) || (zone == MSI_ZONE_J_RAINBOW_2) || (zone == MSI_ZONE_J_PIPE_1) || (zone == MSI_ZONE_J_PIPE_2)) && (index != 0))
{
return;
}
/*-------------------------------------------------*\
| The onboard LEDs are treated as a single zone by |
| the RGBController layer, so LED index is used to |
| select which onboard LED zone in the |
| configuration data to update with the given color.|
\*-------------------------------------------------*/
if(zone >= MSI_ZONE_ON_BOARD_LED_0)
{
zone = (MSI_ZONE)((int)zone + index + 1);
}
ZoneData *zone_data = GetZoneData(zone_based_per_led_data, zone);
ZoneData *zone_data = GetZoneData(configuration_data, zone);
if(zone_data == nullptr)
{
@@ -1135,11 +1160,11 @@ RainbowZoneData *MSIMotherboard185Controller::GetRainbowZoneData
switch(zone)
{
case MSI_ZONE_J_RAINBOW_1:
return &data.j_rainbow_1;
return &configuration_data.j_rainbow_1;
case MSI_ZONE_J_RAINBOW_2:
return &data.j_rainbow_2;
return &configuration_data.j_rainbow_2;
case MSI_ZONE_J_RAINBOW_3:
return (RainbowZoneData*)&data.j_corsair;
return (RainbowZoneData*)&configuration_data.j_corsair;
case MSI_ZONE_J_CORSAIR:
default:
return nullptr;
@@ -1181,8 +1206,6 @@ bool MSIMotherboard185Controller::ReadFwVersion()
ret_val &= hid_write(dev, request, 64);
ret_val &= hid_read(dev, response, 64);
version_APROM_val = response[2];
/*-----------------------------------------------------*\
| Extract high and low values from response |
\*-----------------------------------------------------*/
@@ -1232,14 +1255,14 @@ bool MSIMotherboard185Controller::ReadFwVersion()
MSI_MODE MSIMotherboard185Controller::GetMode()
{
if(data.on_board_led.effect == MSI_DIRECT_MODE)
if(configuration_data.on_board_led.effect == MSI_DIRECT_MODE)
{
direct_mode = true;
return MSI_MODE_DIRECT_DUMMY;
}
else
{
return (MSI_MODE)data.j_rainbow_1.effect;
return (MSI_MODE)configuration_data.j_rainbow_1.effect;
}
}
@@ -1254,9 +1277,10 @@ void MSIMotherboard185Controller::GetMode
)
{
/*-----------------------------------------------------*\
| Get data for given zone |
| Get the zone data pointer within the configuration |
| data buffer |
\*-----------------------------------------------------*/
ZoneData *zone_data = GetZoneData(data, zone);
ZoneData *zone_data = GetZoneData(configuration_data, zone);
/*-----------------------------------------------------*\
| Return if zone is invalid |
@@ -1426,6 +1450,48 @@ bool MSIMotherboard185Controller::SelectPerLedProtocol()
if(direct_mode)
{
/*-------------------------------------------------*\
| Initialize configuration data for direct mode. |
| This sets up brightness and color flags for all |
| zones, which is only done when actually entering |
| direct mode to preserve the state read from the |
| controller for normal (non-direct) mode |
| operation. |
\*-------------------------------------------------*/
configuration_data.j_rgb_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.j_rgb_1.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.j_pipe_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.j_pipe_1.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.j_pipe_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.j_pipe_2.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.j_rainbow_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.j_rainbow_1.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.j_rainbow_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.j_rainbow_2.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_1.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_1.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_2.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_3.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_3.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_4.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_4.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_5.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_5.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_6.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_6.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_7.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_7.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_8.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_8.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.on_board_led_9.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.on_board_led_9.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.j_rgb_2.speedAndBrightnessFlags = MSI_BRIGHTNESS_LEVEL_100 << MSI_SPEED_BRIGHTNESS_FLAG_BRIGHTNESS_SHIFT;
configuration_data.j_rgb_2.colorFlags = MSI_COLOR_FLAG_USE_CUSTOM_COLOR;
configuration_data.save_data = 0;
if(per_led_mode == DIRECT_MODE_PER_LED)
{
if(hid_send_feature_report(dev, (unsigned char*)&enable_per_led_msg, sizeof(enable_per_led_msg)) != sizeof(enable_per_led_msg))
@@ -46,7 +46,6 @@ public:
);
MSI_MODE GetMode();
bool GetFirmwareVersionInvalid();
void GetMode
(
@@ -120,16 +119,21 @@ private:
std::string name;
std::string location;
std::string version_APROM;
unsigned char version_APROM_val;
bool version_invalid;
std::string version_LDROM;
FeaturePacket_185 data;
/*-----------------------------------------------------*\
| Configuration Data, mirrors the configuration block |
| stored in the microcontroller's data flash |
\*-----------------------------------------------------*/
FeaturePacket_185 configuration_data;
/*-----------------------------------------------------*\
| Per-LED Direct Mode packet buffers for each zone |
\*-----------------------------------------------------*/
FeaturePacket_PerLED_185 per_led_data_onboard_and_sync;
FeaturePacket_PerLED_185 per_led_data_jrainbow1;
FeaturePacket_PerLED_185 per_led_data_jrainbow2;
FeaturePacket_PerLED_185 per_led_data_jcorsair;
FeaturePacket_185 zone_based_per_led_data;
bool direct_mode;
bool direct_mode_configured;
bool sync_direct_mode;
@@ -145,7 +149,7 @@ private:
const std::vector<MSI_ZONE>* supported_zones;
DIRECT_MODE per_led_mode;
bool ReadSettings();
bool ReadConfigurationData();
bool ReadFwVersion();
ZoneData* GetZoneData
(
@@ -158,4 +162,6 @@ private:
MSI_ZONE zone
);
bool SelectPerLedProtocol();
static bool IsZoneSupported(MSI_ZONE zone, const std::vector<MSI_ZONE>* supported_zones);
};
@@ -119,6 +119,59 @@ int RGBController_MSIMotherboard185::GetDeviceMode()
return 0;
}
void RGBController_MSIMotherboard185::SetupModes()
{
constexpr unsigned int COMMON = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_MANUAL_SAVE;
constexpr unsigned int MODE_SPECIFIC_ONLY = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_MANUAL_SAVE;
constexpr unsigned int RANDOM_ONLY = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_MANUAL_SAVE;
if(controller->GetSupportedDirectMode() != MSIMotherboard185Controller::DIRECT_MODE_DISABLED)
{
SetupMode("Direct", MSI_MODE_DIRECT_DUMMY, MODE_FLAG_HAS_PER_LED_COLOR);
}
SetupMode("Static", MSI_MODE_STATIC, MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_MANUAL_SAVE);
// SetupMode("Off", MSI_MODE_DISABLE, 0);
SetupMode("Breathing", MSI_MODE_BREATHING, MODE_SPECIFIC_ONLY);
SetupMode("Flashing", MSI_MODE_FLASHING, COMMON);
SetupMode("Double flashing", MSI_MODE_DOUBLE_FLASHING, COMMON);
SetupMode("Lightning", MSI_MODE_LIGHTNING, MODE_SPECIFIC_ONLY);
// SetupMode("MSI Marquee", MSI_MODE_MSI_MARQUEE, COMMON);
SetupMode("Meteor", MSI_MODE_METEOR, COMMON);
// SetupMode("Water drop", MSI_MODE_WATER_DROP, COMMON);
// SetupMode("MSI Rainbow", MSI_MODE_MSI_RAINBOW, RANDOM_ONLY);
// SetupMode("Pop", MSI_MODE_POP, COMMON);
// SetupMode("Rap", MSI_MODE_RAP, COMMON);
// SetupMode("Jazz", MSI_MODE_JAZZ, COMMON);
// SetupMode("Play", MSI_MODE_PLAY, COMMON);
// SetupMode("Movie", MSI_MODE_MOVIE, COMMON);
SetupMode("Color ring", MSI_MODE_COLOR_RING, RANDOM_ONLY);
SetupMode("Planetary", MSI_MODE_PLANETARY, RANDOM_ONLY);
SetupMode("Double meteor", MSI_MODE_DOUBLE_METEOR, RANDOM_ONLY);
SetupMode("Energy", MSI_MODE_ENERGY, RANDOM_ONLY);
SetupMode("Blink", MSI_MODE_BLINK, COMMON);
SetupMode("Clock", MSI_MODE_CLOCK, RANDOM_ONLY);
SetupMode("Color pulse", MSI_MODE_COLOR_PULSE, COMMON);
SetupMode("Color shift", MSI_MODE_COLOR_SHIFT, RANDOM_ONLY);
SetupMode("Color wave", MSI_MODE_COLOR_WAVE, COMMON);
SetupMode("Marquee", MSI_MODE_MARQUEE, MODE_SPECIFIC_ONLY);
// SetupMode("Rainbow", MSI_MODE_RAINBOW, COMMON);
SetupMode("Rainbow wave", MSI_MODE_RAINBOW_WAVE, RANDOM_ONLY);
SetupMode("Visor", MSI_MODE_VISOR, COMMON);
// SetupMode("JRainbow", MSI_MODE_JRAINBOW, COMMON);
SetupMode("Rainbow flashing", MSI_MODE_RAINBOW_FLASHING, RANDOM_ONLY);
// SetupMode("Rainbow double flashing", MSI_MODE_RAINBOW_DOUBLE_FLASHING, COMMON);
// SetupMode("Random", MSI_MODE_RANDOM, COMMON);
// SetupMode("Fan control", MSI_MODE_FAN_CONTROL, COMMON);
// SetupMode("Off 2", MSI_MODE_DISABLE_2, COMMON);
// SetupMode("Color ring flashing", MSI_MODE_COLOR_RING_FLASHING, COMMON);
SetupMode("Color ring double flashing", MSI_MODE_COLOR_RING_DOUBLE_FLASHING, RANDOM_ONLY);
SetupMode("Stack", MSI_MODE_STACK, COMMON);
// SetupMode("Corsair Que", MSI_MODE_CORSAIR_QUE, COMMON);
SetupMode("Fire", MSI_MODE_FIRE, RANDOM_ONLY);
// SetupMode("Lava", MSI_MODE_LAVA, COMMON);
}
void RGBController_MSIMotherboard185::SetupZones()
{
/*-----------------------------------------------------*\
@@ -279,7 +332,8 @@ void RGBController_MSIMotherboard185::DeviceUpdateLEDs()
UpdateLed((int)zone_idx, led_idx);
}
}
controller->Update((modes[active_mode].flags & MODE_FLAG_AUTOMATIC_SAVE) != 0);
controller->Update(false);
}
void RGBController_MSIMotherboard185::DeviceUpdateZoneLEDs(int zone)
@@ -293,7 +347,8 @@ void RGBController_MSIMotherboard185::DeviceUpdateZoneLEDs(int zone)
{
UpdateLed(zone, led_idx);
}
controller->Update((modes[active_mode].flags & MODE_FLAG_AUTOMATIC_SAVE) != 0);
controller->Update(false);
}
void RGBController_MSIMotherboard185::DeviceUpdateSingleLED
@@ -316,7 +371,8 @@ void RGBController_MSIMotherboard185::DeviceUpdateSingleLED
int led_index = led - zones[zone_index].start_idx;
UpdateLed(zone_index, led_index);
controller->Update((modes[active_mode].flags & MODE_FLAG_AUTOMATIC_SAVE) != 0);
controller->Update(false);
}
void RGBController_MSIMotherboard185::DeviceUpdateMode()
@@ -328,8 +384,40 @@ void RGBController_MSIMotherboard185::DeviceUpdateMode()
else
{
controller->SetDirectMode(false);
DeviceUpdateLEDs();
/*-------------------------------------------------*\
| Set mode configuration for all zones |
\*-------------------------------------------------*/
for(std::size_t zone_idx = 0; zone_idx < zones.size(); ++zone_idx)
{
if(zones[zone_idx].leds_count > 0)
{
bool random = modes[active_mode].color_mode == MODE_COLORS_RANDOM;
MSI_MODE mode = (MSI_MODE)modes[active_mode].value;
MSI_SPEED speed = (MSI_SPEED)modes[active_mode].speed;
MSI_BRIGHTNESS brightness = (MSI_BRIGHTNESS)modes[active_mode].brightness;
controller->SetMode((MSI_ZONE)zones[zone_idx].leds[0].value, mode, speed, brightness, random);
/*-----------------------------------------*\
| Set mode-specific colors if available |
\*-----------------------------------------*/
if(modes[active_mode].flags & MODE_FLAG_HAS_MODE_SPECIFIC_COLOR)
{
unsigned char red = 0, grn = 0, blu = 0;
if(modes[active_mode].colors.size() > 0)
{
red = RGBGetRValue(modes[active_mode].colors[0]);
grn = RGBGetGValue(modes[active_mode].colors[0]);
blu = RGBGetBValue(modes[active_mode].colors[0]);
}
controller->SetZoneColor((MSI_ZONE)zones[zone_idx].leds[0].value, red, grn, blu, red, grn, blu);
}
}
}
}
controller->Update(false);
}
void RGBController_MSIMotherboard185::DeviceSaveMode()
@@ -337,59 +425,6 @@ void RGBController_MSIMotherboard185::DeviceSaveMode()
controller->Update(true);
}
void RGBController_MSIMotherboard185::SetupModes()
{
constexpr unsigned int PER_LED_ONLY = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_MANUAL_SAVE;
constexpr unsigned int RANDOM_ONLY = MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_MANUAL_SAVE;
constexpr unsigned int COMMON = RANDOM_ONLY | MODE_FLAG_HAS_PER_LED_COLOR;
if(controller->GetSupportedDirectMode() != MSIMotherboard185Controller::DIRECT_MODE_DISABLED)
{
SetupMode("Direct", MSI_MODE_DIRECT_DUMMY, MODE_FLAG_HAS_PER_LED_COLOR);
}
SetupMode("Static", MSI_MODE_STATIC, MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_MANUAL_SAVE);
// SetupMode("Off", MSI_MODE_DISABLE, 0);
SetupMode("Breathing", MSI_MODE_BREATHING, PER_LED_ONLY);
SetupMode("Flashing", MSI_MODE_FLASHING, COMMON);
SetupMode("Double flashing", MSI_MODE_DOUBLE_FLASHING, COMMON);
SetupMode("Lightning", MSI_MODE_LIGHTNING, PER_LED_ONLY);
// SetupMode("MSI Marquee", MSI_MODE_MSI_MARQUEE, COMMON);
SetupMode("Meteor", MSI_MODE_METEOR, COMMON);
// SetupMode("Water drop", MSI_MODE_WATER_DROP, COMMON);
// SetupMode("MSI Rainbow", MSI_MODE_MSI_RAINBOW, RANDOM_ONLY);
// SetupMode("Pop", MSI_MODE_POP, COMMON);
// SetupMode("Rap", MSI_MODE_RAP, COMMON);
// SetupMode("Jazz", MSI_MODE_JAZZ, COMMON);
// SetupMode("Play", MSI_MODE_PLAY, COMMON);
// SetupMode("Movie", MSI_MODE_MOVIE, COMMON);
SetupMode("Color ring", MSI_MODE_COLOR_RING, RANDOM_ONLY);
SetupMode("Planetary", MSI_MODE_PLANETARY, RANDOM_ONLY);
SetupMode("Double meteor", MSI_MODE_DOUBLE_METEOR, RANDOM_ONLY);
SetupMode("Energy", MSI_MODE_ENERGY, RANDOM_ONLY);
SetupMode("Blink", MSI_MODE_BLINK, COMMON);
SetupMode("Clock", MSI_MODE_CLOCK, RANDOM_ONLY);
SetupMode("Color pulse", MSI_MODE_COLOR_PULSE, COMMON);
SetupMode("Color shift", MSI_MODE_COLOR_SHIFT, RANDOM_ONLY);
SetupMode("Color wave", MSI_MODE_COLOR_WAVE, COMMON);
SetupMode("Marquee", MSI_MODE_MARQUEE, PER_LED_ONLY);
// SetupMode("Rainbow", MSI_MODE_RAINBOW, COMMON);
SetupMode("Rainbow wave", MSI_MODE_RAINBOW_WAVE, RANDOM_ONLY);
SetupMode("Visor", MSI_MODE_VISOR, COMMON);
// SetupMode("JRainbow", MSI_MODE_JRAINBOW, COMMON);
SetupMode("Rainbow flashing", MSI_MODE_RAINBOW_FLASHING, RANDOM_ONLY);
// SetupMode("Rainbow double flashing", MSI_MODE_RAINBOW_DOUBLE_FLASHING, COMMON);
// SetupMode("Random", MSI_MODE_RANDOM, COMMON);
// SetupMode("Fan control", MSI_MODE_FAN_CONTROL, COMMON);
// SetupMode("Off 2", MSI_MODE_DISABLE_2, COMMON);
// SetupMode("Color ring flashing", MSI_MODE_COLOR_RING_FLASHING, COMMON);
SetupMode("Color ring double flashing", MSI_MODE_COLOR_RING_DOUBLE_FLASHING, RANDOM_ONLY);
SetupMode("Stack", MSI_MODE_STACK, COMMON);
// SetupMode("Corsair Que", MSI_MODE_CORSAIR_QUE, COMMON);
SetupMode("Fire", MSI_MODE_FIRE, RANDOM_ONLY);
// SetupMode("Lava", MSI_MODE_LAVA, COMMON);
}
void RGBController_MSIMotherboard185::UpdateLed
(
int zone,
@@ -404,19 +439,6 @@ void RGBController_MSIMotherboard185::UpdateLed
{
controller->SetLedColor((MSI_ZONE)(zones[zone].leds[led].value), led, red, grn, blu);
}
else
{
if(led == 0)
{
bool random = modes[active_mode].color_mode == MODE_COLORS_RANDOM;
MSI_MODE mode = (MSI_MODE)modes[active_mode].value;
MSI_SPEED speed = (MSI_SPEED)modes[active_mode].speed;
MSI_BRIGHTNESS brightness = (MSI_BRIGHTNESS)modes[active_mode].brightness;
controller->SetMode((MSI_ZONE)zones[zone].leds[led].value, mode, speed, brightness, random);
controller->SetZoneColor((MSI_ZONE)zones[zone].leds[led].value, red, grn, blu, red, grn, blu);
}
}
}
void RGBController_MSIMotherboard185::SetupMode
@@ -435,6 +457,14 @@ void RGBController_MSIMotherboard185::SetupMode
{
Mode.color_mode = MODE_COLORS_PER_LED;
}
else if(flags & MODE_FLAG_HAS_MODE_SPECIFIC_COLOR)
{
Mode.color_mode = MODE_COLORS_MODE_SPECIFIC;
Mode.colors_min = 1;
Mode.colors_max = 1;
Mode.colors.resize(1);
Mode.colors[0] = ToRGBColor(255, 255, 255);
}
else
{
Mode.color_mode = MODE_COLORS_RANDOM;
@@ -512,19 +542,24 @@ void RGBController_MSIMotherboard185::GetDeviceConfig()
{
modes[i].brightness = brightness;
}
if(rainbow)
if(modes[i].flags & (MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR))
{
if(modes[i].flags & (MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_RANDOM_COLOR))
if(rainbow && (modes[i].flags & MODE_FLAG_HAS_RANDOM_COLOR))
{
if(rainbow)
modes[i].color_mode = MODE_COLORS_RANDOM;
}
else if(modes[i].flags & MODE_FLAG_HAS_MODE_SPECIFIC_COLOR)
{
modes[i].color_mode = MODE_COLORS_MODE_SPECIFIC;
if(modes[i].colors.size() > 0)
{
modes[i].color_mode = MODE_COLORS_RANDOM;
}
else
{
modes[i].color_mode = MODE_COLORS_PER_LED;
modes[i].colors[0] = color;
}
}
else
{
modes[i].color_mode = MODE_COLORS_PER_LED;
}
}
break;
}
@@ -72,13 +72,10 @@ static const std::string board_names[] =
"MSI MAG B850 TOMAHAWK WIFI (MS-7E53)",
"MSI MEG Z890 UNIFY-X (MS-7E20)",
"MSI PRO X870E-S EVO WIFI (MS-7E86)",
"MSI MAG X870E GAMING MAX WIFI (MS-7E86)",
"MSI PRO Z890-P WIFI (MS-7E34)",
"MSI B850 GAMING PLUS WIFI PZ (MS-7E75)",
"MSI MAG X870E TOMAHAWK MAX WIFI PZ (MS-7E84)",
"MSI PRO B850M-A WIFI PZ (MS-7E78)",
"MSI B850MPOWER (MS-7E83)",
"MSI B840M GAMING WIFI6E (MS-7E76)"
};
static const mystic_light_761_config board_configs[] =
@@ -108,13 +105,10 @@ static const mystic_light_761_config board_configs[] =
{ &(board_names[22]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MAG B850 TOMAHAWK WIFI (MS-7E53)
{ &(board_names[23]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MEG Z890 UNIFY-X (MS-7E20)
{ &(board_names[24]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI PRO X870E-S EVO WIFI (MS-7E86)
{ &(board_names[25]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MAG X870E GAMING MAX WIFI (MS-7E86)
{ &(board_names[26]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI PRO Z890-P WIFI (MS-7E34)
{ &(board_names[27]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI B850 GAMING PLUS WIFI PZ (MS-7E75)
{ &(board_names[28]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MAG X870E TOMAHAWK MAX WIFI PZ (MS-7E84)
{ &(board_names[29]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI PRO B850M-A WIFI PZ (MS-7E78)
{ &(board_names[30]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI B850MPOWER (MS-7E83)
{ &(board_names[31]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI B840M GAMING WIFI6E (MS-7E76)
{ &(board_names[25]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI PRO Z890-P WIFI (MS-7E34)
{ &(board_names[26]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI B850 GAMING PLUS WIFI PZ (MS-7E75)
{ &(board_names[27]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MAG X870E TOMAHAWK MAX WIFI PZ (MS-7E84)
{ &(board_names[28]), 0, 0, 0, 1, &zone_set1, MSIMotherboard761Controller::DIRECT_MODE_ZONE_BASED }, // MSI PRO B850M-A WIFI PZ (MS-7E78)
};
enum MSI_ZONE setup_map [] =
@@ -54,17 +54,9 @@ DetectedControllers DetectMSIMotherboardControllers(hid_device_info* info, const
if((packet_length >= sizeof(FeaturePacket_185)) && (packet_length <= (sizeof(FeaturePacket_185) + 1))) //WHY r we doing this ? why not ==
{
MSIMotherboard185Controller* controller = new MSIMotherboard185Controller(dev, info->path, info->product_id, dmi_name);
RGBController_MSIMotherboard185* rgb_controller = new RGBController_MSIMotherboard185(controller);
if(controller->GetFirmwareVersionInvalid())
{
LOG_WARNING("[MSIMotherboard185] Controller firmware below minimum supported version, skipping");
}
else
{
RGBController_MSIMotherboard185* rgb_controller = new RGBController_MSIMotherboard185(controller);
detected_controllers.push_back(rgb_controller);
}
detected_controllers.push_back(rgb_controller);
}
else if((packet_length >= sizeof(FeaturePacket_162)) && (packet_length <= (sizeof(FeaturePacket_162) + 1)))
{
@@ -231,11 +223,9 @@ REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E70", DetectMSIMotherboardCont
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E59", DetectMSIMotherboardControllers, MSI_USB_VID, 0x7E59, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E80", DetectMSIMotherboardControllers, MSI_USB_VID, 0x7E80, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E81", DetectMSIMotherboardControllers, MSI_USB_VID, 0x7E81, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E86", DetectMSIMotherboardControllers, MSI_USB_VID, 0x7E86, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E34", DetectMSIMotherboardControllers, MSI_USB_VID, 0x7E34, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E32", DetectMSIMotherboardControllers, MSI_USB_VID, 0x7E32, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E20", DetectMSIMotherboardControllers, MSI_USB_VID, 0x7E20, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E76", DetectMSIMotherboardControllers, MSI_USB_VID, 0x7E76, 0x0001, 0x00);
// Detector for the set of common boards
REGISTER_HID_DETECTOR_PU("MSI Mystic Light Common", DetectMSIMotherboardControllers, MSI_USB_VID_COMMON, MSI_USB_PID_COMMON, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light X870", DetectMSIMotherboardControllers, MSI_USB_VID_COMMON, MSI_USB_PID_COMMON, 0xFF00, 0x01);
@@ -246,7 +236,6 @@ REGISTER_CUSTOM_UDEV_RULE(msi_7e24, "MSI Mystic Light MS_7E24", "SUBSYSTEMS==\"u
REGISTER_CUSTOM_UDEV_RULE(msi_7e26, "MSI Mystic Light MS_7E26", "SUBSYSTEMS==\"usb|hidraw\", ATTRS{idVendor}==\"1462\", ATTRS{idProduct}==\"7e26\", TAG+=\"uaccess\", TAG+=\"MSI_Mystic_Light_MS_7E26\"");
REGISTER_CUSTOM_UDEV_RULE(msi_7e27, "MSI Mystic Light MS_7E27", "SUBSYSTEMS==\"usb|hidraw\", ATTRS{idVendor}==\"1462\", ATTRS{idProduct}==\"7e27\", TAG+=\"uaccess\", TAG+=\"MSI_Mystic_Light_MS_7E27\"");
REGISTER_CUSTOM_UDEV_RULE(msi_7e49, "MSI Mystic Light MS_7E49", "SUBSYSTEMS==\"usb|hidraw\", ATTRS{idVendor}==\"1462\", ATTRS{idProduct}==\"7e49\", TAG+=\"uaccess\", TAG+=\"MSI_Mystic_Light_MS_7E49\"");
REGISTER_CUSTOM_UDEV_RULE(msi_7e76, "MSI Mystic Light MS_7E76", "SUBSYSTEMS==\"usb|hidraw\", ATTRS{idVendor}==\"1462\", ATTRS{idProduct}==\"7e76\", TAG+=\"uaccess\", TAG+=\"MSI_Mystic_Light_MS_7E76\"");
#ifdef ENABLE_UNTESTED_MYSTIC_LIGHT
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_3EA4", DetectMSIMotherboardControllers, MSI_USB_VID, 0x3EA4, 0x0001, 0x00);
@@ -56,7 +56,6 @@ static const nv_gpu_pci_device device_list[] =
{NVIDIA_VEN, NVIDIA_RTX3060_8G_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX3060_8G_DEV, NVIDIA_ILLUMINATION_V1, TREATS_RGBW_AS_RGB, "Gainward GeForce RTX 3060 Pegasus" },
{NVIDIA_VEN, NVIDIA_RTX3060_LHR_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX3060_LHR_DEV, NVIDIA_ILLUMINATION_V1, TREATS_RGBW_AS_RGB, "Palit GeForce RTX 3060 LHR" },
{NVIDIA_VEN, NVIDIA_RTX3060_LHR_DEV, PNY_SUB_VEN, PNY_RTX_3060_XLR8_REVEL_EPIC_X_SUB_DEV, NVIDIA_ILLUMINATION_V1, TREATS_RGBW_AS_RGB, "PNY GeForce RTX 3060 XLR8 REVEL EPIC-X" },
{NVIDIA_VEN, NVIDIA_RTX3060_LHR_DEV, PNY_SUB_VEN, PNY_RTX_3060_XLR8_REVEL_EPIC_X_LHR_SUB_DEV, NVIDIA_ILLUMINATION_V1, TREATS_RGBW_AS_RGB, "PNY GeForce RTX 3060 XLR8 REVEL EPIC-X LHR" },
{NVIDIA_VEN, NVIDIA_RTX3060_GA104_DEV, PNY_SUB_VEN, PNY_RTX_3060_XLR8_REVEL_EPIC_X_SUB_DEV, NVIDIA_ILLUMINATION_V1, TREATS_RGBW_AS_RGB, "PNY GeForce RTX 3060 XLR8 REVEL EPIC-X" },
{NVIDIA_VEN, NVIDIA_RTX3060_GA104_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX3060_GA104_DEV, NVIDIA_ILLUMINATION_V1, TREATS_RGBW_AS_RGB, "Palit GeForce RTX 3060 LHR" },
{NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, PNY_SUB_VEN, PNY_RTX_3060TI_XLR8_REVEL_EPIC_X_SUB_DEV, NVIDIA_ILLUMINATION_V1, TREATS_RGBW_AS_RGB, "PNY GeForce RTX 3060 Ti XLR8 REVEL EPIC-X" },
@@ -0,0 +1,112 @@
/*---------------------------------------------------------*\
| PNYGPUController.cpp |
| |
| Driver for PNY Turing GPU |
| |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "PNYGPUController.h"
PNYGPUController::PNYGPUController(i2c_smbus_interface* bus, pny_dev_id dev, std::string name)
{
this->bus = bus;
this->dev = dev;
this->name = name;
}
PNYGPUController::~PNYGPUController()
{
}
std::string PNYGPUController::GetDeviceName()
{
return(name);
}
std::string PNYGPUController::GetDeviceLocation()
{
std::string return_string(bus->info.device_name);
char addr[5];
snprintf(addr, 5, "0x%02X", dev);
return_string.append(", address ");
return_string.append(addr);
return("I2C: " + return_string);
}
void PNYGPUController::WriteI2CData(u8 command, u8 length, u8* data)
{
//Simulating i2c_smbus_write_i2c_block_data(command, length, data);
for (u8 i = 0; i < length; i++)
{
bus->i2c_smbus_write_byte_data(dev, command+i, data[i]);
}
}
unsigned char PNYGPUController::GetMode()
{
return(bus->i2c_smbus_read_byte_data(dev, PNY_GPU_MODE_OFF));
}
unsigned char PNYGPUController::GetRed()
{
return(bus->i2c_smbus_read_byte_data(dev, PNY_GPU_REG_COLOR_RED));
}
unsigned char PNYGPUController::GetGreen()
{
return(bus->i2c_smbus_read_byte_data(dev, PNY_GPU_REG_COLOR_GREEN));
}
unsigned char PNYGPUController::GetBlue()
{
return(bus->i2c_smbus_read_byte_data(dev, PNY_GPU_REG_COLOR_BLUE));
}
void PNYGPUController::SetOff()
{
bus->i2c_smbus_write_byte_data(dev, PNY_GPU_REG_CONTROL, 0);
bus->i2c_smbus_write_byte_data(dev, PNY_GPU_REG_MODE, 0x00);
}
void PNYGPUController::SetCycle(unsigned char speed)
{
u8 loop[] = {
0x01, // Direction
0x00, // ??
speed, // Speed
0x1F // Somehow related to speed
};
loop[2] = speed;
WriteI2CData(PNY_GPU_REG_CONTROL, sizeof(loop), loop);
}
void PNYGPUController::SetStrobe(unsigned char r, unsigned char g, unsigned char b, unsigned char speed, unsigned char brightness)
{
u8 strobe[] = {
0x02, // Strobe
0x00, // Rise speed
speed, // Cycle length/2
0x00, // Off delay
r, // R
g, // G
b, // B
brightness, // Peak brightness
0x05 // Fade speed
};
WriteI2CData(PNY_GPU_REG_CONTROL, sizeof(strobe), strobe);
}
void PNYGPUController::SetDirect(unsigned char red, unsigned char green, unsigned char blue, unsigned char brightness)
{
bus->i2c_smbus_write_byte_data(dev, PNY_GPU_REG_CONTROL, 0);
bus->i2c_smbus_write_byte_data(dev, PNY_GPU_REG_MODE, 0x01);
bus->i2c_smbus_write_byte_data(dev, PNY_GPU_REG_COLOR_RED, red);
bus->i2c_smbus_write_byte_data(dev, PNY_GPU_REG_COLOR_BLUE, blue);
bus->i2c_smbus_write_byte_data(dev, PNY_GPU_REG_COLOR_GREEN, green);
bus->i2c_smbus_write_byte_data(dev, PNY_GPU_REG_COLOR_BRIGHTNESS, brightness);
}
@@ -0,0 +1,62 @@
/*---------------------------------------------------------*\
| PNYGPUController.h |
| |
| Driver for PNY Turing GPU |
| |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include <string>
#include "i2c_smbus.h"
typedef unsigned char pny_dev_id;
enum
{
PNY_GPU_REG_CONTROL = 0xE0,
PNY_GPU_REG_MODE = 0x60,
PNY_GPU_REG_COLOR_RED = 0x6C,
PNY_GPU_REG_COLOR_GREEN = 0x6D,
PNY_GPU_REG_COLOR_BLUE = 0x6E,
PNY_GPU_REG_COLOR_BRIGHTNESS = 0x6F,
};
enum
{
PNY_GPU_MODE_OFF = 0x00,
PNY_GPU_MODE_DIRECT = 0x01,
PNY_GPU_MODE_CYCLE = 0x02,
PNY_GPU_MODE_STROBE = 0x03,
};
class PNYGPUController
{
public:
PNYGPUController(i2c_smbus_interface* bus, pny_dev_id dev, std::string name);
~PNYGPUController();
std::string GetDeviceName();
std::string GetDeviceLocation();
void SetOff();
void SetCycle(unsigned char speed);
void SetStrobe(unsigned char r, unsigned char g, unsigned char b, unsigned char speed, unsigned char brightness);
void SetDirect(unsigned char red, unsigned char green, unsigned char blue, unsigned char brightness);
private:
i2c_smbus_interface* bus;
pny_dev_id dev;
std::string name;
void WriteI2CData(u8 command, u8 length, u8* data);
unsigned char GetMode();
unsigned char GetRed();
unsigned char GetGreen();
unsigned char GetBlue();
};
@@ -0,0 +1,76 @@
/*---------------------------------------------------------*\
| PNYGPUControllerDetect.cpp |
| |
| Detector for PNY Turing GPU |
| |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "DetectionManager.h"
#include "i2c_smbus.h"
#include "pci_ids.h"
#include "PNYGPUController.h"
#include "RGBController_PNYGPU.h"
DetectedControllers DetectPNYGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
{
DetectedControllers detected_controllers;
if(bus->info.port_id == 1)
{
PNYGPUController* controller = new PNYGPUController(bus, i2c_addr, name);
RGBController_PNYGPU* rgb_controller = new RGBController_PNYGPU(controller);
detected_controllers.push_back(rgb_controller);
}
return(detected_controllers);
}
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 2060 XLR8 OC EDITION", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX2060_TU104_DEV, PNY_SUB_VEN, PNY_RTX_2060_XLR8_OC_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3060 XLR8 Revel EPIC-X", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060_DEV, PNY_SUB_VEN, PNY_RTX_3060_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3070 XLR8 Revel EPIC-X", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, PNY_SUB_VEN, PNY_RTX_3070_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3070 XLR8 Revel EPIC-X LHR", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_LHR_DEV, PNY_SUB_VEN, PNY_RTX_3070_XLR8_REVEL_EPIC_X_LHR_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3080 XLR8 Revel EPIC-X", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080_DEV, PNY_SUB_VEN, PNY_RTX_3080_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3080 Ti XLR8 Revel EPIC-X", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080TI_DEV, PNY_SUB_VEN, PNY_RTX_3080TI_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3090 XLR8 Revel EPIC-X", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3090_DEV, PNY_SUB_VEN, PNY_RTX_3090_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 2070 SUPER Jetstream", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX2070S_OC_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060_DEV, PALIT_SUB_VEN, PALIT_RTX3060_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060 LHR", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3060_LHR_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060 Ti", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_DEV, PALIT_SUB_VEN, PALIT_RTX3060TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060 Ti LHR", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, PALIT_SUB_VEN, NVIDIA_RTX3060TI_LHR_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060 Ti Dual", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_DEV, NVIDIA_SUB_VEN, PALIT_RTX3060TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3070", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, PALIT_SUB_VEN, PALIT_RTX3070_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3070 LHR", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3070_LHR_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3070 Gamerock LHR", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3070_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3070 Ti", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070TI_DEV, PALIT_SUB_VEN, PALIT_RTX3070TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3070 Ti GamingPro", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070TI_DEV, PALIT_SUB_VEN, PALIT_RTX3070TI_GAMING_PRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080_DEV, PALIT_SUB_VEN, PALIT_RTX3080_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080 LHR", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3080_LHR_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080 Gamerock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080_DEV, PALIT_SUB_VEN, PALIT_RTX3080_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080 Gamerock LHR", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3080_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080 12GB GamingPro", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080_12G_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3080_GAMINGPRO_12G_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080 Ti", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080TI_DEV, PALIT_SUB_VEN, PALIT_RTX3080TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080 Ti Gamerock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3080TI_DEV, PALIT_SUB_VEN, PALIT_RTX3080TI_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3090", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3090_DEV, PALIT_SUB_VEN, PALIT_RTX3090_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3090 Gamerock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3090_DEV, PALIT_SUB_VEN, PALIT_RTX3090_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3090 Ti Gamerock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX3090TI_DEV, PALIT_SUB_VEN, PALIT_RTX3090TI_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4070 Ti", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX4070TI_DEV, PALIT_SUB_VEN, PALIT_RTX4070TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4070 Ti Gamerock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX4070TI_DEV, PALIT_SUB_VEN, PALIT_RTX4070TI_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4070 Ti SUPER GamingPro", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX4070TIS_DEV, PALIT_SUB_VEN, PALIT_RTX4080_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4080 GamingPro", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX4080_DEV, PALIT_SUB_VEN, PALIT_RTX4080_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4080 SUPER GamingPro", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX4080S_DEV, PALIT_SUB_VEN, PALIT_RTX4080_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4090 Gamerock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, PALIT_SUB_VEN, PALIT_RTX4090_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5060 Ti White OC 16GB", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX5060TI_DEV, PALIT_SUB_VEN, PALIT_RTX5060TI_WHITE_OC_16G_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5070 GamingPro", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, PALIT_SUB_VEN, PALIT_RTX5070_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5070 Ti GameRock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PALIT_SUB_VEN, PALIT_RTX5070TI_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5070 Ti GamingPro", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PALIT_SUB_VEN, PALIT_RTX5070TI_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5070 Ti GamingPro-S", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PALIT_SUB_VEN, PALIT_RTX5070TI_GAMINGPRO_S_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5080 GameRock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, PALIT_SUB_VEN, PALIT_RTX5080_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5080 GamingPro", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, PALIT_SUB_VEN, PALIT_RTX5080_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5090 Gamerock", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, PALIT_SUB_VEN, PALIT_RTX5090_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("NVIDIA GeForce RTX 2060 SUPER", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX2060_TU106_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX2060_TU106_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("NVIDIA GeForce RTX 2080 SUPER", DetectPNYGPUControllers, NVIDIA_VEN, NVIDIA_RTX2080S_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX2080S_DEV, 0x49);
@@ -0,0 +1,161 @@
/*---------------------------------------------------------*\
| RGBController_PNYGPU.cpp |
| |
| RGBController for PNY Turing GPU |
| |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "RGBController_PNYGPU.h"
/**------------------------------------------------------------------*\
@name PNY GPU
@category GPU
@type I2C
@save :x:
@direct :white_check_mark:
@effects :white_check_mark:
@detectors DetectPNYGPUControllers
@comment
\*-------------------------------------------------------------------*/
RGBController_PNYGPU::RGBController_PNYGPU(PNYGPUController* controller_ptr)
{
controller = controller_ptr;
name = controller->GetDeviceName();
vendor = name.substr(0, name.find(' '));
description = "PNY/Palit RGB GPU Device";
location = controller->GetDeviceLocation();
type = DEVICE_TYPE_GPU;
mode Off;
Off.name = "Off";
Off.value = PNY_GPU_MODE_OFF;
Off.flags = 0;
Off.color_mode = MODE_COLORS_NONE;
modes.push_back(Off);
mode Direct;
Direct.name = "Direct";
Direct.value = PNY_GPU_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR| MODE_FLAG_HAS_BRIGHTNESS;
Direct.brightness = 255;
Direct.brightness_min = 0;
Direct.brightness_max = 100;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
mode Cycle;
Cycle.name = "Cycle";
Cycle.value = PNY_GPU_MODE_CYCLE;
Cycle.flags = MODE_FLAG_HAS_SPEED;
Cycle.speed = 3;
Cycle.speed_max = 0;
Cycle.speed_max = 100;
Cycle.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Cycle);
mode Strobe;
Strobe.name = "Strobe";
Strobe.value = PNY_GPU_MODE_STROBE;
Strobe.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS;
Strobe.speed = 2;
Strobe.speed_max = 0;
Strobe.speed_max = 255;
Strobe.brightness = 255;
Strobe.brightness_min = 0;
Strobe.brightness_max = 100;
Strobe.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Strobe);
SetupZones();
// Initialize active mode
active_mode = 0;
}
RGBController_PNYGPU::~RGBController_PNYGPU()
{
Shutdown();
delete controller;
}
void RGBController_PNYGPU::SetupZones()
{
/*---------------------------------------------------------*\
| This device only has one LED, so create a single zone and |
| LED for it |
\*---------------------------------------------------------*/
zone* new_zone = new zone();
led* new_led = new led();
new_zone->name = "GPU Zone";
new_zone->type = ZONE_TYPE_SINGLE;
new_zone->leds_min = 1;
new_zone->leds_max = 1;
new_zone->leds_count = 1;
new_led->name = "GPU LED";
/*---------------------------------------------------------*\
| Push the zone and LED on to device vectors |
\*---------------------------------------------------------*/
leds.push_back(*new_led);
zones.push_back(*new_zone);
SetupColors();
}
void RGBController_PNYGPU::DeviceUpdateLEDs()
{
DeviceUpdateMode();
}
void RGBController_PNYGPU::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_PNYGPU::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}
void RGBController_PNYGPU::DeviceUpdateMode()
{
RGBColor color = colors[0];
unsigned char r = RGBGetRValue(color);
unsigned char g = RGBGetGValue(color);
unsigned char b = RGBGetBValue(color);
unsigned char speed, brightness;
switch(modes[active_mode].value)
{
case PNY_GPU_MODE_OFF:
controller->SetOff();
break;
case PNY_GPU_MODE_DIRECT:
brightness = modes[active_mode].brightness;
controller->SetDirect(r, g, b, brightness);
break;
case PNY_GPU_MODE_CYCLE:
speed = modes[active_mode].speed;
controller->SetCycle(speed);
break;
case PNY_GPU_MODE_STROBE:
speed = modes[active_mode].speed;
brightness = modes[active_mode].brightness;
controller->SetStrobe(r, g, b, speed, brightness);
break;
default:
break;
}
}
@@ -0,0 +1,33 @@
/*---------------------------------------------------------*\
| RGBController_PNYGPU.h |
| |
| RGBController for PNY Turing GPU |
| |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "PNYGPUController.h"
class RGBController_PNYGPU : public RGBController
{
public:
RGBController_PNYGPU(PNYGPUController* controller_ptr);
~RGBController_PNYGPU();
void SetupZones();
void DeviceUpdateLEDs();
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
PNYGPUController* controller;
};
@@ -0,0 +1,46 @@
/*---------------------------------------------------------*\
| PalitGPUController.cpp |
| |
| Driver for Palit GPU |
| |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "PalitGPUController.h"
PalitGPUController::PalitGPUController(i2c_smbus_interface* bus, palit_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
PalitGPUController::~PalitGPUController()
{
}
std::string PalitGPUController::GetDeviceLocation()
{
std::string return_string(bus->info.device_name);
char addr[5];
snprintf(addr, 5, "0x%02X", dev);
return_string.append(", address ");
return_string.append(addr);
return("I2C: " + return_string);
}
std::string PalitGPUController::GetName()
{
return(name);
}
void PalitGPUController::SetDirect(unsigned char red, unsigned char green, unsigned char blue)
{
// NvAPI_I2CWriteEx: Dev: 0x08 RegSize: 0x01 Reg: 0x03 Size: 0x04 Data: 0xFF 0x00 0x00 0xFF
uint8_t values[] = {red, green, blue, 0xFF};
bus->i2c_smbus_write_i2c_block_data(dev, PALIT_GPU_REG_LED, sizeof(values), values);
}
@@ -0,0 +1,44 @@
/*---------------------------------------------------------*\
| PalitGPUController.h |
| |
| Driver for Palit GPU |
| |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include <string>
#include "i2c_smbus.h"
typedef unsigned char palit_dev_id;
enum
{
PALIT_GPU_MODE_DIRECT = 0x00,
};
enum
{
PALIT_GPU_REG_LED = 0x03,
};
class PalitGPUController
{
public:
PalitGPUController(i2c_smbus_interface* bus, palit_dev_id dev, std::string dev_name);
~PalitGPUController();
std::string GetDeviceLocation();
std::string GetName();
void SetDirect(unsigned char red, unsigned char green, unsigned char blue);
private:
i2c_smbus_interface* bus;
palit_dev_id dev;
std::string name;
};
@@ -4,9 +4,6 @@
| Detector for Palit GPU |
| |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| TheRogueZeta 05 Nov 2020 |
| KundaPanda 04 Jan 2021 |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
@@ -16,145 +13,46 @@
#include <stdlib.h>
#include "DetectionManager.h"
#include "i2c_smbus.h"
#include "PalitGPUv1Controller.h"
#include "PalitGPUv2Controller.h"
#include "PalitGPUController.h"
#include "pci_ids.h"
#include "RGBController_PalitGPUv1.h"
#include "RGBController_PalitGPUv2.h"
#include "RGBController_PalitGPU.h"
bool TestForPalitGPUv1Controller(i2c_smbus_interface* bus, uint8_t i2c_addr)
{
bool pass = false;
switch(i2c_addr)
{
case 0x08:
pass = bus->i2c_smbus_write_quick(i2c_addr, I2C_SMBUS_WRITE);
break;
}
return(pass);
}
bool TestForPalitGPUv2Controller(i2c_smbus_interface* bus, uint8_t i2c_addr)
{
bool pass = false;
switch(i2c_addr)
{
case 0x49:
s32 data = bus->i2c_smbus_read_byte_data(i2c_addr, 0x0);
s32 mode_data = bus->i2c_smbus_read_byte_data(i2c_addr, 0xe0);
pass = (data == 0x0) && (mode_data < 0x5);
break;
}
return(pass);
}
DetectedControllers DetectPalitGPUv1Controllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
DetectedControllers DetectPalitGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
{
DetectedControllers detected_controllers;
if(TestForPalitGPUv1Controller(bus, i2c_addr))
if(bus->info.port_id == 1)
{
PalitGPUv1Controller* controller = new PalitGPUv1Controller(bus, i2c_addr, name);
RGBController_PalitGPUv1* rgb_controller = new RGBController_PalitGPUv1(controller);
/*-----------------------------------------------------*\
| Check for PALIT string |
\*-----------------------------------------------------*/
const uint8_t palit[] = {'P', 'A', 'L', 'I', 'T'};
bool match = true;
detected_controllers.push_back(rgb_controller);
for(size_t i = 0; i < sizeof(palit); i++)
{
int32_t letter = bus->i2c_smbus_read_byte_data(i2c_addr, 0x07 + (u8)i);
if(palit[i] != letter)
{
match = false;
}
}
if(match)
{
PalitGPUController* controller = new PalitGPUController(bus, i2c_addr, name);
RGBController_PalitGPU* rgb_controller = new RGBController_PalitGPU(controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
}
}
return(detected_controllers);
}
DetectedControllers DetectPalitGPUv2Controllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
{
DetectedControllers detected_controllers;
if(TestForPalitGPUv2Controller(bus, i2c_addr))
{
PalitGPUv2Controller* controller = new PalitGPUv2Controller(bus, i2c_addr, name);
RGBController_PalitGPUv2* rgb_controller = new RGBController_PalitGPUv2(controller);
detected_controllers.push_back(rgb_controller);
}
return(detected_controllers);
}
/*---------------------------------------------------------*\
| Register detectors for Palit GPU controllers |
| Uses the unified PalitGPUv1Controllers for all V1 protocol|
| devices ( Gainward and Palit branded) |
\*---------------------------------------------------------*/
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1060", DetectPalitGPUv1Controllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1060_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1070", DetectPalitGPUv1Controllers, NVIDIA_VEN, NVIDIA_GTX1070_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1070_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1070 Ti", DetectPalitGPUv1Controllers, NVIDIA_VEN, NVIDIA_GTX1070TI_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1070TI_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1080", DetectPalitGPUv1Controllers, NVIDIA_VEN, NVIDIA_GTX1080_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1080_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1080 Ti", DetectPalitGPUv1Controllers, NVIDIA_VEN, NVIDIA_GTX1080TI_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1080TI_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce GTX 1080 Phoenix", DetectPalitGPUv1Controllers, NVIDIA_VEN, NVIDIA_GTX1080_DEV, GAINWARD_SUB_VEN, GAINWARD_GTX_1080_PHOENIX, 0x08);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce GTX 1080 Ti Phoenix", DetectPalitGPUv1Controllers, NVIDIA_VEN, NVIDIA_GTX1080TI_DEV, GAINWARD_SUB_VEN, GAINWARD_GTX_1080TI_PHOENIX, 0x08);
/*---------------------------------------------------------*\
| Register detectors for Palit V2 GPU controllers |
| (Gainward and PNY branded cards) |
\*---------------------------------------------------------*/
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce GTX 1660 SUPER Ghost", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_GTX1660S_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1660S_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 2070 SUPER Phantom", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX2070S_OC_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 2080 Phoenix GS", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX2080_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX2080_A_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3060 Pegasus 12G", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3060_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX3060_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3070 Phantom", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, GAINWARD_SUB_VEN, GAINWARD_RTX_3070_PHANTOM, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3070 Phoenix", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3070_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3070 Ti Phoenix", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3070TI_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3070TI_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3080 Phoenix", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3080_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3080_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3080 Ti Phoenix", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3080TI_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3080TI_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3090 Phoenix", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3090_DEV, GAINWARD_SUB_VEN, NVIDIA_RTX3090_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 3090 Ti Phantom", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3090TI_DEV, GAINWARD_SUB_VEN, GAINWARD_RTX_3090TI_PHANTOM, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 4080 Phantom GS", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4080_DEV, GAINWARD_SUB_VEN, GAINWARD_RTX_4080_PHANTOM_GS_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 4090 Phantom", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, GAINWARD_SUB_VEN, GAINWARD_RTX_4090_PHANTOM_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Gainward GeForce RTX 5080 Phoenix", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, GAINWARD_SUB_VEN, GAINWARD_RTX_5080_PHOENIX_SUB_DEV, 0x49);
/*---------------------------------------------------------*\
| PNY GPU controllers (also Palit-manufactured) |
\*---------------------------------------------------------*/
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 2060 XLR8 OC EDITION", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX2060_TU104_DEV, PNY_SUB_VEN, PNY_RTX_2060_XLR8_OC_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3060 XLR8 Revel EPIC-X", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3060_DEV, PNY_SUB_VEN, PNY_RTX_3060_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3070 XLR8 Revel EPIC-X", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, PNY_SUB_VEN, PNY_RTX_3070_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3070 XLR8 Revel EPIC-X LHR", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3070_LHR_DEV, PNY_SUB_VEN, PNY_RTX_3070_XLR8_REVEL_EPIC_X_LHR_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3080 XLR8 Revel EPIC-X", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3080_DEV, PNY_SUB_VEN, PNY_RTX_3080_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3080 Ti XLR8 Revel EPIC-X", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3080TI_DEV, PNY_SUB_VEN, PNY_RTX_3080TI_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 3090 XLR8 Revel EPIC-X", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3090_DEV, PNY_SUB_VEN, PNY_RTX_3090_XLR8_REVEL_EPIC_X_SUB_DEV, 0x49);
/*---------------------------------------------------------*\
| Palit GPU controllers detected via PNY detector |
\*---------------------------------------------------------*/
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 2070 SUPER Jetstream", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX2070S_OC_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3060_DEV, PALIT_SUB_VEN, PALIT_RTX3060_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060 LHR", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3060_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3060_LHR_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060 Ti", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3060TI_DEV, PALIT_SUB_VEN, PALIT_RTX3060TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3060 Ti LHR", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, PALIT_SUB_VEN, NVIDIA_RTX3060TI_LHR_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3070", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, PALIT_SUB_VEN, PALIT_RTX3070_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3070 LHR", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3070_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3070_LHR_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3070 Ti", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3070TI_DEV, PALIT_SUB_VEN, PALIT_RTX3070TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3080_DEV, PALIT_SUB_VEN, PALIT_RTX3080_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080 LHR", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3080_LHR_DEV, PALIT_SUB_VEN, PALIT_RTX3080_LHR_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3080 Ti", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3080TI_DEV, PALIT_SUB_VEN, PALIT_RTX3080TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3090", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3090_DEV, PALIT_SUB_VEN, PALIT_RTX3090_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3090 Gamerock", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3090_DEV, PALIT_SUB_VEN, PALIT_RTX3090_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 3090 Ti Gamerock", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX3090TI_DEV, PALIT_SUB_VEN, PALIT_RTX3090TI_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4070 Ti", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4070TI_DEV, PALIT_SUB_VEN, PALIT_RTX4070TI_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4070 Ti Gamerock", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4070TI_DEV, PALIT_SUB_VEN, PALIT_RTX4070TI_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4070 Ti SUPER GamingPro", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4070TIS_DEV, PALIT_SUB_VEN, PALIT_RTX4080_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4080 GamingPro", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4080_DEV, PALIT_SUB_VEN, PALIT_RTX4080_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4080 SUPER GamingPro", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4080S_DEV, PALIT_SUB_VEN, PALIT_RTX4080_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 4090 Gamerock", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, PALIT_SUB_VEN, PALIT_RTX4090_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5060 Ti White OC 16GB", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5060TI_DEV, PALIT_SUB_VEN, PALIT_RTX5060TI_WHITE_OC_16G_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5070 GamingPro", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, PALIT_SUB_VEN, PALIT_RTX5070_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5070 Ti GameRock", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PALIT_SUB_VEN, PALIT_RTX5070TI_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5070 Ti GamingPro", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PALIT_SUB_VEN, PALIT_RTX5070TI_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5070 Ti GamingPro-S", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PALIT_SUB_VEN, PALIT_RTX5070TI_GAMINGPRO_S_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5080 GameRock", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, PALIT_SUB_VEN, PALIT_RTX5080_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5080 GamingPro", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, PALIT_SUB_VEN, PALIT_RTX5080_GAMINGPRO_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce RTX 5090 Gamerock", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, PALIT_SUB_VEN, PALIT_RTX5090_GAMEROCK_SUB_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("NVIDIA GeForce RTX 2060 SUPER", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX2060_TU106_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX2060_TU106_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("NVIDIA GeForce RTX 2080 SUPER", DetectPalitGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX2080S_DEV, NVIDIA_SUB_VEN, NVIDIA_RTX2080S_DEV, 0x49);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1060", DetectPalitGPUControllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1060_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1070", DetectPalitGPUControllers, NVIDIA_VEN, NVIDIA_GTX1070_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1070_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1070 Ti", DetectPalitGPUControllers, NVIDIA_VEN, NVIDIA_GTX1070TI_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1070TI_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1080", DetectPalitGPUControllers, NVIDIA_VEN, NVIDIA_GTX1080_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1080_DEV, 0x08);
REGISTER_I2C_PCI_DETECTOR("Palit GeForce GTX 1080 Ti", DetectPalitGPUControllers, NVIDIA_VEN, NVIDIA_GTX1080TI_DEV, NVIDIA_SUB_VEN, NVIDIA_GTX1080TI_DEV, 0x08);
@@ -1,77 +0,0 @@
/*---------------------------------------------------------*\
| PalitGPUv1Controller.cpp |
| |
| Driver for Palit v1 GPU |
| |
| TheRogueZeta 05 Nov 2020 |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <cstring>
#include "PalitGPUv1Controller.h"
PalitGPUv1Controller::PalitGPUv1Controller(i2c_smbus_interface* bus, palit_gpu_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
PalitGPUv1Controller::~PalitGPUv1Controller()
{
}
std::string PalitGPUv1Controller::GetDeviceLocation()
{
std::string return_string(bus->info.device_name);
char addr[5];
snprintf(addr, 5, "0x%02X", dev);
return_string.append(", address ");
return_string.append(addr);
return("I2C: " + return_string);
}
std::string PalitGPUv1Controller::GetDeviceName()
{
return(name);
}
unsigned char PalitGPUv1Controller::GetLEDRed()
{
/*-----------------------------------------------------*\
| Read red color from register 0x03 |
\*-----------------------------------------------------*/
return(bus->i2c_smbus_read_byte_data(dev, PALIT_V1_RED_REGISTER));
}
unsigned char PalitGPUv1Controller::GetLEDGreen()
{
/*-----------------------------------------------------*\
| Read green color from register 0x04 |
\*-----------------------------------------------------*/
return(bus->i2c_smbus_read_byte_data(dev, PALIT_V1_RED_REGISTER + 1));
}
unsigned char PalitGPUv1Controller::GetLEDBlue()
{
/*-----------------------------------------------------*\
| Read blue color from register 0x05 |
\*-----------------------------------------------------*/
return(bus->i2c_smbus_read_byte_data(dev, PALIT_V1_RED_REGISTER + 2));
}
void PalitGPUv1Controller::SetLEDColors(unsigned char red, unsigned char green, unsigned char blue)
{
/*-----------------------------------------------------*\
| Write RGB colors and control byte using individual |
| writes to registers 0x03, 0x04, 0x05, 0x06 |
\*-----------------------------------------------------*/
bus->i2c_smbus_write_byte_data(dev, PALIT_V1_RED_REGISTER, red);
bus->i2c_smbus_write_byte_data(dev, PALIT_V1_RED_REGISTER + 1, green);
bus->i2c_smbus_write_byte_data(dev, PALIT_V1_RED_REGISTER + 2, blue);
bus->i2c_smbus_write_byte_data(dev, PALIT_V1_RED_REGISTER + 3, 0xFF);
}
@@ -1,154 +0,0 @@
/*---------------------------------------------------------*\
| PalitGPUv2Controller.cpp |
| |
| Driver for Palit v2 GPU (merged from Gainward v2 and |
| PNY controllers) |
| |
| KundaPanda 04 Jan 2021 |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <cstring>
#include "PalitGPUv2Controller.h"
PalitGPUv2Controller::PalitGPUv2Controller(i2c_smbus_interface* bus, palit_gpu_dev_id dev, std::string dev_name)
{
this->bus = bus;
this->dev = dev;
this->name = dev_name;
}
PalitGPUv2Controller::~PalitGPUv2Controller()
{
}
std::string PalitGPUv2Controller::GetDeviceLocation()
{
std::string return_string(bus->info.device_name);
char addr[5];
snprintf(addr, 5, "0x%02X", dev);
return_string.append(", address ");
return_string.append(addr);
return("I2C: " + return_string);
}
std::string PalitGPUv2Controller::GetDeviceName()
{
return(name);
}
unsigned char PalitGPUv2Controller::GetLEDRed()
{
return(bus->i2c_smbus_read_byte_data(dev, PALIT_V2_RED_REGISTER));
}
unsigned char PalitGPUv2Controller::GetLEDGreen()
{
return(bus->i2c_smbus_read_byte_data(dev, PALIT_V2_GREEN_REGISTER));
}
unsigned char PalitGPUv2Controller::GetLEDBlue()
{
return(bus->i2c_smbus_read_byte_data(dev, PALIT_V2_BLUE_REGISTER));
}
void PalitGPUv2Controller::WriteI2CData(u8 command, u8 length, u8* data)
{
for (u8 i = 0; i < length; i++)
{
bus->i2c_smbus_write_byte_data(dev, command + i, data[i]);
}
}
void PalitGPUv2Controller::SetLEDColors(unsigned char red, unsigned char green, unsigned char blue, unsigned char color_register)
{
switch (color_register)
{
default:
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_RED_REGISTER, red);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_GREEN_REGISTER, green);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BLUE_REGISTER, blue);
break;
case PALIT_V2_COLOR_REGISTER_SECONDARY:
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_RED_SECONDARY_REGISTER, red);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_GREEN_SECONDARY_REGISTER, green);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BLUE_SECONDARY_REGISTER, blue);
break;
case PALIT_V2_COLOR_REGISTER_TERTIARY:
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_RED_TERTIARY_REGISTER, red);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_GREEN_TERTIARY_REGISTER, green);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BLUE_TERTIARY_REGISTER, blue);
break;
}
}
void PalitGPUv2Controller::SetMode(unsigned char mode, unsigned char speed, unsigned char control_mode)
{
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_MODE_REGISTER, mode);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_CONTROL_REGISTER, control_mode);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_SPEED_REGISTER, speed);
}
void PalitGPUv2Controller::SetDirection(unsigned char direction)
{
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_MODE_DIRECTION_REGISTER, direction);
}
void PalitGPUv2Controller::SetBreathingSpeed(unsigned int speed)
{
unsigned char lower = speed & 0xFF;
unsigned char upper = (speed >> 2 * 4) & 0xFF;
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BREATHE_SPEED_REGISTER_A, lower);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BREATHE_SPEED_SECONDARY_REGISTER_A, lower);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BREATHE_SPEED_REGISTER_B, upper);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BREATHE_SPEED_SECONDARY_REGISTER_B, upper);
}
void PalitGPUv2Controller::SetOff()
{
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_MODE_REGISTER, 0);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_CONTROL_REGISTER, 0x00);
}
void PalitGPUv2Controller::SetCycle(unsigned char speed)
{
u8 loop[] = {
0x01, // Direction
0x00, // ??
speed, // Speed
0x1F // Somehow related to speed
};
loop[2] = speed;
WriteI2CData(PALIT_V2_MODE_REGISTER, sizeof(loop), loop);
}
void PalitGPUv2Controller::SetStrobe(unsigned char r, unsigned char g, unsigned char b, unsigned char speed, unsigned char brightness)
{
u8 strobe[] = {
0x02, // Strobe
0x00, // Rise speed
speed, // Cycle length/2
0x00, // Off delay
r, // R
g, // G
b, // B
brightness, // Peak brightness
0x05 // Fade speed
};
WriteI2CData(PALIT_V2_MODE_REGISTER, sizeof(strobe), strobe);
}
void PalitGPUv2Controller::SetDirect(unsigned char red, unsigned char green, unsigned char blue, unsigned char brightness)
{
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_MODE_REGISTER, 0);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_CONTROL_REGISTER, 0x01);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_RED_REGISTER, red);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BLUE_REGISTER, blue);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_GREEN_REGISTER, green);
bus->i2c_smbus_write_byte_data(dev, PALIT_V2_BRIGHTNESS_REGISTER, brightness);
}
@@ -1,115 +0,0 @@
/*---------------------------------------------------------*\
| PalitGPUv2Controller.h |
| |
| Driver for Palit v2 GPU (merged from Gainward v2 and |
| PNY controllers) |
| |
| KundaPanda 04 Jan 2021 |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include <string>
#include "i2c_smbus.h"
typedef unsigned char palit_gpu_dev_id;
enum
{
/* Control Registers */
PALIT_V2_CONTROL_REGISTER = 0x60, /* Control Register (direct mode / software control) */
/* Breathing speed registers */
PALIT_V2_BREATHE_SPEED_REGISTER_A = 0x62, /* Lower part of speed control for breathe effect */
PALIT_V2_BREATHE_SPEED_REGISTER_B = 0x63, /* Upper part of speed control for breathe effect */
PALIT_V2_BREATHE_SPEED_SECONDARY_REGISTER_A = 0x64, /* Lower part of speed control for breathe effect - prob. secondary color */
PALIT_V2_BREATHE_SPEED_SECONDARY_REGISTER_B = 0x65, /* Upper part of speed control for breathe effect - prob. secondary color */
/* RGB Registers - Primary color */
PALIT_V2_RED_REGISTER = 0x6C, /* Red Register */
PALIT_V2_GREEN_REGISTER = 0x6D, /* Green Register */
PALIT_V2_BLUE_REGISTER = 0x6E, /* Blue Register */
PALIT_V2_BRIGHTNESS_REGISTER = 0x6F, /* Brightness Register */
/* RGB Registers - Secondary color */
PALIT_V2_RED_SECONDARY_REGISTER = 0x70, /* Red Register 2 */
PALIT_V2_GREEN_SECONDARY_REGISTER = 0x71, /* Green Register 2 */
PALIT_V2_BLUE_SECONDARY_REGISTER = 0x72, /* Blue Register 2 */
/* Mode Registers */
PALIT_V2_MODE_REGISTER = 0xE0, /* Mode Register */
PALIT_V2_MODE_DIRECTION_REGISTER = 0xE1, /* Mode direction Register */
PALIT_V2_SPEED_REGISTER = 0xE2, /* Mode speed Register */
/* RGB Registers - Tertiary color */
PALIT_V2_RED_TERTIARY_REGISTER = 0xE4, /* Red Register 3 */
PALIT_V2_GREEN_TERTIARY_REGISTER = 0xE5, /* Green Register 3 */
PALIT_V2_BLUE_TERTIARY_REGISTER = 0xE6, /* Blue Register 3 */
};
/* Mode values for the hardware mode register */
enum
{
PALIT_V2_MODE_OFF = 0x00,
PALIT_V2_MODE_STATIC = 0x00,
PALIT_V2_MODE_CYCLE = 0x01,
PALIT_V2_MODE_STROBE = 0x02,
};
/* Mode identifiers for RGBController (unique values for switch statements) */
enum
{
PALIT_V2_MODE_ID_OFF = 0,
PALIT_V2_MODE_ID_DIRECT = 1,
PALIT_V2_MODE_ID_BREATHING = 2,
PALIT_V2_MODE_ID_CYCLE = 3,
PALIT_V2_MODE_ID_STROBE = 4,
};
enum
{
PALIT_V2_COLOR_REGISTER_PRIMARY,
PALIT_V2_COLOR_REGISTER_SECONDARY,
PALIT_V2_COLOR_REGISTER_TERTIARY,
};
enum
{
/* Software controlled direct mode */
PALIT_V2_STATIC_SOFTWARE = 0x01,
/* GPU controlled direct mode with breathing effect */
PALIT_V2_STATIC_BREATHING = 0x22,
};
class PalitGPUv2Controller
{
public:
PalitGPUv2Controller(i2c_smbus_interface* bus, palit_gpu_dev_id, std::string dev_name);
~PalitGPUv2Controller();
std::string GetDeviceLocation();
std::string GetDeviceName();
unsigned char GetLEDRed();
unsigned char GetLEDGreen();
unsigned char GetLEDBlue();
void SetLEDColors(unsigned char red, unsigned char green, unsigned char blue, unsigned char color_register = PALIT_V2_COLOR_REGISTER_PRIMARY);
void SetMode(unsigned char mode, unsigned char speed, unsigned char direct_mode = PALIT_V2_STATIC_SOFTWARE);
void SetBreathingSpeed(unsigned int speed);
void SetDirection(unsigned char direction);
void SetOff();
void SetCycle(unsigned char speed);
void SetStrobe(unsigned char r, unsigned char g, unsigned char b, unsigned char speed, unsigned char brightness);
void SetDirect(unsigned char red, unsigned char green, unsigned char blue, unsigned char brightness);
private:
i2c_smbus_interface * bus;
palit_gpu_dev_id dev;
std::string name;
void WriteI2CData(u8 command, u8 length, u8* data);
};
@@ -0,0 +1,112 @@
/*---------------------------------------------------------*\
| RGBController_PalitGPU.cpp |
| |
| RGBController for Palit GPU |
| |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "RGBController_PalitGPU.h"
/**------------------------------------------------------------------*\
@name Palit GPU
@category GPU
@type I2C
@save :x:
@direct :white_check_mark:
@effects :x:
@detectors DetectPalitGPUControllers
@comment
\*-------------------------------------------------------------------*/
RGBController_PalitGPU::RGBController_PalitGPU(PalitGPUController* controller_ptr)
{
controller = controller_ptr;
name = controller->GetName();
vendor = "Palit";
description = "Legacy Palit RGB GPU Device";
location = controller->GetDeviceLocation();
type = DEVICE_TYPE_GPU;
mode Direct;
Direct.name = "Direct";
Direct.value = PALIT_GPU_MODE_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
SetupZones();
// Initialize active mode
active_mode = 0;
}
RGBController_PalitGPU::~RGBController_PalitGPU()
{
Shutdown();
delete controller;
}
void RGBController_PalitGPU::SetupZones()
{
/*---------------------------------------------------------*\
| This device only has one LED, so create a single zone and |
| LED for it |
\*---------------------------------------------------------*/
zone* new_zone = new zone();
led* new_led = new led();
new_zone->name = "GPU Zone";
new_zone->type = ZONE_TYPE_SINGLE;
new_zone->leds_min = 1;
new_zone->leds_max = 1;
new_zone->leds_count = 1;
new_led->name = "GPU LED";
/*---------------------------------------------------------*\
| Push the zone and LED on to device vectors |
\*---------------------------------------------------------*/
leds.push_back(*new_led);
zones.push_back(*new_zone);
SetupColors();
}
void RGBController_PalitGPU::DeviceUpdateLEDs()
{
DeviceUpdateMode();
}
void RGBController_PalitGPU::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_PalitGPU::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}
void RGBController_PalitGPU::DeviceUpdateMode()
{
RGBColor color = colors[0];
unsigned char r = RGBGetRValue(color);
unsigned char g = RGBGetGValue(color);
unsigned char b = RGBGetBValue(color);
switch(modes[active_mode].value)
{
case PALIT_GPU_MODE_DIRECT:
controller->SetDirect(r, g, b);
break;
default:
break;
}
}
@@ -0,0 +1,33 @@
/*---------------------------------------------------------*\
| RGBController_PalitGPU.h |
| |
| RGBController for Palit GPU |
| |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "PalitGPUController.h"
class RGBController_PalitGPU : public RGBController
{
public:
RGBController_PalitGPU(PalitGPUController* controller_ptr);
~RGBController_PalitGPU();
void SetupZones();
void DeviceUpdateLEDs();
void DeviceUpdateZoneLEDs(int zone);
void DeviceUpdateSingleLED(int led);
void DeviceUpdateMode();
private:
PalitGPUController* controller;
};
@@ -1,110 +0,0 @@
/*---------------------------------------------------------*\
| RGBController_PalitGPUv1.cpp |
| |
| RGBController for Palit v1 GPU |
| |
| TheRogueZeta 05 Nov 2020 |
| Manatsawin Hanmongkolchai 11 Apr 2023 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "RGBController_PalitGPUv1.h"
/**------------------------------------------------------------------*\
@name Palit GPU v1
@category GPU
@type I2C
@save :x:
@direct :white_check_mark:
@effects :x:
@detectors DetectPalitGPUControllers
@comment
\*-------------------------------------------------------------------*/
RGBController_PalitGPUv1::RGBController_PalitGPUv1(PalitGPUv1Controller* controller_ptr)
{
controller = controller_ptr;
name = controller->GetDeviceName();
vendor = "Palit";
type = DEVICE_TYPE_GPU;
description = "Palit GPU V1 Device";
location = controller->GetDeviceLocation();
mode Direct;
Direct.name = "Direct";
Direct.value = 1;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
SetupZones();
}
RGBController_PalitGPUv1::~RGBController_PalitGPUv1()
{
Shutdown();
delete controller;
}
void RGBController_PalitGPUv1::SetupZones()
{
/*-----------------------------------------------------*\
| Set up zone |
\*-----------------------------------------------------*/
zone palit_gpu_zone;
palit_gpu_zone.name = "GPU";
palit_gpu_zone.type = ZONE_TYPE_SINGLE;
palit_gpu_zone.leds_min = 1;
palit_gpu_zone.leds_max = 1;
palit_gpu_zone.leds_count = 1;
zones.push_back(palit_gpu_zone);
/*-----------------------------------------------------*\
| Set up LED |
\*-----------------------------------------------------*/
led palit_gpu_led;
palit_gpu_led.name = "GPU";
leds.push_back(palit_gpu_led);
SetupColors();
/*-----------------------------------------------------*\
| Initialize color |
\*-----------------------------------------------------*/
unsigned char red = controller->GetLEDRed();
unsigned char grn = controller->GetLEDGreen();
unsigned char blu = controller->GetLEDBlue();
colors[0] = ToRGBColor(red, grn, blu);
}
void RGBController_PalitGPUv1::DeviceUpdateLEDs()
{
for(std::size_t led = 0; led < colors.size(); led++)
{
unsigned char red = RGBGetRValue(colors[led]);
unsigned char grn = RGBGetGValue(colors[led]);
unsigned char blu = RGBGetBValue(colors[led]);
controller->SetLEDColors(red, grn, blu);
}
}
void RGBController_PalitGPUv1::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_PalitGPUv1::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}
void RGBController_PalitGPUv1::DeviceUpdateMode()
{
}
@@ -1,217 +0,0 @@
/*---------------------------------------------------------*\
| RGBController_PalitGPUv2.cpp |
| |
| RGBController for Palit v2 GPU |
| |
| KundaPanda 04 Jan 2021 |
| KendallMorgan 17 Oct 2021 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "RGBController_PalitGPUv2.h"
/**------------------------------------------------------------------*\
@name Palit GPU v2
@category GPU
@type I2C
@save :x:
@direct :white_check_mark:
@effects :white_check_mark:
@detectors DetectPalitGPUControllers
@comment
\*-------------------------------------------------------------------*/
RGBController_PalitGPUv2::RGBController_PalitGPUv2(PalitGPUv2Controller* controller_ptr)
{
controller = controller_ptr;
name = controller->GetDeviceName();
vendor = "Palit";
type = DEVICE_TYPE_GPU;
description = "Palit GPU V2 Device";
location = controller->GetDeviceLocation();
/*-----------------------------------------------------*\
| Off mode |
\*-----------------------------------------------------*/
mode Off;
Off.name = "Off";
Off.value = PALIT_V2_MODE_ID_OFF;
Off.flags = 0;
Off.color_mode = MODE_COLORS_NONE;
modes.push_back(Off);
/*-----------------------------------------------------*\
| Direct mode |
\*-----------------------------------------------------*/
mode Direct;
Direct.name = "Direct";
Direct.value = PALIT_V2_MODE_ID_DIRECT;
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS;
Direct.brightness = 255;
Direct.brightness_min = 0;
Direct.brightness_max = 100;
Direct.color_mode = MODE_COLORS_PER_LED;
modes.push_back(Direct);
/*-----------------------------------------------------*\
| Breathing mode |
\*-----------------------------------------------------*/
mode Breathe;
Breathe.name = "Breathing";
Breathe.value = PALIT_V2_MODE_ID_BREATHING;
Breathe.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED;
Breathe.speed_max = 0x000a;
Breathe.speed_min = 0x1324;
Breathe.color_mode = MODE_COLORS_MODE_SPECIFIC;
Breathe.colors_min = 2;
Breathe.colors_max = 2;
Breathe.colors.resize(2);
modes.push_back(Breathe);
/*-----------------------------------------------------*\
| Spectrum Cycle mode |
\*-----------------------------------------------------*/
mode SpectrumCycle;
SpectrumCycle.name = "Spectrum Cycle";
SpectrumCycle.value = PALIT_V2_MODE_ID_CYCLE;
SpectrumCycle.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR;
SpectrumCycle.speed = 3;
SpectrumCycle.speed_max = 0;
SpectrumCycle.speed_min = 100;
SpectrumCycle.color_mode = MODE_COLORS_NONE;
modes.push_back(SpectrumCycle);
/*-----------------------------------------------------*\
| Strobe mode |
\*-----------------------------------------------------*/
mode Strobe;
Strobe.name = "Strobe";
Strobe.value = PALIT_V2_MODE_ID_STROBE;
Strobe.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
Strobe.color_mode = MODE_COLORS_MODE_SPECIFIC;
Strobe.colors_min = 1;
Strobe.colors_max = 1;
Strobe.colors.resize(1);
Strobe.speed_max = 0x0;
Strobe.speed_min = 0xF;
modes.push_back(Strobe);
SetupZones();
active_mode = 0;
}
RGBController_PalitGPUv2::~RGBController_PalitGPUv2()
{
Shutdown();
delete controller;
}
void RGBController_PalitGPUv2::SetupZones()
{
zone* new_zone = new zone();
led* new_led = new led();
new_zone->name = "GPU Zone";
new_zone->type = ZONE_TYPE_SINGLE;
new_zone->leds_min = 1;
new_zone->leds_max = 1;
new_zone->leds_count = 1;
new_led->name = "GPU LED";
leds.push_back(*new_led);
zones.push_back(*new_zone);
SetupColors();
unsigned char red = controller->GetLEDRed();
unsigned char grn = controller->GetLEDGreen();
unsigned char blu = controller->GetLEDBlue();
colors[0] = ToRGBColor(red, grn, blu);
}
void RGBController_PalitGPUv2::DeviceUpdateLEDs()
{
for(unsigned int color : colors)
{
unsigned char red = RGBGetRValue(color);
unsigned char grn = RGBGetGValue(color);
unsigned char blu = RGBGetBValue(color);
controller->SetLEDColors(red, grn, blu);
controller->SetMode(PALIT_V2_MODE_STATIC, 0x2);
}
}
void RGBController_PalitGPUv2::DeviceUpdateZoneLEDs(int /*zone*/)
{
DeviceUpdateLEDs();
}
void RGBController_PalitGPUv2::DeviceUpdateSingleLED(int /*led*/)
{
DeviceUpdateLEDs();
}
void RGBController_PalitGPUv2::DeviceUpdateMode()
{
RGBColor color = colors[0];
unsigned char r = RGBGetRValue(color);
unsigned char g = RGBGetGValue(color);
unsigned char b = RGBGetBValue(color);
switch(modes[active_mode].value)
{
case PALIT_V2_MODE_ID_OFF:
controller->SetOff();
break;
case PALIT_V2_MODE_ID_DIRECT:
controller->SetDirect(r, g, b, modes[active_mode].brightness);
break;
case PALIT_V2_MODE_ID_BREATHING:
{
controller->SetBreathingSpeed(modes[active_mode].speed);
unsigned char r1 = RGBGetRValue(modes[active_mode].colors[0]);
unsigned char g1 = RGBGetGValue(modes[active_mode].colors[0]);
unsigned char b1 = RGBGetBValue(modes[active_mode].colors[0]);
controller->SetLEDColors(r1, g1, b1);
unsigned char r2 = RGBGetRValue(modes[active_mode].colors[1]);
unsigned char g2 = RGBGetGValue(modes[active_mode].colors[1]);
unsigned char b2 = RGBGetBValue(modes[active_mode].colors[1]);
controller->SetLEDColors(r2, g2, b2, PALIT_V2_COLOR_REGISTER_SECONDARY);
controller->SetMode(PALIT_V2_MODE_STATIC, 0x2, PALIT_V2_STATIC_BREATHING);
}
break;
case PALIT_V2_MODE_ID_CYCLE:
controller->SetMode(PALIT_V2_MODE_CYCLE, (unsigned char)(modes[active_mode].speed));
controller->SetDirection(modes[active_mode].direction);
break;
case PALIT_V2_MODE_ID_STROBE:
{
mode current_mode = modes[(unsigned int)active_mode];
unsigned char r_strobe = RGBGetRValue(current_mode.colors[0]);
unsigned char g_strobe = RGBGetGValue(current_mode.colors[0]);
unsigned char b_strobe = RGBGetBValue(current_mode.colors[0]);
controller->SetLEDColors(r_strobe, g_strobe, b_strobe, PALIT_V2_COLOR_REGISTER_TERTIARY);
controller->SetMode(PALIT_V2_MODE_STROBE, (unsigned char)(current_mode.speed));
controller->SetDirection(current_mode.direction);
}
break;
default:
break;
}
}
@@ -260,7 +260,6 @@ REGISTER_HID_DETECTOR_IPU("Razer Huntsman V2 TKL", Det
REGISTER_HID_DETECTOR_IPU("Razer Huntsman V2", DetectRazerControllers, RAZER_VID, RAZER_HUNTSMAN_V2_PID, 0x03, 0x0C, 0x01);
REGISTER_HID_DETECTOR_IPU("Razer Huntsman V3 Pro", DetectRazerControllers, RAZER_VID, RAZER_HUNTSMAN_V3_PRO_PID, 0x03, 0x0C, 0x01);
REGISTER_HID_DETECTOR_IPU("Razer Huntsman V3 Pro TKL White", DetectRazerControllers, RAZER_VID, RAZER_HUNTSMAN_V3_PRO_TKL_WHITE_PID, 0x03, 0x0C, 0x01);
REGISTER_HID_DETECTOR_IPU("Razer Huntsman V3 HE Magnetic Mini", DetectRazerControllers, RAZER_VID, RAZER_HUNTSMAN_V3_HE_MAGNETIC_MINI_PID, 0x03, 0x0C, 0x01);
REGISTER_HID_DETECTOR_IPU("Razer Ornata Chroma", DetectRazerControllers, RAZER_VID, RAZER_ORNATA_CHROMA_PID, 0x02, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Ornata Chroma V2", DetectRazerControllers, RAZER_VID, RAZER_ORNATA_CHROMA_V2_PID, 0x02, 0x01, 0x02);
REGISTER_HID_DETECTOR_IPU("Razer Ornata V3", DetectRazerControllers, RAZER_VID, RAZER_ORNATA_V3_PID, 0x02, 0x01, 0x02);
@@ -3141,45 +3141,6 @@ static const razer_device huntsman_v3_pro_tkl_device =
&razer_huntsman_v3_pro_tkl_layout
};
/*-------------------------------------------------------------*\
| Razer Huntsman V3 HE Magnetic Mini 1532:02E4 |
| |
| Zone "Keyboard" |
| Matrix |
| 6 Rows, 22 Columns (matrix dims borrowed from Huntsman |
| V3 Pro pending confirmation on real hardware -- extra |
| columns beyond the physical 65% board are simply inert. |
| No layout overlay yet: key names fall back to raw |
| matrix positions until the mapping is verified.) |
\*-------------------------------------------------------------*/
static const razer_zone huntsman_v3_he_magnetic_mini_keyboard_zone =
{
ZONE_EN_KEYBOARD,
ZONE_TYPE_MATRIX,
6,
22
};
static const razer_device huntsman_v3_he_magnetic_mini_device =
{
"Razer Huntsman V3 HE Magnetic Mini",
RAZER_HUNTSMAN_V3_HE_MAGNETIC_MINI_PID,
DEVICE_TYPE_KEYBOARD,
RAZER_MATRIX_TYPE_EXTENDED,
0x3F,
6,
22,
{
&huntsman_v3_he_magnetic_mini_keyboard_zone,
NULL,
NULL,
NULL,
NULL,
NULL
},
NULL
};
/*-------------------------------------------------------------------------*\
| LAPTOPS |
\*-------------------------------------------------------------------------*/
@@ -9485,7 +9446,6 @@ const razer_device* razer_device_list[] =
&huntsman_v2_tkl_device,
&huntsman_v3_pro_device,
&huntsman_v3_pro_tkl_device,
&huntsman_v3_he_magnetic_mini_device,
&ornata_chroma_device,
&ornata_chroma_v2_device,
&ornata_v3_device,
@@ -124,7 +124,6 @@
#define RAZER_HUNTSMAN_V2_PID 0x026C
#define RAZER_HUNTSMAN_V3_PRO_PID 0x02A6
#define RAZER_HUNTSMAN_V3_PRO_TKL_WHITE_PID 0x02A7
#define RAZER_HUNTSMAN_V3_HE_MAGNETIC_MINI_PID 0x02E4
#define RAZER_ORBWEAVER_CHROMA_PID 0x0207
#define RAZER_ORNATA_CHROMA_PID 0x021E
#define RAZER_ORNATA_CHROMA_V2_PID 0x025D
@@ -11,66 +11,29 @@
#include <string>
#include "RGBController_TurtleBeachKP7.h"
#include "RGBControllerKeyNames.h"
/*---------------------------------------------------------*\
| Physical LED grid, mapped against the real device. Six |
| columns by ten rows, [y][x] holds the LED index and NA |
| marks a grid cell with no LED behind it. |
\*---------------------------------------------------------*/
#define NA 0xFFFFFFFF
/*---------------------------------------------------------*\
| The 33 LEDs are exposed as three zones: the Num Lock and |
| Shift Mode indicators along the top, the main keypad, and |
| the two wrist rest LEDs, mirroring the split used for the |
| KB7. |
\*---------------------------------------------------------*/
#define TURTLE_BEACH_KP7_INDICATOR_COUNT 3
#define TURTLE_BEACH_KP7_KEYPAD_COUNT 28
#define TURTLE_BEACH_KP7_WRIST_COUNT 2
/*---------------------------------------------------------*\
| The device numbers its LEDs 0-32 in an order that does |
| not follow the zone layout, so this table maps each LED |
| in zone/presentation order to its slot in the device's |
| color buffer. Order: the three indicator LEDs, then the |
| keypad (the F13-F15 / profile row, then the number grid |
| row by row with that row's mode key last, then 0 / . / |
| Enter, then the space bar), then the two wrist rest LEDs. |
\*---------------------------------------------------------*/
static const unsigned int turtle_beach_kp7_led_order[TURTLE_BEACH_KP7_LED_COUNT] =
{
28, 29, 30,
21, 0, 7, 14,
8, 22, 15, 1, 11,
23, 2, 9, 4, 18,
10, 24, 16, 25, 5,
17, 3, 13, 12, 19,
27, 6, 20,
26,
31, 32,
};
/*---------------------------------------------------------*\
| Physical grid for the keypad zone. [y][x] holds the LED |
| index within that zone (0-27, an index into the keypad |
| slice of the LED list, not the device LED number) and NA |
| marks a cell with no LED behind it. Row 0 is the F13-F15 |
| and profile switch row; the mode keys form the rightmost |
| column. The two + keys and the two Enter keys are each |
| a stacked pair in one column, all normal size; the space |
| bar sits directly under the lower Enter so the device |
| view does not auto-grow that Enter downward. The 0 key |
| is double width, filling the empty cell to its right. |
\*---------------------------------------------------------*/
#define TURTLE_BEACH_KP7_MATRIX_HEIGHT 7
#define TURTLE_BEACH_KP7_MATRIX_WIDTH 5
#define TURTLE_BEACH_KP7_MATRIX_HEIGHT 10
#define TURTLE_BEACH_KP7_MATRIX_WIDTH 6
static unsigned int turtle_beach_kp7_matrix_map[TURTLE_BEACH_KP7_MATRIX_HEIGHT][TURTLE_BEACH_KP7_MATRIX_WIDTH] =
{
{ 0, 1, 2, 3, NA },
{ 4, 5, 6, 7, 8 },
{ 9, 10, 11, 12, 13 },
{ 14, 15, 16, 17, 18 },
{ 19, 20, 21, 22, 23 },
{ 24, NA, 25, 26, NA },
{ NA, NA, NA, 27, NA },
{ 28, NA, 29, NA, NA, 30 },
{ NA, NA, NA, NA, NA, NA },
{ 21, 0, 7, 14, NA, NA },
{ NA, NA, NA, NA, NA, NA },
{ 8, 22, 15, 1, NA, 11 },
{ 23, 2, 9, 4, NA, 18 },
{ 10, 24, 16, 25, NA, 5 },
{ 17, 3, 13, 12, NA, 19 },
{ 27, NA, 6, 20, NA, NA },
{ 31, 32, NA, 26, NA, NA },
};
/**------------------------------------------------------------------*\
@@ -84,9 +47,7 @@ static unsigned int turtle_beach_kp7_matrix_map[TURTLE_BEACH_KP7_MATRIX_HEIGHT][
@comment Only the raw per-LED color stream is implemented. The
onboard effects, the macro and profile feature report
channel on report ID 0x11, and the internal hub the KB7
dock exposes as PID 0x503E are not handled. LEDs are
split into Indicators, Keypad, and Wrist Rest zones; the
keypad zone carries a matrix map.
dock exposes as PID 0x503E are not handled.
\*-------------------------------------------------------------------*/
RGBController_TurtleBeachKP7::RGBController_TurtleBeachKP7(TurtleBeachKP7Controller* controller_ptr)
@@ -119,100 +80,28 @@ RGBController_TurtleBeachKP7::~RGBController_TurtleBeachKP7()
void RGBController_TurtleBeachKP7::SetupZones()
{
/*-----------------------------------------------------*\
| LED names in zone/presentation order. Local arrays |
| rather than file scope ones because the KEY_EN_ |
| values live in another translation unit and are not |
| safe to read during static initialization. The two |
| indicator LEDs and the shift mode key are status |
| lights rather than typing keys, so they get plain |
| names. |
\*-----------------------------------------------------*/
const char* indicator_names[TURTLE_BEACH_KP7_INDICATOR_COUNT] =
{
"Num Lock Indicator", "Shift Mode Indicator", "Key: Shift Mode",
};
zone kp7_zone;
const char* keypad_names[TURTLE_BEACH_KP7_KEYPAD_COUNT] =
{
KEY_EN_F13, KEY_EN_F14, KEY_EN_F15, "Key: Profile Switch",
kp7_zone.name = "Keypad";
kp7_zone.type = ZONE_TYPE_MATRIX;
kp7_zone.leds_min = TURTLE_BEACH_KP7_LED_COUNT;
kp7_zone.leds_max = TURTLE_BEACH_KP7_LED_COUNT;
kp7_zone.leds_count = TURTLE_BEACH_KP7_LED_COUNT;
KEY_EN_NUMPAD_LOCK, KEY_EN_NUMPAD_DIVIDE, KEY_EN_NUMPAD_TIMES, KEY_EN_NUMPAD_MINUS, "Key: Mode 1",
KEY_EN_NUMPAD_7, KEY_EN_NUMPAD_8, KEY_EN_NUMPAD_9, KEY_EN_NUMPAD_PLUS, "Key: Mode 2",
KEY_EN_NUMPAD_4, KEY_EN_NUMPAD_5, KEY_EN_NUMPAD_6, KEY_EN_NUMPAD_PLUS, "Key: Mode 3",
KEY_EN_NUMPAD_1, KEY_EN_NUMPAD_2, KEY_EN_NUMPAD_3, KEY_EN_NUMPAD_ENTER, "Key: Mode 4",
KEY_EN_NUMPAD_0, KEY_EN_NUMPAD_PERIOD, KEY_EN_NUMPAD_ENTER,
kp7_zone.matrix_map.Set(TURTLE_BEACH_KP7_MATRIX_HEIGHT, TURTLE_BEACH_KP7_MATRIX_WIDTH, (unsigned int*)&turtle_beach_kp7_matrix_map);
KEY_EN_SPACE,
};
zones.push_back(kp7_zone);
/*-----------------------------------------------------*\
| Three zones: the indicator LEDs, the keypad, and the |
| wrist rest. Only the keypad carries a matrix map; |
| the other two are short linear strips. |
\*-----------------------------------------------------*/
zone indicator_zone;
indicator_zone.name = "Indicators";
indicator_zone.type = ZONE_TYPE_LINEAR;
indicator_zone.leds_min = TURTLE_BEACH_KP7_INDICATOR_COUNT;
indicator_zone.leds_max = TURTLE_BEACH_KP7_INDICATOR_COUNT;
indicator_zone.leds_count = TURTLE_BEACH_KP7_INDICATOR_COUNT;
zones.push_back(indicator_zone);
zone keypad_zone;
keypad_zone.name = "Keypad";
keypad_zone.type = ZONE_TYPE_MATRIX;
keypad_zone.leds_min = TURTLE_BEACH_KP7_KEYPAD_COUNT;
keypad_zone.leds_max = TURTLE_BEACH_KP7_KEYPAD_COUNT;
keypad_zone.leds_count = TURTLE_BEACH_KP7_KEYPAD_COUNT;
keypad_zone.matrix_map.Set(TURTLE_BEACH_KP7_MATRIX_HEIGHT, TURTLE_BEACH_KP7_MATRIX_WIDTH, (unsigned int*)&turtle_beach_kp7_matrix_map);
zones.push_back(keypad_zone);
zone wrist_zone;
wrist_zone.name = "Wrist Rest";
wrist_zone.type = ZONE_TYPE_LINEAR;
wrist_zone.leds_min = TURTLE_BEACH_KP7_WRIST_COUNT;
wrist_zone.leds_max = TURTLE_BEACH_KP7_WRIST_COUNT;
wrist_zone.leds_count = TURTLE_BEACH_KP7_WRIST_COUNT;
zones.push_back(wrist_zone);
for(unsigned int led_idx = 0; led_idx < TURTLE_BEACH_KP7_INDICATOR_COUNT; led_idx++)
for(unsigned int led_idx = 0; led_idx < TURTLE_BEACH_KP7_LED_COUNT; led_idx++)
{
led new_led;
new_led.name = indicator_names[led_idx];
new_led.name = "LED " + std::to_string(led_idx + 1);
new_led.value = led_idx;
leds.push_back(new_led);
}
for(unsigned int led_idx = 0; led_idx < TURTLE_BEACH_KP7_KEYPAD_COUNT; led_idx++)
{
led new_led;
new_led.name = keypad_names[led_idx];
new_led.value = TURTLE_BEACH_KP7_INDICATOR_COUNT + led_idx;
leds.push_back(new_led);
}
for(unsigned int led_idx = 0; led_idx < TURTLE_BEACH_KP7_WRIST_COUNT; led_idx++)
{
led new_led;
new_led.name = "Wrist Rest " + std::to_string(led_idx + 1);
new_led.value = TURTLE_BEACH_KP7_INDICATOR_COUNT + TURTLE_BEACH_KP7_KEYPAD_COUNT + led_idx;
leds.push_back(new_led);
}
SetupColors();
}
@@ -220,17 +109,11 @@ void RGBController_TurtleBeachKP7::DeviceUpdateLEDs()
{
unsigned char led_data[TURTLE_BEACH_KP7_LED_COUNT * 3] = { 0 };
/*-----------------------------------------------------*\
| colors[] is in zone order; turtle_beach_kp7_led_order |
| gives the device color-buffer slot for each one. |
\*-----------------------------------------------------*/
for(unsigned int led_idx = 0; (led_idx < colors.size()) && (led_idx < TURTLE_BEACH_KP7_LED_COUNT); led_idx++)
{
unsigned int dev_led = turtle_beach_kp7_led_order[led_idx];
led_data[(dev_led * 3) + 0] = RGBGetRValue(colors[led_idx]);
led_data[(dev_led * 3) + 1] = RGBGetGValue(colors[led_idx]);
led_data[(dev_led * 3) + 2] = RGBGetBValue(colors[led_idx]);
led_data[(led_idx * 3) + 0] = RGBGetRValue(colors[led_idx]);
led_data[(led_idx * 3) + 1] = RGBGetGValue(colors[led_idx]);
led_data[(led_idx * 3) + 2] = RGBGetBValue(colors[led_idx]);
}
controller->SendDirect(led_data, sizeof(led_data));
+1 -1
View File
@@ -1428,7 +1428,7 @@ void DetectionManager::BackgroundHIDInit()
.hid_enumerate = (hidapi_wrapper_enumerate) dlsym(hidapi_libusb_handle,"hid_enumerate"),
.hid_free_enumeration = (hidapi_wrapper_free_enumeration) dlsym(hidapi_libusb_handle,"hid_free_enumeration"),
.hid_close = (hidapi_wrapper_close) dlsym(hidapi_libusb_handle,"hid_close"),
.hid_error = (hidapi_wrapper_error) dlsym(hidapi_libusb_handle,"hid_error"),
.hid_error = (hidapi_wrapper_error) dlsym(hidapi_libusb_handle,"hid_free_enumeration"),
#if(HID_HOTPLUG_ENABLED)
.hid_hotplug_register_callback = (hidapi_wrapper_hotplug_register_callback) dlsym(hidapi_libusb_handle,"hid_hotplug_register_callback"),
.hid_hotplug_deregister_callback = (hidapi_wrapper_hotplug_deregister_callback) dlsym(hidapi_libusb_handle,"hid_hotplug_deregister_callback"),
Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 151 KiB

+1 -7
View File
@@ -86,7 +86,6 @@ NetworkClient::NetworkClient()
client_is_local_client = false;
client_string_sent = false;
client_sock = -1;
connect_timeout = 4000;
detection_percent = 100;
detection_string = "";
protocol_initialized = false;
@@ -404,11 +403,6 @@ void NetworkClient::RequestLocalClient(bool request_local)
}
}
void NetworkClient::SetConnectTimeout(unsigned int timeout_ms)
{
connect_timeout = timeout_ms;
}
void NetworkClient::SetIP(std::string new_ip)
{
if(server_connected == false)
@@ -1724,7 +1718,7 @@ void NetworkClient::ConnectionThreadFunction()
/*---------------------------------------------*\
| Try to connect to server |
\*---------------------------------------------*/
if(port.tcp_client_connect(connect_timeout) == true)
if(port.tcp_client_connect() == true)
{
client_sock = port.sock;
LOG_INFO("[%s] Connected to server", NETWORKCLIENT);
-2
View File
@@ -97,7 +97,6 @@ public:
| Client Control functions |
\*-----------------------------------------------------*/
void RequestLocalClient(bool request_local);
void SetConnectTimeout(unsigned int timeout_ms);
void SetIP(std::string new_ip);
void SetName(std::string new_name);
void SetPort(unsigned short new_port);
@@ -199,7 +198,6 @@ private:
bool client_flags_sent;
bool client_is_local_client;
bool client_string_sent;
unsigned int connect_timeout;
bool controller_data_received;
bool controller_data_requested;
bool protocol_initialized;
+5 -25
View File
@@ -24,9 +24,9 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
#-----------------------------------------------------------------------------------------------#
# Application Configuration #
#-----------------------------------------------------------------------------------------------#
MAJOR = 1
MINOR = 0
SUFFIX =
MAJOR = 0
MINOR = 9
SUFFIX = git
SHORTHASH = $$system("git rev-parse --short=7 HEAD")
LASTTAG = "release_"$$MAJOR"."$$MINOR
@@ -489,23 +489,12 @@ contains(QMAKE_PLATFORM, linux) {
HEADERS += \
dependencies/NVFC/nvapi.h \
i2c_smbus/Linux/i2c_smbus_linux.h \
AutoStart/AutoStart-Linux.h \
SPDAccessor/EE1004Accessor_Linux.h \
SPDAccessor/SPD5118Accessor_Linux.h \
SuspendResume/SuspendResume_Linux_FreeBSD.h \
super_io/super_io.h \
#-------------------------------------------------------------------------------------------#
# AutoStart implementation - Flatpak uses portal-based autostart, Linux uses desktop files #
# Auto-detect Flatpak build environment via /.flatpak-info file #
#-------------------------------------------------------------------------------------------#
exists(/.flatpak-info) {
HEADERS += AutoStart/AutoStart-Flatpak.h
DEFINES += FLATPAK_BUILD
PKGCONFIG += gio-2.0
} else {
HEADERS += AutoStart/AutoStart-Linux.h
}
INCLUDEPATH += \
dependencies/NVFC \
i2c_smbus/Linux \
@@ -570,22 +559,13 @@ contains(QMAKE_PLATFORM, linux) {
i2c_smbus/Linux/i2c_smbus_linux.cpp \
scsiapi/scsiapi_linux.c \
serial_port/find_usb_serial_port_linux.cpp \
AutoStart/AutoStart-Linux.cpp \
SPDAccessor/EE1004Accessor_Linux.cpp \
SPDAccessor/SPD5118Accessor_Linux.cpp \
SuspendResume/SuspendResume_Linux_FreeBSD.cpp \
startup/main_FreeBSD_Linux_MacOS.cpp \
super_io/super_io.cpp \
#-------------------------------------------------------------------------------------------#
# AutoStart implementation - Flatpak uses portal-based autostart, Linux uses desktop files #
# Auto-detect Flatpak build environment via /.flatpak-info file #
#-------------------------------------------------------------------------------------------#
exists(/.flatpak-info) {
SOURCES += AutoStart/AutoStart-Flatpak.cpp
} else {
SOURCES += AutoStart/AutoStart-Linux.cpp
}
#-------------------------------------------------------------------------------------------#
# Set up install paths #
# These install paths are used for AppImage and .deb packaging #
+2 -24
View File
@@ -3094,31 +3094,9 @@ unsigned char * RGBController::GetZoneDescriptionData(unsigned char* data_ptr, z
/*-----------------------------------------------------*\
| Copy in zone type |
| For protocols below 6, convert the new zone types |
\*-----------------------------------------------------*/
zone_type type = zone.type;
if(protocol_version < 6)
{
switch(type)
{
case ZONE_TYPE_LINEAR_LOOP:
type = ZONE_TYPE_LINEAR;
break;
case ZONE_TYPE_MATRIX_LOOP_X:
case ZONE_TYPE_MATRIX_LOOP_Y:
type = ZONE_TYPE_MATRIX;
break;
case ZONE_TYPE_SEGMENTED:
type = ZONE_TYPE_LINEAR;
break;
}
}
memcpy(data_ptr, &type, sizeof(type));
data_ptr += sizeof(type);
memcpy(data_ptr, &zone.type, sizeof(zone.type));
data_ptr += sizeof(zone.type);
/*-----------------------------------------------------*\
| Check for resizable effects-only zone. For protocol |
-1
View File
@@ -1158,7 +1158,6 @@ bool ResourceManager::AttemptLocalConnection()
titleString.append(VERSION_STRING);
auto_connection_client->RequestLocalClient(true);
auto_connection_client->SetConnectTimeout(1000);
auto_connection_client->SetName(titleString.c_str());
auto_connection_client->StartClient();
+3 -22
View File
@@ -66,8 +66,7 @@ const char *spd_memory_type_name[] =
"LPDDR4",
"LPDDR4X",
"DDR5",
"LPDDR5",
"Unknown"
"LPDDR5"
};
SPDAccessor::SPDAccessor(i2c_smbus_interface *bus, uint8_t spd_addr)
@@ -162,16 +161,7 @@ DDR4Accessor::~DDR4Accessor()
SPDMemoryType DDR4Accessor::memory_type()
{
SPDMemoryType type = (SPDMemoryType)(this->at(BASIC_MEMORY_TYPE_ADDR));
if(type <= SPD_UNKNOWN)
{
return(type);
}
else
{
return(SPD_UNKNOWN);
}
return((SPDMemoryType)(this->at(BASIC_MEMORY_TYPE_ADDR)));
}
uint16_t DDR4Accessor::jedec_id()
@@ -205,16 +195,7 @@ DDR5Accessor::~DDR5Accessor()
SPDMemoryType DDR5Accessor::memory_type()
{
SPDMemoryType type = (SPDMemoryType)(this->at(BASIC_MEMORY_TYPE_ADDR));
if(type <= SPD_UNKNOWN)
{
return(type);
}
else
{
return(SPD_UNKNOWN);
}
return((SPDMemoryType)(this->at(BASIC_MEMORY_TYPE_ADDR)));
}
uint16_t DDR5Accessor::jedec_id()
+1 -2
View File
@@ -48,8 +48,7 @@ typedef enum
SPD_LPDDR4_SDRAM = 16,
SPD_LPDDR4X_SDRAM = 17,
SPD_DDR5_SDRAM = 18,
SPD_LPDDR5_SDRAM = 19,
SPD_UNKNOWN = 20,
SPD_LPDDR5_SDRAM = 19
} SPDMemoryType;
#define SPD_IO_DELAY 1ms
+1 -8
View File
@@ -30,14 +30,7 @@ bool SPDDetector::is_valid() const
SPDMemoryType SPDDetector::memory_type() const
{
if(mem_type <= SPD_UNKNOWN)
{
return(mem_type);
}
else
{
return(SPD_UNKNOWN);
}
return(mem_type);
}
void SPDDetector::detect_memory_type()
+1 -8
View File
@@ -65,14 +65,7 @@ SPDWrapper::~SPDWrapper()
SPDMemoryType SPDWrapper::memory_type()
{
if(mem_type <= SPD_UNKNOWN)
{
return(mem_type);
}
else
{
return(SPD_UNKNOWN);
}
return mem_type;
}
uint8_t SPDWrapper::address()
+1 -8
View File
@@ -9,7 +9,7 @@ Build-Depends:
qt6-base-dev,
qt6-base-dev-tools,
qt6-tools-dev-tools,
qmake6,
qt5-qmake,
libusb-1.0-0-dev,
libhidapi-hotplug-dev,
libmbedtls-dev,
@@ -21,13 +21,6 @@ Depends:
${shlibs:Depends},
${misc:Depends},
udev,
libqt6core6,
libqt6gui6,
libqt6widgets6,
libusb-1.0-0,
libmbedtls14,
libhidapi-hotplug-hidraw0,
libhidapi-hotplug-libusb0,
Recommends:
openrgb-dkms-drivers,
Conflicts:
-7
View File
@@ -10,10 +10,6 @@ URL: https://gitlab.com/CalcProgrammer1/%{_name}
BuildRequires: gcc-c++ libusbx-devel libstdc++-devel qt6-qtbase-devel qt6-linguist desktop-file-utils hidapi-hotplug-devel mbedtls-devel systemd-rpm-macros
Requires: hicolor-icon-theme
Requires: qt6-qtbase
Requires: mbedtls
Requires: hidapi-hotplug
Requires: libusbx
%description
Open source RGB lighting control that doesn't depend on manufacturer software. Supports Windows and Linux.
@@ -57,9 +53,6 @@ fi
%doc README.md
%changelog
* Fri Sep 11 2026 Adam Honse <[email protected]> - 1.0-0
- Updated to 1.0
* Sun Jul 9 2023 Adam Honse <[email protected]> - 0.9-0
- Updated to 0.9
+5 -20
View File
@@ -101,7 +101,7 @@ bool i2c_smbus_linux_detect()
{
if(ent->d_type == DT_DIR || ent->d_type == DT_LNK)
{
if((strncmp(ent->d_name, "i2c-", 4) == 0) && (ent->d_name[4] != '\0') && (strspn(ent->d_name + 4, "0123456789") == strlen(ent->d_name + 4)))
if(strncmp(ent->d_name, "i2c-", 4) == 0)
{
strncpy(device_string, driver_path, sizeof(device_string) - 1);
device_string[sizeof(device_string) - 1] = '\0';
@@ -148,18 +148,6 @@ bool i2c_smbus_linux_detect()
// Get the Linux Bus ID
sscanf(ent->d_name, "i2c-%hu", &bus_id);
/*-----------------------------------------------------*\
| DPMST adapters are created by AMD GPUs for DisplayPort|
| MST (Multi-Stream Transport). These are removable |
| devices and we don't have hotplug detection for i2c |
| interfaces, so we should ignore them. |
\*-----------------------------------------------------*/
if(strcmp(device_string, "DPMST") == 0)
{
LOG_INFO("[%s] Skipping DPMST i2c device", ent->d_name);
continue;
}
// Get device path
strncpy(path, driver_path, sizeof(path) - 1);
path[sizeof(path) - 1] = '\0';
@@ -177,11 +165,11 @@ bool i2c_smbus_linux_detect()
/*-------------------------------------------------------------*\
| Truncate at last '/' to get the parent PCI device directory. |
| For AMDGPU i2c buses the realpath resolves to something like: |
| For AMDGPU i2c buses the realpath resolves to something like: |
| /sys/devices/pci.../0000:03:00.0/i2c-4 |
| The parent (0000:03:00.0) contains vendor/device/subsystem |
| files. Using /..' traversal is unreliable in sysfs; directly |
| truncating the path is correct and portable. |
| truncating the path is correct and portable. |
\*-------------------------------------------------------------*/
char* last_slash = strrchr(path, '/');
if(last_slash == NULL || last_slash == path)
@@ -258,7 +246,7 @@ bool i2c_smbus_linux_detect()
// Get PCI Subsystem Device
strcpy(ptr, "/subsystem_device");
test_fd = open(path, O_RDONLY);
if(test_fd >= 0)
if (test_fd >= 0)
{
memset(buff, 0x00, sizeof(buff));
@@ -281,11 +269,9 @@ bool i2c_smbus_linux_detect()
device_path[sizeof(device_path) - 1] = '\0';
test_fd = open(device_path, O_RDWR);
if(test_fd < 0)
if (test_fd < 0)
{
LOG_INFO("[i2c_smbus_linux] Failed to open %s", device_path);
ret = false;
continue;
}
bus = new i2c_smbus_linux();
@@ -301,7 +287,6 @@ bool i2c_smbus_linux_detect()
}
else
{
LOG_INFO("[i2c_smbus_linux] Failed to open %s", device_string);
ret = false;
}
}
+2 -2
View File
@@ -506,9 +506,9 @@ s32 i2c_smbus_i801::i2c_xfer(u8 /*addr*/, char /*read_write*/, int* /*size*/, u8
bool i2c_smbus_i801_detect()
{
if(!InitMacUSPCIODriver())
if(!GetMacUSPCIODriverStatus())
{
LOG_INFO("macUSPCIO initialization failed, i801 I2C bus detection aborted");
LOG_INFO("macUSPCIO is not loaded, i801 I2C bus detection aborted");
return(false);
}
+2 -2
View File
@@ -213,9 +213,9 @@ s32 i2c_smbus_nct6775::i2c_xfer(u8 /*addr*/, char /*read_write*/, int* /*size*/,
bool i2c_smbus_nct6775_detect()
{
if(!InitMacUSPCIODriver())
if(!GetMacUSPCIODriverStatus())
{
LOG_INFO("macUSPCIO initialization failed, nct6775 I2C bus detection aborted");
LOG_INFO("macUSPCIO is not loaded, nct6775 I2C bus detection aborted");
return(false);
}
+2 -2
View File
@@ -245,9 +245,9 @@ s32 i2c_smbus_piix4::i2c_xfer(u8 /*addr*/, char /*read_write*/, int* /*size*/, u
bool i2c_smbus_piix4_detect()
{
if(!InitMacUSPCIODriver())
if(!GetMacUSPCIODriverStatus())
{
LOG_INFO("macUSPCIO initialization failed, piix4 I2C bus detection aborted");
LOG_INFO("macUSPCIO is not loaded, piix4 I2C bus detection aborted");
return(false);
}
+3 -6
View File
@@ -171,7 +171,7 @@ bool net_port::tcp_client(const char * client_name, const char * port)
return(true);
}
bool net_port::tcp_client_connect(unsigned int timeout_ms)
bool net_port::tcp_client_connect()
{
struct addrinfo *res;
connected = false;
@@ -201,11 +201,8 @@ bool net_port::tcp_client_connect(unsigned int timeout_ms)
FD_ZERO(&fdset);
FD_SET(sock, &fdset);
/*-------------------------------------------------*\
| Convert millisecond timeout to timeval sec/usec |
\*-------------------------------------------------*/
tv.tv_sec = (timeout_ms / 1000);
tv.tv_usec = (timeout_ms % 1000) * 1000;
tv.tv_sec = 4;
tv.tv_usec = 0;
/*-------------------------------------------------*\
| Set socket options - no delay |
+1 -1
View File
@@ -61,7 +61,7 @@ public:
bool udp_client(const char* client_name, const char * port);
bool udp_client(const char * client_name, const char * send_port, const char * recv_port);
bool tcp_client(const char* client_name, const char * port);
bool tcp_client_connect(unsigned int timeout_ms = 4000);
bool tcp_client_connect();
//Function to open a server
bool tcp_server(const char * port);
-3
View File
@@ -576,8 +576,6 @@
#define GAINWARD_RTX_3090TI_PHANTOM 0xF295
#define GAINWARD_RTX_4070_GHOST_SUB_DEV 0xF303
#define GAINWARD_RTX_4080_PHANTOM_GS_SUB_DEV 0xF297
#define GAINWARD_RTX_4090_PHANTOM_SUB_DEV 0xF297
#define GAINWARD_RTX_5080_PHOENIX_SUB_DEV 0xF323
/*-----------------------------------------------------*\
| GALAX / KFA2 Sub-Device IDs |
@@ -888,7 +886,6 @@
\*-----------------------------------------------------*/
#define PNY_RTX_2060_XLR8_OC_SUB_DEV 0x1363
#define PNY_RTX_3060_XLR8_REVEL_EPIC_X_SUB_DEV 0x138E
#define PNY_RTX_3060_XLR8_REVEL_EPIC_X_LHR_SUB_DEV 0x138F
#define PNY_RTX_3070_XLR8_REVEL_EPIC_X_SUB_DEV 0x136E
#define PNY_RTX_3070_XLR8_REVEL_EPIC_X_LHR_SUB_DEV 0x138A
#define PNY_RTX_3070TI_XLR8_UPRISING_EPIC_X_SUB_DEV 0x138D
+4 -12
View File
@@ -1146,9 +1146,7 @@ void DeviceView::InitDeviceView()
/*-------------------------------------------------*\
| For matrix zones, use matrix height from the map |
\*-------------------------------------------------*/
if((controller->GetZoneType(zone_idx) == ZONE_TYPE_MATRIX)
|| (controller->GetZoneType(zone_idx) == ZONE_TYPE_MATRIX_LOOP_X)
|| (controller->GetZoneType(zone_idx) == ZONE_TYPE_MATRIX_LOOP_Y))
if(controller->GetZoneType(zone_idx) == ZONE_TYPE_MATRIX)
{
total_height += controller->GetZoneMatrixMapHeight(zone_idx);
zone_pos[zone_idx].matrix_w = controller->GetZoneMatrixMapWidth(zone_idx);
@@ -1161,9 +1159,7 @@ void DeviceView::InitDeviceView()
{
for(unsigned int segment_idx = 0; segment_idx < controller->GetZoneSegmentCount(zone_idx); segment_idx++)
{
if((controller->GetZoneSegmentType(zone_idx, segment_idx) == ZONE_TYPE_MATRIX)
|| (controller->GetZoneSegmentType(zone_idx, segment_idx) == ZONE_TYPE_MATRIX_LOOP_X)
|| (controller->GetZoneSegmentType(zone_idx, segment_idx) == ZONE_TYPE_MATRIX_LOOP_Y))
if(controller->GetZoneSegmentType(zone_idx, segment_idx) == ZONE_TYPE_MATRIX)
{
total_height += controller->GetZoneSegmentMatrixMapHeight(zone_idx, segment_idx);
zone_pos[zone_idx].matrix_w = controller->GetZoneSegmentMatrixMapWidth(zone_idx, segment_idx);
@@ -1222,9 +1218,7 @@ void DeviceView::InitDeviceView()
/*-------------------------------------------------*\
| Calculate LEDs position and size for zone |
\*-------------------------------------------------*/
if((controller->GetZoneType(zone_idx) == ZONE_TYPE_MATRIX)
|| (controller->GetZoneType(zone_idx) == ZONE_TYPE_MATRIX_LOOP_X)
|| (controller->GetZoneType(zone_idx) == ZONE_TYPE_MATRIX_LOOP_Y))
if(controller->GetZoneType(zone_idx) == ZONE_TYPE_MATRIX)
{
for(unsigned int led_x = 0; led_x < controller->GetZoneMatrixMapWidth(zone_idx); led_x++)
{
@@ -1329,9 +1323,7 @@ void DeviceView::InitDeviceView()
segment_count++;
if((controller->GetZoneSegmentType(zone_idx, segment_idx) == ZONE_TYPE_MATRIX)
|| (controller->GetZoneSegmentType(zone_idx, segment_idx) == ZONE_TYPE_MATRIX_LOOP_X)
|| (controller->GetZoneSegmentType(zone_idx, segment_idx) == ZONE_TYPE_MATRIX_LOOP_Y))
if(controller->GetZoneSegmentType(zone_idx, segment_idx) == ZONE_TYPE_MATRIX)
{
for(unsigned int led_x = 0; led_x < controller->GetZoneSegmentMatrixMapWidth(zone_idx, segment_idx); led_x++)
{
@@ -267,35 +267,15 @@ void OpenRGBClientInfoPage::UpdateInfo()
{
case ZONE_TYPE_SINGLE:
zone_str.append("Single");
break;
break;
case ZONE_TYPE_LINEAR:
zone_str.append("Linear");
break;
case ZONE_TYPE_LINEAR_LOOP:
zone_str.append("Linear Loop");
break;
case ZONE_TYPE_MATRIX:
zone_str.append("Matrix");
break;
case ZONE_TYPE_MATRIX_LOOP_X:
zone_str.append("Matrix Loop X");
break;
case ZONE_TYPE_MATRIX_LOOP_Y:
zone_str.append("Matrix Loop Y");
break;
case ZONE_TYPE_SEGMENTED:
zone_str.append("Segmented");
break;
default:
zone_str.append("Unknown");
break;
}
new_child->setText(0, QString::fromStdString(zone_str));
+1 -15
View File
@@ -7,8 +7,6 @@
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include <QTimer>
#include "OpenRGBDevicePage.h"
#include "OpenRGBDeviceEditorDialog.h"
#include "OpenRGBZoneEditorDialog.h"
@@ -1806,19 +1804,7 @@ void OpenRGBDevicePage::ColorChanged()
if(AutoUpdateEnabled())
{
/*-----------------------------------------------------*\
| Coalesce rapid signals into one deferred update |
\*-----------------------------------------------------*/
if(!color_update_pending)
{
color_update_pending = true;
QTimer::singleShot(0, this, [this]()
{
UpdateColor();
color_update_pending = false;
});
}
UpdateColor();
}
}
-5
View File
@@ -64,11 +64,6 @@ private:
bool MultipleSelected = false;
bool UpdateHex = true;
/*-----------------------------------------------------*\
| Coalesces rapid ColorChanged() calls into one update |
\*-----------------------------------------------------*/
bool color_update_pending = false;
/*-----------------------------------------------------*\
| UI Update Functions |
\*-----------------------------------------------------*/
+1 -1
View File
@@ -880,7 +880,7 @@ void OpenRGBDialog::RemovePlugin(OpenRGBPluginEntry* plugin)
plugin_parent_widget = ui->InformationTabBar;
break;
case OPENRGB_PLUGIN_LOCATION_SETTINGS:
plugin_parent_widget = ui->SettingsTabBar;
plugin_parent_widget = ui->InformationTabBar;
break;
default:
break;
+41 -39
View File
@@ -59,7 +59,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/DMXSettingsEntry/DMXSettingsEntry.ui" line="32"/>
<source>Brightness Channel:</source>
<translation>Helligkeitskanal:</translation>
<translation>Helligkeits Kanal:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DMXSettingsEntry/DMXSettingsEntry.ui" line="42"/>
@@ -160,12 +160,12 @@
<message>
<location filename="../../DetectionManager.cpp" line="48"/>
<source>&lt;h2&gt;Warning:&lt;/h2&gt;&lt;p&gt;One or more I2C/SMBus interfaces failed to initialize.&lt;/p&gt;&lt;p&gt;Depending on which interfaces failed to initialize, some RGB DRAM modules, some motherboards&apos; onboard RGB lighting, and RGB graphics cards may not be available in OpenRGB.&lt;/p&gt;&lt;p&gt;On Windows, this is usually caused by a failure to load the PawnIO driver.&lt;/p&gt;&lt;p&gt;For OpenRGB to access these devices, you must install PawnIO from &lt;a href=&apos;https://pawnio.eu/&apos;&gt;https://pawnio.eu&lt;/a&gt; and run OpenRGB as administrator or as a system service.&lt;/p&gt;&lt;p&gt;If you are not using any of the devices listed above, you can safely ignore this message.&lt;/p&gt;</source>
<translation>&lt;h2&gt;Warnung:&lt;/h2&gt;&lt;p&gt;Eine oder mehrere I2C/SMBus-Schnittstellen konnten nicht initialisiert werden.&lt;/p&gt;&lt;p&gt;Abhänging davon, welche Schnittstellen nicht initialisiert wurden, können einige RGB-DRAM-Module, RGB-Beleuchtung auf der Hauptplatine und RGB-Grafikkarten in OpenRGB nicht verfügbar sein.&lt;/p&gt;&lt;p&gt;Unter Windows ist dies in der Regel auf einen Fehler beim Laden des PawnIO-Treibers zurückzuführen.&lt;/p&gt;&lt;p&gt;Um OpenRGB auf diese Geräte zugreifen zu lassen, müssen Sie PawnIO von &lt;a href=&apos;https://pawnio.eu/&apos;&gt;https://pawnio.eu&lt;/a&gt; installieren und OpenRGB als Administrator oder als Systemdienst ausführen.&lt;/p&gt;&lt;p&gt;Wenn Sie keines der oben genannten Geräte verwenden, können Sie diese Meldung sicher ignorieren.&lt;/p&gt;</translation>
<translation>&lt;h2&gt;Warnung:&lt;/h2&gt;&lt;p&gt;Eine oder mehrere I2C/SMBus-Schnittstellen konnten nicht initialisiert werden.&lt;/p&gt;&lt;p&gt;Je nachdem, welche Schnittstellen nicht initialisiert wurden, können einige RGB-DRAM-Module, einige RGB-Beleuchtung auf der Hauptplatine und RGB-Grafikkarten in OpenRGB nicht verfügbar sein.&lt;/p&gt;&lt;p&gt;Unter Windows ist dies in der Regel auf einen Fehler beim Laden des PawnIO-Treibers zurückzuführen.&lt;/p&gt;&lt;p&gt;Um OpenRGB auf diese Geräte zugreifen zu lassen, müssen Sie PawnIO von &lt;a href=&apos;https://pawnio.eu/&apos;&gt;https://pawnio.eu&lt;/a&gt; installieren und OpenRGB als Administrator oder als Systemdienst ausführen.&lt;/p&gt;&lt;p&gt;Wenn Sie keines der oben genannten Geräte verwenden, können Sie diese Meldung sicher ignorieren.&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../DetectionManager.cpp" line="55"/>
<source>&lt;h2&gt;Warning:&lt;/h2&gt;&lt;p&gt;One or more I2C/SMBus interfaces failed to initialize.&lt;/p&gt;&lt;p&gt;Depending on which interfaces failed to initialize, some RGB DRAM modules, some motherboards&apos; onboard RGB lighting, and RGB graphics cards may not be available in OpenRGB.&lt;/p&gt;&lt;p&gt;On Linux, this is usually because the i2c-dev module is not loaded.&lt;/p&gt;&lt;p&gt;For OpenRGB to access these devices, you must load the i2c-dev module along with the correct I2C driver module for your motherboard. This is usually i2c-piix4 for AMD systems and i2c-i801 for Intel systems.&lt;/p&gt;&lt;p&gt;If you are not using any of the devices listed above, you can safely ignore this message.&lt;/p&gt;</source>
<translation>&lt;h2&gt;Warnung:&lt;/h2&gt;&lt;p&gt;Eine oder mehrere I2C/SMBus-Schnittstellen konnten nicht initialisiert werden.&lt;/p&gt;&lt;p&gt;Abhänging davon, welche Schnittstellen nicht initialisiert wurden, können einige RGB-DRAM-Module, RGB-Beleuchtungseinheiten auf der Hauptplatine und RGB-Grafikkarten in OpenRGB nicht verfügbar sein.&lt;/p&gt;&lt;p&gt;Unter Linux liegt dies in der Regel daran, dass das Modul i2c-dev nicht geladen ist.&lt;/p&gt;&lt;p&gt;Um diese Geräte mit OpenRGB zugreifen zu können, müssen Sie das Modul i2c-dev sowie das richtige I2C-Treibermodul für Ihre Hauptplatine laden. Dies ist in der Regel i2c-piix4 für AMD-Systeme und i2c-i801 für Intel-Systeme.&lt;/p&gt;&lt;p&gt;Wenn Sie keines der oben genannten Geräte verwenden, können Sie diese Meldung sicher ignorieren.&lt;/p&gt;</translation>
<translation>&lt;h2&gt;Warnung:&lt;/h2&gt;&lt;p&gt;Eine oder mehrere I2C/SMBus-Schnittstellen konnten nicht initialisiert werden.&lt;/p&gt;&lt;p&gt;Je nachdem, welche Schnittstellen nicht initialisiert wurden, können einige RGB-DRAM-Module, einige RGB-Beleuchtungseinheiten auf der Hauptplatine und RGB-Grafikkarten in OpenRGB nicht verfügbar sein.&lt;/p&gt;&lt;p&gt;Unter Linux liegt dies in der Regel daran, dass das Modul i2c-dev nicht geladen ist.&lt;/p&gt;&lt;p&gt;Um diese Geräte mit OpenRGB zugreifen zu können, müssen Sie das Modul i2c-dev sowie das richtige I2C-Treibermodul für Ihre Hauptplatine laden. Dies ist in der Regel i2c-piix4 für AMD-Systeme und i2c-i801 für Intel-Systeme.&lt;/p&gt;&lt;p&gt;Wenn Sie keines der oben genannten Geräte verwenden, können Sie diese Meldung sicher ignorieren.&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../DetectionManager.cpp" line="64"/>
@@ -175,7 +175,7 @@
<message>
<location filename="../../DetectionManager.cpp" line="70"/>
<source>&lt;h2&gt;Warning:&lt;/h2&gt;&lt;p&gt;Multiple OpenRGB udev rules are installed.&lt;/p&gt;&lt;p&gt;The udev rules file 60-openrgb.rules is installed in both /etc/udev/rules.d and /usr/lib/udev/rules.d.&lt;/p&gt;&lt;p&gt;Multiple udev rules files can conflict, it is recommended to remove one of them.&lt;/p&gt;</source>
<translation>&lt;h2&gt;Warnung:&lt;/h2&gt;&lt;p&gt;Mehrere OpenRGB udev-Regeldateien sind installiert.&lt;/p&gt;&lt;p&gt;Die udev-Regeldatei 60-openrgb.rules ist in /etc/udev/rules.d und /usr/lib/udev/rules.d installiert.&lt;/p&gt;&lt;p&gt;Mehrere udev-Regeldateien können sich gegenseitig beeinflussen. Es wird empfohlen, eine von ihnen zu entfernen.&lt;/p&gt;</translation>
<translation>&lt;h2&gt;Warnung:&lt;/h2&gt;&lt;p&gt;Mehrere OpenRGB udev-Regeldateien sind installiert.&lt;/p&gt;&lt;p&gt;Die udev-Regeldatei 60-openrgb.rules ist in beiden /etc/udev/rules.d und /usr/lib/udev/rules.d installiert.&lt;/p&gt;&lt;p&gt;Mehrere udev-Regeldateien können sich gegenseitig beeinflussen. Es wird empfohlen, eine von ihnen zu entfernen.&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -221,17 +221,17 @@
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="72"/>
<source>Universe Size:</source>
<translation>Universe Größe:</translation>
<translation>Univerumsgröße:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="79"/>
<source>Number of LEDs:</source>
<translation>LED-Anzahl:</translation>
<translation>LED Anzahl:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="92"/>
<source>Start Universe:</source>
<translation>Starte Universe:</translation>
<translation>Anfangsuniversum:</translation>
</message>
</context>
<context>
@@ -324,7 +324,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/DDPSettingsEntry/DDPSettingsEntry.cpp" line="98"/>
<source>DDP (Distributed Display Protocol)</source>
<translation>DDP (Distributed Display Protocol)</translation>
<translation>DDP (verteiltes Anzeigeprotokoll)</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DebugSettingsEntry/DebugSettingsEntry.cpp" line="143"/>
@@ -373,7 +373,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/ManualDevicesSettingsPage.ui" line="66"/>
<source>Save without Rescan</source>
<translation>Speichern ohne erneute scannung</translation>
<translation>Speichern ohne Neuerfassen</translation>
</message>
</context>
<context>
@@ -811,7 +811,7 @@
<message>
<location filename="../OpenRGBDevicePage/OpenRGBDevicePage.cpp" line="1667"/>
<source>Saving Not Supported</source>
<translation>Speichern nicht unterstützt</translation>
<translation>Speichern wird nicht unterstützt</translation>
</message>
<message>
<location filename="../OpenRGBDevicePage/OpenRGBDevicePage.cpp" line="1727"/>
@@ -899,7 +899,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.ui" line="203"/>
<source>Save Profile with custom name</source>
<translation>Profil mit benutzerdefinierten Namen speichern</translation>
<translation>Profil mit eigenem Namen speichern</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="342"/>
@@ -917,7 +917,7 @@
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="350"/>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="559"/>
<source>Quick Colors</source>
<translation>Schnelle Farbenauswahl</translation>
<translation>Schnelle Farben</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="352"/>
@@ -997,7 +997,7 @@
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="737"/>
<source>General Settings</source>
<translatorcomment>Using &quot;Allg.&quot; as shorthand for &quot;Allgemeine&quot;. &quot;Allgemeine&quot; would be too long for the UI. So until text size is handled differently this should do it.</translatorcomment>
<translation>Allgemeine Einstellungen</translation>
<translation>Allg. Einstellungen</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="917"/>
@@ -1071,7 +1071,7 @@
<message>
<location filename="../OpenRGBLogConsolePage/OpenRGBLogConsolePage.ui" line="39"/>
<source>Log Level:</source>
<translation>Log Level:</translation>
<translation>Log Level</translation>
</message>
<message>
<location filename="../OpenRGBLogConsolePage/OpenRGBLogConsolePage.ui" line="32"/>
@@ -1099,7 +1099,9 @@
<message>
<location filename="../OpenRGBMatrixMapEditorDialog/OpenRGBMatrixMapEditorDialog.ui" line="72"/>
<source>Width:</source>
<translation>Breite:</translation>
<translation>
Breite:</translation>
</message>
</context>
<context>
@@ -1191,7 +1193,7 @@
<message>
<location filename="../OpenRGBPluginsPage/OpenRGBPluginsPage.cpp" line="224"/>
<source>Restart Needed</source>
<translation>Neustart Erforderlich</translation>
<translation>Programmneustart Erforderlich</translation>
</message>
<message>
<location filename="../OpenRGBPluginsPage/OpenRGBPluginsPage.cpp" line="224"/>
@@ -1229,7 +1231,7 @@
<message>
<location filename="../OpenRGBProfileEditorDialog/OpenRGBProfileEditorDialog.ui" line="72"/>
<source>Device States</source>
<translation>Gerätzustände</translation>
<translation>Gerätezustände</translation>
</message>
<message>
<location filename="../OpenRGBProfileEditorDialog/OpenRGBProfileEditorDialog.ui" line="78"/>
@@ -1361,7 +1363,7 @@
<message>
<location filename="../OpenRGBServerInfoPage/OpenRGBServerInfoPage.cpp" line="65"/>
<source>Stopping...</source>
<translation>Beendet...</translation>
<translation>Beenden...</translation>
</message>
<message>
<location filename="../OpenRGBServerInfoPage/OpenRGBServerInfoPage.cpp" line="73"/>
@@ -1692,7 +1694,7 @@
<message>
<location filename="../OpenRGBZoneInitializationDialog/OpenRGBZoneInitializationDialog.ui" line="39"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;One or more manually configurable zones have not been configured. Manually configurable zones are most commonly used for addressable RGB headers where the number of LEDs in the connected device(s) cannot be detected automatically.&lt;/p&gt;&lt;p&gt;Please enter the number of LEDs in each zone below.&lt;/p&gt;&lt;p&gt;For more information about calcuating the correct size, please check &lt;a href=&quot;https://openrgb.org/resize.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;this link.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Eine oder mehrere manuell konfigurierbare Zonen wurden nicht konfiguriert. Manuell konfigurierbare Zonen werden normalerweise für adressierbare RGB-Header verwendet, bei denen die Anzahl der LEDs in den angeschlossenen Geräten nicht automatisch erkannt werden kann.&lt;/p&gt;&lt;p&gt;Bitte gebe die Anzahl der LEDs in jeder Zone unten ein.&lt;/p&gt;&lt;p&gt;Weitere Informationen zur Berechnung der richtigen Größe finden Sie &lt;a href=&quot;https://openrgb.org/resize.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;hier.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Eine oder mehrere manuell konfigurierbare Zonen wurden nicht konfiguriert. Manuell konfigurierbare Zonen werden am häufigsten für adressierbare RGB-Header verwendet, bei denen die Anzahl der LEDs in den angeschlossenen Geräten nicht automatisch erkannt werden kann.&lt;/p&gt;&lt;p&gt;Bitte geben Sie die Anzahl der LEDs in jeder Zone unten ein.&lt;/p&gt;&lt;p&gt;Weitere Informationen zur Berechnung der richtigen Größe finden Sie &lt;a href=&quot;https://openrgb.org/resize.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;hier.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../OpenRGBZoneInitializationDialog/OpenRGBZoneInitializationDialog.ui" line="49"/>
@@ -1793,7 +1795,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/PhilipsWizSettingsEntry/PhilipsWizSettingsEntry.ui" line="59"/>
<source>White Strategy:</source>
<translation>Weiß-Strategie:</translation>
<translation>Weiß Strategie:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/PhilipsWizSettingsEntry/PhilipsWizSettingsEntry.cpp" line="19"/>
@@ -1895,7 +1897,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="238"/>
<source>Load Window Geometry</source>
<translation>Fenstergeometrie laden</translation>
<translation>Fenster Geometrie laden</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="230"/>
@@ -1905,12 +1907,12 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="226"/>
<source>Disable Key Expansion</source>
<translation>Deaktiviere Key-Erweiterung in der Geräteansicht</translation>
<translation>Deaktiviere Schlüsselerweiterung in der Geräteansicht</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="217"/>
<source>Show LED View by Default</source>
<translation>LED Anzeige standardmäßig zeigen</translation>
<translation>LED anzeige standardmäßig zeigen</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="163"/>
@@ -1950,7 +1952,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="195"/>
<source>Monochrome Tray Icon</source>
<translation>Monochromes Tray Icon</translation>
<translation>Graues Icon</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="178"/>
@@ -1970,7 +1972,7 @@
<message>
<location filename="../../ResourceManager.cpp" line="201"/>
<source>Initial Detection Delay (ms)</source>
<translation>Initiale Erkennungsverzögerung (ms)</translation>
<translation>Anfangserkennungsverzögerung (ms)</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="203"/>
@@ -1985,27 +1987,27 @@
<message>
<location filename="../../ResourceManager.cpp" line="215"/>
<source>Enable Log File</source>
<translation>Logdatei aktivieren</translation>
<translation>Log Datei aktivieren</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="219"/>
<source>Log Level</source>
<translation>Log Level</translation>
<translation>Protokollierungsstufe</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="237"/>
<source>Log File Count Limit</source>
<translation>Logdatei-Anzahl-Limit</translation>
<translation>Logdateien Anzahl Limit</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="239"/>
<source>Maximum number of log files to keep, 0 for no limit</source>
<translation>Maximale Anzahl der zu behaltenden Logdateien, 0 für keine Begrenzung</translation>
<translation>Maximale Anzahl der zu behaltenden Protokolldateien, 0 für keine Begrenzung</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="243"/>
<source>Log Manager</source>
<translation>Log-Manager</translation>
<translation>Protokoll-Manager</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="250"/>
@@ -2035,7 +2037,7 @@
<message>
<location filename="../../ResourceManager.cpp" line="266"/>
<source>Workaround for some older SDK implementations that sent incorrect packet size for certain packets</source>
<translation>Workaround für einige ältere SDK-Implementierungen, die falsche Paketgrößen für bestimmte Pakete gesendet haben</translation>
<translation>Umgehungsmethode für einige ältere SDK-Implementierungen, die falsche Paketgrößen für bestimmte Pakete gesendet haben</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="268"/>
@@ -2060,22 +2062,22 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="207"/>
<source>Compact Tabs</source>
<translation>Kompakte Tabs</translation>
<translation>Kompakte Registerkarten</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="209"/>
<source>Display sidebar tabs as icons only</source>
<translation>Seitenleisten-Tabs nur als Icons anzeigen</translation>
<translation>Seitenleisten-Registerkarten nur als Icons anzeigen</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="212"/>
<source>Tabs on Top</source>
<translation>Tabs oben</translation>
<translation>Registerkarten oben</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="214"/>
<source>Display tabs on top instead of on the left</source>
<translation>Tabs oben anstelle von Links anzeigen</translation>
<translation>Registerkarten oben anstelle von links anzeigen</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="221"/>
@@ -2095,7 +2097,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="242"/>
<source>Save on Exit</source>
<translation>Beim Schließen speichern</translation>
<translation>Geometrie beim Schließen beibehalten</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="244"/>
@@ -2145,17 +2147,17 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="284"/>
<source>AMD SMBus: Reduce CPU Usage (restart required)</source>
<translation>AMD SMBus: CPU-Auslastung reduzieren (Neustart erfoderlich)</translation>
<translation>AMD SMBus: CPU-Auslastung reduzieren (Programmneustart erfoderlich)</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="173"/>
<source>Custom Arguments</source>
<translation>Benutzerdefinierte Argumente</translation>
<translation>Eigene Argumente</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="272"/>
<source>Shared SMBus Access (restart required)</source>
<translation>Gemeinsamer SMBus-Zugriff (Neustart erforderlich)</translation>
<translation>Gemeinsamer SMBus-Zugriff (Programmneustart erforderlich)</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="185"/>
+70 -70
View File
@@ -6,7 +6,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/DDPSettingsEntry/DDPSettingsEntry.ui" line="26"/>
<source>DDP Device</source>
<translation>DDP-Enhet</translation>
<translation>DDP-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DDPSettingsEntry/DDPSettingsEntry.ui" line="32"/>
@@ -41,7 +41,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/DDPSettingsEntry/DDPSettingsEntry.ui" line="100"/>
<source>Keepalive Time (ms):</source>
<translation>Levetid (ms):</translation>
<translation>Holdvakttid (ms):</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DDPSettingsEntry/DDPSettingsEntry.ui" line="116"/>
@@ -54,7 +54,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/DMXSettingsEntry/DMXSettingsEntry.ui" line="26"/>
<source>DMX Device</source>
<translation>DMX-Enhet</translation>
<translation>DMX-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DMXSettingsEntry/DMXSettingsEntry.ui" line="32"/>
@@ -84,7 +84,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/DMXSettingsEntry/DMXSettingsEntry.ui" line="82"/>
<source>Keepalive Time:</source>
<translation>Levetid:</translation>
<translation>Keepalive Time:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DMXSettingsEntry/DMXSettingsEntry.ui" line="92"/>
@@ -117,7 +117,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/DebugSettingsEntry/DebugSettingsEntry.ui" line="49"/>
<source>Zones</source>
<translation>Soner</translation>
<translation>Zoner</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DebugSettingsEntry/DebugSettingsEntry.ui" line="55"/>
@@ -137,7 +137,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/DebugSettingsEntry/DebugSettingsEntry.ui" line="76"/>
<source>Resizable</source>
<translation>Størrelsesredigerbar</translation>
<translation>Størrelsesendrbar</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DebugSettingsEntry/DebugSettingsEntry.ui" line="83"/>
@@ -160,17 +160,17 @@
<message>
<location filename="../../DetectionManager.cpp" line="48"/>
<source>&lt;h2&gt;Warning:&lt;/h2&gt;&lt;p&gt;One or more I2C/SMBus interfaces failed to initialize.&lt;/p&gt;&lt;p&gt;Depending on which interfaces failed to initialize, some RGB DRAM modules, some motherboards&apos; onboard RGB lighting, and RGB graphics cards may not be available in OpenRGB.&lt;/p&gt;&lt;p&gt;On Windows, this is usually caused by a failure to load the PawnIO driver.&lt;/p&gt;&lt;p&gt;For OpenRGB to access these devices, you must install PawnIO from &lt;a href=&apos;https://pawnio.eu/&apos;&gt;https://pawnio.eu&lt;/a&gt; and run OpenRGB as administrator or as a system service.&lt;/p&gt;&lt;p&gt;If you are not using any of the devices listed above, you can safely ignore this message.&lt;/p&gt;</source>
<translation>&lt;h2&gt;Advarsel:&lt;/h2&gt;&lt;p&gt;Ett eller flere I2C/SMBus-grensesnitt har feilet å initalisere.&lt;/p&gt;&lt;p&gt;Avhengig av hvilke grensesnitt som feilet å initalisere, kan noen RGB DRAM-moduler, RGB-belysning på hovedkort og RGB-grafikkort ikke være tilgjengelige i OpenRGB.&lt;/p&gt;&lt;p&gt;På Windows er dette vanligvis grunnet en feil ved lasting av PawnIO-driveren.&lt;/p&gt;&lt;p&gt;For at OpenRGB skal kunne få tilgang til disse enhetene, må du installere PawnIO fra &lt;a href=&apos;https://pawnio.eu/&apos;&gt;https://pawnio.eu&lt;/a&gt; og kjøre OpenRGB som administrator eller som systemtjeneste.&lt;/p&gt;&lt;p&gt;Hvis du ikke bruker noen av enhetene som er nevnt ovenfor, kan du trygt ignorere denne meldingen.&lt;/p&gt;</translation>
<translation>&lt;h2&gt;Advarsel:&lt;/h2&gt;&lt;p&gt;Én eller flere I2C/SMBus-flater feilet under oppstart.&lt;/p&gt;&lt;p&gt;Avhengig av hvilke flater som feilet under oppstart, kan visse RGB DRAM-moduler, visse RGB-belysning på hovedkort og RGB-grafikkort ikke være tilgjengelige i OpenRGB.&lt;/p&gt;&lt;p&gt;På Windows er dette vanligvis forårsaket av en feil ved lasting av PawnIO-drevet.&lt;/p&gt;&lt;p&gt;For at OpenRGB skal kunne få tilgang til disse enhetene, må du installere PawnIO fra &lt;a href=&apos;https://pawnio.eu/&apos;&gt;https://pawnio.eu&lt;/a&gt; og kjøre OpenRGB som administrator eller som systemtjeneste.&lt;/p&gt;&lt;p&gt;Hvis du ikke bruker noen av enhetene som er nevnt ovenfor, kan du trygt ignorere denne meldingen.&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../DetectionManager.cpp" line="55"/>
<source>&lt;h2&gt;Warning:&lt;/h2&gt;&lt;p&gt;One or more I2C/SMBus interfaces failed to initialize.&lt;/p&gt;&lt;p&gt;Depending on which interfaces failed to initialize, some RGB DRAM modules, some motherboards&apos; onboard RGB lighting, and RGB graphics cards may not be available in OpenRGB.&lt;/p&gt;&lt;p&gt;On Linux, this is usually because the i2c-dev module is not loaded.&lt;/p&gt;&lt;p&gt;For OpenRGB to access these devices, you must load the i2c-dev module along with the correct I2C driver module for your motherboard. This is usually i2c-piix4 for AMD systems and i2c-i801 for Intel systems.&lt;/p&gt;&lt;p&gt;If you are not using any of the devices listed above, you can safely ignore this message.&lt;/p&gt;</source>
<translation>&lt;h2&gt;Advarsel:&lt;/h2&gt;&lt;p&gt;Ett eller flere I2C/SMBus-grensesnitt har feilet å initialisere.&lt;/p&gt;&lt;p&gt;Avhengig av hvilke grensesnitt som feilet å initialisere, kan noen RGB DRAM-moduler, RGB-belysning på hovedkortet og RGB-grafikkort ikke være tilgjengelige i OpenRGB.&lt;/p&gt;&lt;p&gt;På Linux er dette vanligvis fordi modulen i2c-dev ikke er lastet.&lt;/p&gt;&lt;p&gt;For at OpenRGB skal kunne tilgå disse enhetene, må du laste modulen i2c-dev sammen med den riktige I2C-drivermodulen for hovedkortet ditt. Dette er vanligvis i2c-piix4 for AMD-systemer og i2c-i801 for Intel-systemer.&lt;/p&gt;&lt;p&gt;Hvis du ikke bruker noen av enhetene som er nevnt ovenfor, kan du trygt ignorere denne meldingen.&lt;/p&gt;</translation>
<translation>&lt;h2&gt;Advarsel:&lt;/h2&gt;&lt;p&gt;Én eller flere I2C/SMBus-interfaces har ikke klart å initialisere.&lt;/p&gt;&lt;p&gt;Avhengig av hvilke grensesnitt som ikke klarte å initialisere, kan noen RGB DRAM-moduler, noen RGB-belysning på hovedkortet og RGB-grafikkort være utilgjengelige i OpenRGB.&lt;/p&gt;&lt;p&gt;På Linux er dette vanligvis fordi modulen i2c-dev ikke er lastet.&lt;/p&gt;&lt;p&gt;For at OpenRGB skal kunne tilgå disse enhetene, må du laste modulen i2c-dev sammen med den riktige I2C-drevmodulen for hovedkortet ditt. Dette er vanligvis i2c-piix4 for AMD-systemer og i2c-i801 for Intel-systemer.&lt;/p&gt;&lt;p&gt;Hvis du ikke bruker noen av enhetene som er nevnt ovenfor, kan du trygt ignorere denne meldingen.&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../DetectionManager.cpp" line="64"/>
<source>&lt;h2&gt;Warning:&lt;/h2&gt;&lt;p&gt;The OpenRGB udev rules are not installed.&lt;/p&gt;&lt;p&gt;Most devices will not be available unless running OpenRGB as as a system service or as root.&lt;/p&gt;&lt;p&gt;If using AppImage, Flatpak, or self-compiled versions of OpenRGB you must install the udev rules manually&lt;/p&gt;&lt;p&gt;See &lt;a href=&apos;https://openrgb.org/udev&apos;&gt;https://openrgb.org/udev&lt;/a&gt; to install the udev rules manually&lt;/p&gt;</source>
<translation>&lt;h2&gt;Advarsel:&lt;/h2&gt;&lt;p&gt;OpenRGBs udev-regler er ikke installert.&lt;/p&gt;&lt;p&gt;De fleste enhetene vil ikke være tilgjengelige med mindre du kjører OpenRGB som systemtjeneste eller som rotbruker.&lt;/p&gt;&lt;p&gt;Hvis du bruker AppImage, Flatpak eller selvbygde versjoner av OpenRGB, må du installere udev-reglene manuelt.&lt;/p&gt;&lt;p&gt;Se &lt;a href=&apos;https://openrgb.org/udev&apos;&gt;https://openrgb.org/udev&lt;/a&gt; for å installere udev-reglene manuelt.&lt;/p&gt;</translation>
<translation>&lt;h2&gt;Advarsel:&lt;/h2&gt;&lt;p&gt;OpenRGBs udev-regler er ikke installert.&lt;/p&gt;&lt;p&gt;De fleste enheter vil ikke være tilgjengelige med mindre du kjører OpenRGB som systemtjeneste eller som rotbruker.&lt;/p&gt;&lt;p&gt;Hvis du bruker AppImage, Flatpak eller selvbygde versjoner av OpenRGB, må du installere udev-reglene manuelt.&lt;/p&gt;&lt;p&gt;Se &lt;a href=&apos;https://openrgb.org/udev&apos;&gt;https://openrgb.org/udev&lt;/a&gt; for å installere udev-reglene manuelt.&lt;/p&gt;</translation>
</message>
<message>
<location filename="../../DetectionManager.cpp" line="70"/>
@@ -196,12 +196,12 @@
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="26"/>
<source>E1.31 Device</source>
<translation>E1.31-Enhet</translation>
<translation>E1.31-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="32"/>
<source>Keepalive Time:</source>
<translation>Levetid:</translation>
<translation>Keepalive Time:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="39"/>
@@ -221,7 +221,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="72"/>
<source>Universe Size:</source>
<translation>Universe Størrelse:</translation>
<translation>Univers størrelse:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="79"/>
@@ -231,7 +231,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.ui" line="92"/>
<source>Start Universe:</source>
<translation>Start Universe:</translation>
<translation>Start univers:</translation>
</message>
</context>
<context>
@@ -265,7 +265,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/GoveeSettingsEntry/GoveeSettingsEntry.ui" line="26"/>
<source>Govee Device</source>
<translation>Govee-Enhet</translation>
<translation>Govee-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/GoveeSettingsEntry/GoveeSettingsEntry.ui" line="32"/>
@@ -278,7 +278,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/KasaSmartSettingsEntry/KasaSmartSettingsEntry.ui" line="26"/>
<source>Kasa Smart Device</source>
<translation>Kasa Smart-Enhet</translation>
<translation>Kasa Smart-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/KasaSmartSettingsEntry/KasaSmartSettingsEntry.ui" line="35"/>
@@ -296,12 +296,12 @@
<message>
<location filename="../ManualDevicesSettingsPage/LIFXSettingsEntry/LIFXSettingsEntry.ui" line="26"/>
<source>LIFX Device</source>
<translation>LIFX-Enhet</translation>
<translation>LIFX-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/LIFXSettingsEntry/LIFXSettingsEntry.ui" line="35"/>
<source>Multizone</source>
<translation>Multisone</translation>
<translation>Multizon</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/LIFXSettingsEntry/LIFXSettingsEntry.ui" line="42"/>
@@ -316,7 +316,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/LIFXSettingsEntry/LIFXSettingsEntry.ui" line="62"/>
<source>Extended Multizone</source>
<translation>Utvidet multisone</translation>
<translation>Utvidet multizon</translation>
</message>
</context>
<context>
@@ -324,12 +324,12 @@
<message>
<location filename="../ManualDevicesSettingsPage/DDPSettingsEntry/DDPSettingsEntry.cpp" line="98"/>
<source>DDP (Distributed Display Protocol)</source>
<translation>DDP (Distributed Display Protocol)</translation>
<translation>DDP (fordelt visningsprotokoll)</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/DebugSettingsEntry/DebugSettingsEntry.cpp" line="143"/>
<source>Debug Device</source>
<translation>Feilsøkingsenhet</translation>
<translation>Feilsøk enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/E131SettingsEntry/E131SettingsEntry.cpp" line="116"/>
@@ -349,7 +349,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/SerialSettingsEntry/SerialSettingsEntry.cpp" line="163"/>
<source>Serial Device</source>
<translation>Seriell Enhet</translation>
<translation>Seriell enhet</translation>
</message>
</context>
<context>
@@ -368,7 +368,7 @@
<location filename="../ManualDevicesSettingsPage/ManualDevicesSettingsPage.ui" line="49"/>
<location filename="../ManualDevicesSettingsPage/ManualDevicesSettingsPage.ui" line="61"/>
<source>Save and Rescan</source>
<translation>Lagre og skann på nytt</translation>
<translation>Lagre og skann igjen</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/ManualDevicesSettingsPage.ui" line="66"/>
@@ -399,7 +399,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/NanoleafSettingsEntry/NanoleafScanDialog.ui" line="20"/>
<source>To pair, hold the on-off button down for 5-7 seconds until the LED starts flashing in a pattern, a new entry should appear in the list below, then click the &quot;Pair&quot; button on the entry within 30 seconds.</source>
<translation>For å pare, hold på på/av-knappen i 5-7 sekunder til LED-en begynner å blinke i et mønster. En ny oppføring bør vises i listen under, deretter klikk på &quot;Parre&quot;-knappen på oppføringen innen 30 sekunder.</translation>
<translation>For å parre, hold på på/av-knappen i 5-7 sekunder til LED-en begynner å blinke i et mønster. En ny oppføring bør vises i listen under, deretter klikk på &quot;Parre&quot;-knappen for oppføringen innen 30 sekunder.</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/NanoleafSettingsEntry/NanoleafScanDialog.ui" line="42"/>
@@ -422,7 +422,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/NanoleafSettingsEntry/NanoleafSettingsEntry.ui" line="26"/>
<source>Nanoleaf Device</source>
<translation>Nanoleaf-Enhet</translation>
<translation>Nanoleaf-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/NanoleafSettingsEntry/NanoleafSettingsEntry.ui" line="32"/>
@@ -437,7 +437,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/NanoleafSettingsEntry/NanoleafSettingsEntry.ui" line="60"/>
<source>Auth Key:</source>
<translation>Auth Nøkkel:</translation>
<translation>Auth Key:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/NanoleafSettingsEntry/NanoleafSettingsEntry.ui" line="74"/>
@@ -1612,7 +1612,7 @@
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="14"/>
<source>Zone Editor</source>
<translation>Soneredigerer</translation>
<translation>Zoneredigerer</translation>
</message>
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="20"/>
@@ -1647,37 +1647,37 @@
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="99"/>
<source>Reset Zone Configuration</source>
<translation>Nullstill konfigurasjon for soner</translation>
<translation>Nullstill konfigurasjon for område</translation>
</message>
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="124"/>
<source>Device-Specific Zone Configuration</source>
<translation>Enhetspesifikk sonekonfigurasjon</translation>
<translation>Enhetspesifikk zonkonfigurasjon</translation>
</message>
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="151"/>
<source>Zone Configuration</source>
<translation>Sonekonfigurasjon</translation>
<translation>Zonkonfigurasjon</translation>
</message>
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="159"/>
<source>Zone Type:</source>
<translation>Sonetype:</translation>
<translation>Zonetype:</translation>
</message>
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="176"/>
<source>Zone Matrix Map:</source>
<translation>Sonematrisekart:</translation>
<translation>Zonematrisekart:</translation>
</message>
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="185"/>
<source>Zone Name:</source>
<translation>Sonenummer:</translation>
<translation>Zonenummer:</translation>
</message>
<message>
<location filename="../OpenRGBZoneEditorDialog/OpenRGBZoneEditorDialog.ui" line="192"/>
<source>Zone Size:</source>
<translation>Størrelse på sone:</translation>
<translation>Størrelse på zone:</translation>
</message>
</context>
<context>
@@ -1686,7 +1686,7 @@
<location filename="../OpenRGBZoneInitializationDialog/OpenRGBZoneInitializationDialog.ui" line="14"/>
<location filename="../OpenRGBZoneInitializationDialog/OpenRGBZoneInitializationDialog.cpp" line="81"/>
<source>Zone Initialization</source>
<translation>Sonestart</translation>
<translation>Zonestart</translation>
</message>
<message>
<location filename="../OpenRGBZoneInitializationDialog/OpenRGBZoneInitializationDialog.ui" line="39"/>
@@ -1739,7 +1739,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/PhilipsHueSettingsEntry/PhilipsHueSettingsEntry.ui" line="46"/>
<source>Auto Connect Group:</source>
<translation>Auto-connect-gruppe:</translation>
<translation>Auto connect gruppe:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/PhilipsHueSettingsEntry/PhilipsHueSettingsEntry.ui" line="60"/>
@@ -1749,7 +1749,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/PhilipsHueSettingsEntry/PhilipsHueSettingsEntry.ui" line="74"/>
<source>Client Key:</source>
<translation>Klientnøkkel:</translation>
<translation>Klient nøkkel:</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/PhilipsHueSettingsEntry/PhilipsHueSettingsEntry.ui" line="81"/>
@@ -1772,7 +1772,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/PhilipsWizSettingsEntry/PhilipsWizSettingsEntry.ui" line="26"/>
<source>Philips Wiz Device</source>
<translation>Philips Wiz-Enhet</translation>
<translation>Philips Wiz-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/PhilipsWizSettingsEntry/PhilipsWizSettingsEntry.ui" line="32"/>
@@ -1810,7 +1810,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/QMKORGBSettingsEntry/QMKORGBSettingsEntry.ui" line="26"/>
<source>QMK OpenRGB Device</source>
<translation>QMK OpenRGB-Enhet</translation>
<translation>QMK OpenRGB-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/QMKORGBSettingsEntry/QMKORGBSettingsEntry.ui" line="38"/>
@@ -1833,7 +1833,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/QMKVialRGBSettingsEntry/QMKVialRGBSettingsEntry.ui" line="26"/>
<source>QMK VialRGB Device</source>
<translation>QMK VialRGB-Enhet</translation>
<translation>QMK VialRGB-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/QMKVialRGBSettingsEntry/QMKVialRGBSettingsEntry.ui" line="38"/>
@@ -1904,7 +1904,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="226"/>
<source>Disable Key Expansion</source>
<translation>Deaktiver Key-utvidelse i enhetsvisning</translation>
<translation>Deaktiver nøkkelutvidelse i enhetsvisning</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="217"/>
@@ -1929,7 +1929,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="170"/>
<source>Start minimized to the system tray</source>
<translation>Start minimeret til systemtrayet</translation>
<translation>Start minimeret til systemtrayen</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="175"/>
@@ -1944,12 +1944,12 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="191"/>
<source>Keep OpenRGB active in the system tray when closing the main window</source>
<translation>Hold OpenRGB aktiv i systemtrayet når hovedvinduet lukkes</translation>
<translation>Hold OpenRGB aktiv i systemtrayen når hovedvinduet lukkes</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="195"/>
<source>Monochrome Tray Icon</source>
<translation>Monokromt tray icon</translation>
<translation>Grått icon</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="178"/>
@@ -1959,7 +1959,7 @@
<message>
<location filename="../../ResourceManager.cpp" line="197"/>
<source>HID Safe Mode</source>
<translation>HID tryggmodus</translation>
<translation>HID trygge modus</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="199"/>
@@ -1974,7 +1974,7 @@
<message>
<location filename="../../ResourceManager.cpp" line="203"/>
<source>Amount of time, in milliseconds, to wait before detecting devices when started</source>
<translation>Antall millisekunder som skal ventes før enheter oppdages når programmet startes</translation>
<translation>Antall millisekunder som skal vente før enheter oppdages når programmet startes</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="205"/>
@@ -1994,17 +1994,17 @@
<message>
<location filename="../../ResourceManager.cpp" line="237"/>
<source>Log File Count Limit</source>
<translation>Loggfil antallsgrense</translation>
<translation>Antall loggfiler grense</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="239"/>
<source>Maximum number of log files to keep, 0 for no limit</source>
<translation>Maksimalt antall loggfiler som skal beholdes, 0 for ubegrenset</translation>
<translation>Maksimal antall loggfiler som skal beholdes, 0 for ubegrenset</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="243"/>
<source>Log Manager</source>
<translation>Loggmanager</translation>
<translation>Loggadministrator</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="250"/>
@@ -2029,7 +2029,7 @@
<message>
<location filename="../../ResourceManager.cpp" line="264"/>
<source>Legacy Workaround</source>
<translation>Workaround for eldre systemer</translation>
<translation>Tilbakeholdelse for eldre systemer</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="266"/>
@@ -2049,7 +2049,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="196"/>
<source>Use a monochrome icon in the system tray instead of a full color icon</source>
<translation>Bruk et monokromt ikon i systemtrayet istedenfor et farget ikon</translation>
<translation>Bruk en monokrom ikon i systemlåsen istedenfor et fargelagt ikon</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="202"/>
@@ -2059,7 +2059,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="207"/>
<source>Compact Tabs</source>
<translation>Kompakte faner</translation>
<translation>Kompakte faneinnhold</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="209"/>
@@ -2069,12 +2069,12 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="212"/>
<source>Tabs on Top</source>
<translation>Faner på toppen</translation>
<translation>Fanebånd på toppen</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="214"/>
<source>Display tabs on top instead of on the left</source>
<translation>Vis faner øverst istedenfor på venstre side</translation>
<translation>Vis faneinnholdet øverst istedenfor på venstre side</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="221"/>
@@ -2089,7 +2089,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="234"/>
<source>Window Geometry</source>
<translation>Vindugeometri</translation>
<translation>Vindu geometri</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="242"/>
@@ -2099,7 +2099,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="244"/>
<source>Save window geometry on exit</source>
<translation>Lagre vindugeometri ved avslutting</translation>
<translation>Lagre vinduets geometri ved avslutt</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="247"/>
@@ -2124,17 +2124,17 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="263"/>
<source>User Interface</source>
<translation>Brukergrensesnitt</translation>
<translation>Bruker grensesnitt</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="275"/>
<source>SMBus Sleep Mode (restart required)</source>
<translation>SMBus-Søvnmodus (omstart kreves)</translation>
<translation>SMBus-søvnmodus (omstart kreves)</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="288"/>
<source>Drivers</source>
<translation>Drivere</translation>
<translation>Journaler</translation>
</message>
<message>
<location filename="../../ResourceManager.cpp" line="212"/>
@@ -2144,12 +2144,12 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="284"/>
<source>AMD SMBus: Reduce CPU Usage (restart required)</source>
<translation>AMD SMBus: Reduser CPU bruk (omstart kreves)</translation>
<translation>AMD SMBus: reduser CPU bruk (omstart kreves)</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="173"/>
<source>Custom Arguments</source>
<translation>Egene Argumenter</translation>
<translation>Eigene Argumente</translation>
</message>
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="272"/>
@@ -2164,7 +2164,7 @@
<message>
<location filename="../OpenRGBDialog/OpenRGBDialog.cpp" line="200"/>
<source>Hex Format</source>
<translation>Hex Format</translation>
<translation>Hex format</translation>
</message>
<message>
<location filename="../OpenRGBDynamicSettingsWidget/OpenRGBDynamicSettingsWidget.cpp" line="357"/>
@@ -2174,7 +2174,7 @@
<message>
<location filename="../../ProfileManager.cpp" line="51"/>
<source>Load Profile on Exit</source>
<translation>Last profil ved avslutting</translation>
<translation>Last ned profil ved avslutt</translation>
</message>
<message>
<location filename="../../ProfileManager.cpp" line="53"/>
@@ -2184,7 +2184,7 @@
<message>
<location filename="../../ProfileManager.cpp" line="55"/>
<source>Load Profile on Open</source>
<translation>Last profil ved åpning</translation>
<translation>Last inn profil ved åpning</translation>
</message>
<message>
<location filename="../../ProfileManager.cpp" line="57"/>
@@ -2194,7 +2194,7 @@
<message>
<location filename="../../ProfileManager.cpp" line="59"/>
<source>Load Profile on Resume</source>
<translation>Last profil ved våkning</translation>
<translation>Last ned profil ved gjenoppretting</translation>
</message>
<message>
<location filename="../../ProfileManager.cpp" line="61"/>
@@ -2204,17 +2204,17 @@
<message>
<location filename="../../ProfileManager.cpp" line="63"/>
<source>Load Profile on Service Shutdown</source>
<translation>Last profil ved tjenestestopp</translation>
<translation>Last ned profil ved tjenestestopp</translation>
</message>
<message>
<location filename="../../ProfileManager.cpp" line="65"/>
<source>Profile to load when the OpenRGB background service shuts down</source>
<translation>Profil som skal lastes når OpenRGB bakgrunnstjenesten slutter</translation>
<translation>Profil som skal lastes når OpenRGB bakgrunns-tjenesten slutter</translation>
</message>
<message>
<location filename="../../ProfileManager.cpp" line="67"/>
<source>Load Profile on Service Startup</source>
<translation>Last profil ved tjenestestart</translation>
<translation>Last ned profil ved tjenestestart</translation>
</message>
<message>
<location filename="../../ProfileManager.cpp" line="69"/>
@@ -2224,7 +2224,7 @@
<message>
<location filename="../../ProfileManager.cpp" line="71"/>
<source>Load Profile on Suspend</source>
<translation>Last profil ved suspendering</translation>
<translation>Last ned profil ved å sette på pause</translation>
</message>
<message>
<location filename="../../ProfileManager.cpp" line="73"/>
@@ -2234,7 +2234,7 @@
<message>
<location filename="../../ProfileManager.cpp" line="75"/>
<source>Profile Manager</source>
<translation>Profilmanager</translation>
<translation>Profilhåndterer</translation>
</message>
</context>
<context>
@@ -2250,7 +2250,7 @@
<message>
<location filename="../ManualDevicesSettingsPage/YeelightSettingsEntry/YeelightSettingsEntry.ui" line="26"/>
<source>Yeelight Device</source>
<translation>Yeelight-Enhet</translation>
<translation>Yeelight-enhet</translation>
</message>
<message>
<location filename="../ManualDevicesSettingsPage/YeelightSettingsEntry/YeelightSettingsEntry.ui" line="39"/>
-1
View File
@@ -48,7 +48,6 @@
</description>
<releases>
<release version="1.0" date="2026-09-11"></release>
<release version="1.0rc3.1" date="2026-08-23"></release>
<release version="1.0rc3" date="2026-06-28"></release>
<release version="1.0rc2" date="2025-09-14"></release>
+1 -2
View File
@@ -107,7 +107,6 @@ XML_FILE+=" <Icon Id='OpenRGBIcon' SourceFile='${ICONFILE}'/>\r\n"
XML_FILE+=" <Property Id='ARPPRODUCTICON' Value='OpenRGBIcon'/>\r\n"
XML_FILE+=" <Property Id='ARPURLINFOABOUT' Value='https://www.openrgb.org'/>\r\n"
XML_FILE+=" <Property Id='WIXUI_INSTALLDIR' Value='INSTALLDIR'/>\r\n"
XML_FILE+=" <Property Id='INSTALLLEVEL' Value='2' />\r\n"
XML_FILE+=" <WixVariable Id='WixUILicenseRtf' Value='${LICENSEFILE}'/>\r\n"
XML_FILE+=" <WixVariable Id='WixUIBannerBmp' Value='${BANNERIMAGE}'/>\r\n"
XML_FILE+=" <WixVariable Id='WixUIDialogBmp' Value='${DIALOGBACKGROUND}'/>\r\n"
@@ -128,7 +127,7 @@ XML_FILE+=" <Control Id='BannerBitmap' Type='Bitmap' X='0' Y='0'
XML_FILE+=" <Control Id='BannerLine' Type='Line' X='0' Y='44' Width='373' Height='0' />\r\n"
XML_FILE+=" <Control Id='BottomLine' Type='Line' X='0' Y='234' Width='373' Height='0' />\r\n"
XML_FILE+=" <Control Id='MainText' Type='Text' X='40' Y='60' Width='300' Height='40' Text='This project interacts directly with hardware using reverse engineered protocols. While we do our best to make sure we&apos;re sending the right data, there is always some risk in sending data to hardware when we don&apos;t understand exactly how that hardware works.' />\r\n"
XML_FILE+=" <Control Id='SecondText' Type='Text' X='40' Y='100' Width='300' Height='80' Text='There have been issues in the past with certain hardware getting damaged/bricked and we have either disabled or fixed the offending code. That said, with OpenRGB always changing and the landscape of RGB devices being of widely varying quality, we can&apos;t guarantee it won&apos;t happen again. By installing and using OpenRGB you accept this risk.' />\r\n"
XML_FILE+=" <Control Id='SecondText' Type='Text' X='40' Y='100' Width='300' Height='40' Text='There have been issues in the past with certain hardware getting damaged/bricked and we have either disabled or fixed the offending code. That said, with OpenRGB always changing and the landscape of RGB devices being of widely varying quality, we can&apos;t guarantee it won&apos;t happen again. By installing and using OpenRGB you accept this risk.' />\r\n"
XML_FILE+=" </Dialog>\r\n"
XML_FILE+="\r\n"
XML_FILE+=" <Dialog Id='PawnIODialog' Width='370' Height='270' Title='!(loc.InstallDirDlg_Title)'>\r\n"
+11 -19
View File
@@ -12,12 +12,12 @@ import os
#############################################
# OpenRGB version #
#############################################
version = "1.0"
version = "1.0rc3"
#############################################
# Git version (tag, branch, or commit) #
#############################################
git_id = "release_1.0"
git_id = "release_candidate_1.0rc3"
command = "git rev-list -n 1 " + git_id
print(command)
@@ -36,27 +36,19 @@ artifacts = [
[ "Windows%2064%20MSI", "OpenRGB_" + version + "_Windows_64_" + commit, ".msi" ],
[ "Windows%2064", "OpenRGB_" + version + "_Windows_64_" + commit, ".zip" ],
[ "Windows%2032", "OpenRGB_" + version + "_Windows_32_" + commit, ".zip" ],
[ "Linux%20amd64%20AppImage", "OpenRGB_" + version + "_x86_64_" + commit, ".AppImage" ],
[ "Linux%20arm64%20AppImage", "OpenRGB_" + version + "_arm64_" + commit, ".AppImage" ],
[ "Linux%20i386%20AppImage", "OpenRGB_" + version + "_i386_" + commit, ".AppImage" ],
[ "Linux%20armhf%20AppImage", "OpenRGB_" + version + "_armhf_" + commit, ".AppImage" ],
[ "Linux%20amd64%20Flatpak", "openrgb_" + version + "_x86_64_" + commit, ".flatpak" ],
[ "Linux%20arm64%20Flatpak", "openrgb_" + version + "_arm64_" + commit, ".flatpak" ],
[ "Linux+amd64+.deb+%28Debian+Bookworm%29", "openrgb_" + version + "_amd64_bookworm_" + commit, ".deb" ],
[ "Linux+arm64+.deb+%28Debian%20Bookworm%29", "openrgb_" + version + "_arm64_bookworm_" + commit, ".deb" ],
[ "Linux+i386+.deb+%28Debian+Bookworm%29", "openrgb_" + version + "_i386_bookworm_" + commit, ".deb" ],
[ "Linux+armhf+.deb+%28Debian%20Bookworm%29", "openrgb_" + version + "_armhf_bookworm_" + commit, ".deb" ],
[ "Linux+amd64+.deb+%28Debian+Trixie%29", "openrgb_" + version + "_amd64_trixie_" + commit, ".deb" ],
[ "Linux+arm64+.deb+%28Debian%20Trixie%29", "openrgb_" + version + "_arm64_trixie_" + commit, ".deb" ],
[ "Linux+i386+.deb+%28Debian+Trixie%29", "openrgb_" + version + "_i386_trixie_" + commit, ".deb" ],
[ "Linux%20amd64%20AppImage", "OpenRGB_" + version + "_x86_64_" + commit, ".AppImage" ],
[ "Linux%20i386%20AppImage", "OpenRGB_" + version + "_i386_" + commit, ".AppImage" ],
[ "Linux+64+F43+rpm", "openrgb_" + version + "_x86_64_f43_" + commit, ".rpm" ],
[ "Linux+arm64+.deb+%28Debian%20Bookworm%29", "openrgb_" + version + "_arm64_bookworm_" + commit, ".deb" ],
[ "Linux+armhf+.deb+%28Debian%20Bookworm%29", "openrgb_" + version + "_armhf_bookworm_" + commit, ".deb" ],
[ "Linux+arm64+.deb+%28Debian%20Trixie%29", "openrgb_" + version + "_arm64_trixie_" + commit, ".deb" ],
[ "Linux+armhf+.deb+%28Debian%20Trixie%29", "openrgb_" + version + "_armhf_trixie_" + commit, ".deb" ],
[ "Linux+amd64+.rpm+%28Fedora+44%29", "openrgb_" + version + "_x86_64_f44_" + commit, ".rpm" ],
[ "Linux%20arm64%20AppImage", "OpenRGB_" + version + "_arm64_" + commit, ".AppImage" ],
[ "Linux%20armhf%20AppImage", "OpenRGB_" + version + "_armhf_" + commit, ".AppImage" ],
[ "MacOS%20Intel", "OpenRGB_" + version + "_MacOS_Intel_" + commit, ".zip" ],
[ "MacOS%20ARM64", "OpenRGB_" + version + "_MacOS_ARM64_" + commit, ".zip" ]
]
@@ -117,4 +109,4 @@ for artifact in artifacts:
#########################################
command = "mv download.zip artifacts/" + artifact[1] + artifact[2]
print(command)
os.system(command)
os.system(command)