Compare commits
100
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b86be6b75d | ||
|
|
c11090a4cf | ||
|
|
a69390e5a8 | ||
|
|
a900d5c402 | ||
|
|
f870dcdc3a | ||
|
|
9a105ccdaf | ||
|
|
1faa2b1d31 | ||
|
|
91923f3a82 | ||
|
|
fcb594cb0e | ||
|
|
32f0f1a9a2 | ||
|
|
4d379b97c6 | ||
|
|
a3e5296bf2 | ||
|
|
072d27d9dd | ||
|
|
201f2d7aba | ||
|
|
28cd45b8c0 | ||
|
|
7a9aab5a37 | ||
|
|
24ea50df71 | ||
|
|
75df39252b | ||
|
|
385f123816 | ||
|
|
e1fc54de85 | ||
|
|
e22e88d97d | ||
|
|
0ba254e38f | ||
|
|
9d35d28a6a | ||
|
|
b4b4f3b891 | ||
|
|
e1086712ad | ||
|
|
fd7ccad1e6 | ||
|
|
8bc1a0cb8f | ||
|
|
5112224240 | ||
|
|
5e2cc42290 | ||
|
|
b1436a8435 | ||
|
|
a8d4e25642 | ||
|
|
2b3638ba57 | ||
|
|
78369c2a92 | ||
|
|
03ce513254 | ||
|
|
18503cccc6 | ||
|
|
e1d46d3bb3 | ||
|
|
0466996970 | ||
|
|
56bd7580ba | ||
|
|
ca47047bf8 | ||
|
|
cc00690dd4 | ||
|
|
973311aa48 | ||
|
|
747afdf553 | ||
|
|
8f11f8fd97 | ||
|
|
2b11f6fe07 | ||
|
|
94981f107b | ||
|
|
0144a6a150 | ||
|
|
6ec8b80e65 | ||
|
|
ddae1ed20a | ||
|
|
70f79e97b4 | ||
|
|
d05fe1bdf1 | ||
|
|
e9e99a029d | ||
|
|
98dd494f75 | ||
|
|
7b7f0aa0fe | ||
|
|
70876193cf | ||
|
|
f47a22fb2f | ||
|
|
f24b56b64f | ||
|
|
4e70949aec | ||
|
|
5133887632 | ||
|
|
45950047cb | ||
|
|
a56a08411f | ||
|
|
52f0049025 | ||
|
|
f6f317d487 | ||
|
|
ad364871c6 | ||
|
|
58582202cf | ||
|
|
57cde755c1 | ||
|
|
b0c7dba441 | ||
|
|
d763f7ecc7 | ||
|
|
4ec4df8741 | ||
|
|
5d055d30a3 | ||
|
|
fc73fe0b4c | ||
|
|
dd22150cfe | ||
|
|
07e7feca56 | ||
|
|
a93eec8f50 | ||
|
|
88bad762e5 | ||
|
|
18dfe6ca8b | ||
|
|
96dfa7009f | ||
|
|
92a9d8ad11 | ||
|
|
2ab9094b41 | ||
|
|
f6154ccbc4 | ||
|
|
0be01dde19 | ||
|
|
e113e91423 | ||
|
|
28c63b8b9d | ||
|
|
c5aac4c44f | ||
|
|
42e7f2a5c3 | ||
|
|
ae9ae18d31 | ||
|
|
f89cdac198 | ||
|
|
e8f345ff77 | ||
|
|
aff0610df9 | ||
|
|
9199d062d1 | ||
|
|
0ec4aaa629 | ||
|
|
9fca99b4ef | ||
|
|
14853895f3 | ||
|
|
d79a400c8c | ||
|
|
f741385e43 | ||
|
|
840bd92afb | ||
|
|
96e1fb0b10 | ||
|
|
388557e5f9 | ||
|
|
3f32817272 | ||
|
|
056b383536 | ||
|
|
0691f40588 |
+4
-16
@@ -536,10 +536,7 @@ before_script:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/opt/homebrew/bin/brew shellenv)
|
||||
- qmake OpenRGB.pro
|
||||
- make -j16
|
||||
- macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt6 arm
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_ARM64_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -555,10 +552,7 @@ before_script:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/opt/homebrew/bin/brew shellenv)
|
||||
- /opt/homebrew/opt/qt@5/bin/qmake OpenRGB.pro
|
||||
- make -j16
|
||||
- /opt/homebrew/opt/qt@5/bin/macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt5 arm
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Qt5_ARM64_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -574,10 +568,7 @@ before_script:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/usr/local/bin/brew shellenv)
|
||||
- arch -x86_64 /usr/local/bin/qmake OpenRGB.pro
|
||||
- arch -x86_64 make -j16
|
||||
- arch -x86_64 /usr/local/bin/macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt6 intel
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Intel_${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -593,10 +584,7 @@ before_script:
|
||||
- macos
|
||||
stage: build
|
||||
script:
|
||||
- eval $(/usr/local/bin/brew shellenv)
|
||||
- arch -x86_64 /usr/local/opt/qt@5/bin/qmake OpenRGB.pro
|
||||
- arch -x86_64 make -j16
|
||||
- arch -x86_64 /usr/local/opt/qt@5/bin/macdeployqt OpenRGB.app -codesign=OpenRGB
|
||||
- ./scripts/build-macos.sh qt5 intel
|
||||
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_NAME}_MacOS_Intel_Qt5_${CI_COMMIT_SHORT_SHA}"
|
||||
|
||||
@@ -69,3 +69,7 @@ OpenRGB is written in C++, uses the Qt framework for UI, and uses the QMake buil
|
||||
|
||||
Translation files are located in [`OpenRGB/qt/i18n/`](https://gitlab.com/CalcProgrammer1/OpenRGB/-/tree/master/qt/i18n), where languages are formatted using ISO 639-1 format: `OpenRGB_xx_XX.ts` — `xx_XX` representing the language code.
|
||||
In order to translate a file, you need to [fork](https://gitlab.com/CalcProgrammer1/OpenRGB/-/forks/new) the project, create a new file for your language with `lupdate` (or edit an exisiting one), edit the file with `qtlinguist`, commit, push, and create a merge request.
|
||||
|
||||
## AI Guidelines
|
||||
|
||||
OpenRGB is an open source project developed by humans for humans. As a general rule, AI generated submissions are not permitted. The licensing behind AI generated code is problematic. If you choose to use AI for assistance in your development process, we can't stop you, but do not credit the AI in commits (no AI authorship/co-authorship). Ultimately, you as a human developer are responsible for the code you submit and it is expected that any code you submit you fully understand and have manually vetted before submission. Merge requests that appear to be straight from an AI output, commits with AI tool authorship or co-authorship tags, or otherwise AI generated submissions are subject to closure.
|
||||
|
||||
@@ -31,7 +31,7 @@ AOCKeyboardController::~AOCKeyboardController()
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCKeyboardController::GetDeviceName()
|
||||
|
||||
@@ -27,7 +27,7 @@ AOCMouseController::~AOCMouseController()
|
||||
|
||||
std::string AOCMouseController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCMouseController::GetDeviceName()
|
||||
|
||||
@@ -27,7 +27,7 @@ AOCMousematController::~AOCMousematController()
|
||||
|
||||
std::string AOCMousematController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string AOCMousematController::GetDeviceName()
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ ASRockASRRGBSMBusController::~ASRockASRRGBSMBusController()
|
||||
|
||||
std::string ASRockASRRGBSMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ ASRockPolychromeV1SMBusController::~ASRockPolychromeV1SMBusController()
|
||||
|
||||
std::string ASRockPolychromeV1SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ ASRockPolychromeV2SMBusController::~ASRockPolychromeV2SMBusController()
|
||||
|
||||
std::string ASRockPolychromeV2SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -91,9 +91,9 @@ DetectedControllers DetectASRockSMBusControllers(std::vector<i2c_smbus_interface
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_MOBO_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(buses[bus]->pci_subsystem_vendor == ASROCK_SUB_VEN)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == ASROCK_SUB_VEN)
|
||||
{
|
||||
LOG_DEBUG(SMBUS_CHECK_DEVICE_MESSAGE_EN, ASROCK_DETECTOR_NAME, bus, VENDOR_NAME, SMBUS_ADDRESS);
|
||||
// Check for Polychrome controller at 0x6A
|
||||
|
||||
@@ -32,7 +32,7 @@ std::string AuraGPUController::GetDeviceName()
|
||||
|
||||
std::string AuraGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
@@ -79,7 +79,7 @@ void AuraGPUController::AuraGPURegisterWrite(unsigned char reg, unsigned char va
|
||||
|
||||
bool AuraGPUController::SaveOnlyApplies()
|
||||
{
|
||||
switch (bus->pci_subsystem_device)
|
||||
switch (bus->info.pci_subsystem_device)
|
||||
{
|
||||
case ASUS_VEGA64_STRIX:
|
||||
return false;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
bool TestForAsusAuraGPUController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
if(bus->pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
if(bus->info.pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+4
-1
@@ -19,7 +19,10 @@ AsusAuraRyuoAIOController::AsusAuraRyuoAIOController(hid_device* dev_handle, con
|
||||
| Manually adding device info for now |
|
||||
| TODO: Implement config table accurately |
|
||||
\*-----------------------------------------------------*/
|
||||
device_info.push_back({0x00, 0x00, 12, 0, AuraDeviceType::FIXED});
|
||||
uint8_t leds = (dev_name.find("Ryujin") != std::string::npos) ? 5 : 12;
|
||||
|
||||
device_info.push_back({0x00, 0x00, leds, 0, AuraDeviceType::FIXED});
|
||||
|
||||
}
|
||||
|
||||
AsusAuraRyuoAIOController::~AsusAuraRyuoAIOController()
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
#define AURA_TERMINAL_PID 0x1889
|
||||
#define ROG_STRIX_LC120_PID 0x879E
|
||||
#define AURA_RYUO_AIO_PID 0x1887
|
||||
#define AURA_RYUJIN_AIO_PID 0x18AE
|
||||
#define ASUS_ROG_ALLY_PID 0x1ABE
|
||||
#define ASUS_ROG_ALLY_X_PID 0x1B4C
|
||||
|
||||
@@ -523,6 +524,7 @@ REGISTER_HID_DETECTOR_PU("ASUS ROG PG32UQ", DetectAs
|
||||
REGISTER_HID_DETECTOR ("ASUS ROG AURA Terminal", DetectAsusAuraUSBTerminal, AURA_USB_VID, AURA_TERMINAL_PID);
|
||||
REGISTER_HID_DETECTOR_PU ("ASUS ROG Strix LC", DetectAsusAuraUSBROGStrixLC, AURA_USB_VID, ROG_STRIX_LC120_PID, 0x00FF, 1);
|
||||
REGISTER_HID_DETECTOR_PU ("ASUS ROG Ryuo AIO", DetectAsusAuraUSBRyuoAIO, AURA_USB_VID, AURA_RYUO_AIO_PID, 0xFF72, 0x00A1);
|
||||
REGISTER_HID_DETECTOR_PU ("ASUS ROG Ryujin AIO", DetectAsusAuraUSBRyuoAIO, AURA_USB_VID, AURA_RYUJIN_AIO_PID, 0xFF72, 0x00A1);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_PID, 0);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne QI", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_QI_PID, 0);
|
||||
REGISTER_HID_DETECTOR_I ("ASUS ROG Throne QI GUNDAM", DetectAsusAuraUSBHeadsetStand, AURA_USB_VID, AURA_ROG_THRONE_QI_GUNDAM_PID, 0);
|
||||
|
||||
@@ -26,7 +26,7 @@ ColorfulGPUController::~ColorfulGPUController()
|
||||
|
||||
std::string ColorfulGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
@@ -45,7 +45,7 @@ void ColorfulGPUController::SetDirect(RGBColor color)
|
||||
uint8_t g = RGBGetGValue(color);
|
||||
uint8_t b = RGBGetBValue(color);
|
||||
|
||||
if(this->bus->pci_subsystem_device == COLORFUL_IGAME_RTX_4070_VULCAN_OCV)
|
||||
if(this->bus->info.pci_subsystem_device == COLORFUL_IGAME_RTX_4070_VULCAN_OCV)
|
||||
{
|
||||
uint8_t data_pkt[COLORFUL_PACKET_LENGTH_V2] = { 0xAA, 0xEF, 0x01, 0x04, 0x88, 0x26 };
|
||||
for(int i=6; i < COLORFUL_PACKET_LENGTH_V2 -2; i = i + 3)
|
||||
|
||||
@@ -24,7 +24,7 @@ ColorfulTuringGPUController::~ColorfulTuringGPUController()
|
||||
|
||||
std::string ColorfulTuringGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -17,7 +17,7 @@ DetectedControllers DetectColorfulTuringGPUControllers(i2c_smbus_interface* bus,
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
ColorfulTuringGPUController* controller = new ColorfulTuringGPUController(bus, i2c_addr, name);
|
||||
RGBController_ColorfulTuringGPU* rgb_controller = new RGBController_ColorfulTuringGPU(controller);
|
||||
|
||||
@@ -52,7 +52,7 @@ unsigned char CorsairDRAMController::GetProtocolVersion()
|
||||
|
||||
std::string CorsairDRAMController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
@@ -366,7 +366,7 @@ void CorsairDRAMController::ReadDeviceInfo()
|
||||
/*-----------------------------------------------------*\
|
||||
| Log Device Information Data |
|
||||
\*-----------------------------------------------------*/
|
||||
if(LogManager::get()->getLoglevel() >= LL_TRACE)
|
||||
if(LogManager::get()->GetLogLevel() >= LL_TRACE)
|
||||
{
|
||||
char device_info_buf[256];
|
||||
unsigned int pos;
|
||||
|
||||
@@ -44,9 +44,9 @@ bool TestForCorsairDRAMController(i2c_smbus_interface *bus, unsigned char addres
|
||||
|
||||
res = bus->i2c_smbus_read_byte_data(address, 0x44);
|
||||
|
||||
if(!(res == 0x03 || res == 0x04))
|
||||
if(!(res == 0x01 || res == 0x03 || res == 0x04))
|
||||
{
|
||||
LOG_DEBUG("[%s] Failed: expected 0x03 or 0x04, got %04X", CORSAIR_DRAM_NAME, res);
|
||||
LOG_DEBUG("[%s] Failed: expected 0x01, 0x03, or 0x04, got %04X", CORSAIR_DRAM_NAME, res);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ DetectedControllers DetectCorsairDRAMControllers(std::vector<i2c_smbus_interface
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_DRAM_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_DRAM_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
LOG_DEBUG("[%s] Testing bus %d", CORSAIR_DRAM_NAME, bus);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ std::string CorsairVengeanceController::GetDeviceName()
|
||||
|
||||
std::string CorsairVengeanceController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -23,7 +23,7 @@ CreativeSoundBlasterXG6Controller::~CreativeSoundBlasterXG6Controller()
|
||||
|
||||
std::string CreativeSoundBlasterXG6Controller::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string CreativeSoundBlasterXG6Controller::GetDeviceName()
|
||||
|
||||
@@ -35,7 +35,7 @@ std::string CrucialController::GetDeviceVersion()
|
||||
|
||||
std::string CrucialController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -145,7 +145,7 @@ DetectedControllers DetectCrucialControllers(std::vector<i2c_smbus_interface*> &
|
||||
{
|
||||
int address_list_idx = -1;
|
||||
|
||||
IF_DRAM_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_DRAM_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
for(unsigned int slot = 0; slot < 4; slot++)
|
||||
{
|
||||
@@ -182,7 +182,7 @@ DetectedControllers DetectCrucialControllers(std::vector<i2c_smbus_interface*> &
|
||||
std::this_thread::sleep_for(1ms);
|
||||
}
|
||||
|
||||
LOG_DEBUG("[%s] In bus: %02X:%02X looking for devices at [%s]", CRUCIAL_CONTROLLER_NAME, buses[bus]->pci_vendor, buses[bus]->pci_device, TESTING_ADDRESSES);
|
||||
LOG_DEBUG("[%s] In bus: %02X:%02X looking for devices at [%s]", CRUCIAL_CONTROLLER_NAME, buses[bus]->info.pci_vendor, buses[bus]->info.pci_device, TESTING_ADDRESSES);
|
||||
|
||||
// Add Crucial controllers
|
||||
for(unsigned int address_list_idx = 0; address_list_idx < CRUCIAL_ADDRESS_COUNT; address_list_idx++)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "nlohmann/json.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "DetectionManager.h"
|
||||
#include "LogManager.h"
|
||||
#include "ResourceManager.h"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include "KeyboardLayoutManager.h"
|
||||
#include "JsonUtils.h"
|
||||
#include "RGBController_Debug.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@@ -54,80 +55,69 @@ RGBController_Debug::RGBController_Debug(bool custom, json settings)
|
||||
if(custom_controller)
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Set the name |
|
||||
| Set the name, description, location, version, and |
|
||||
| serial |
|
||||
\*-------------------------------------------------*/
|
||||
name = debug_settings["DeviceName"];
|
||||
name = JsonUtils::JsonGetString(debug_settings, "DeviceName", "Custom Device");
|
||||
description = JsonUtils::JsonGetString(debug_settings, "DeviceDescription");
|
||||
location = JsonUtils::JsonGetString(debug_settings, "DeviceLocation");
|
||||
version = JsonUtils::JsonGetString(debug_settings, "DeviceVersion");
|
||||
serial = JsonUtils::JsonGetString(debug_settings, "DeviceSerial");
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Find the device type |
|
||||
\*-------------------------------------------------*/
|
||||
if (debug_settings["DeviceType"] == "motherboard") type = DEVICE_TYPE_MOTHERBOARD;
|
||||
else if (debug_settings["DeviceType"] == "dram") type = DEVICE_TYPE_DRAM;
|
||||
else if (debug_settings["DeviceType"] == "gpu") type = DEVICE_TYPE_GPU;
|
||||
else if (debug_settings["DeviceType"] == "cooler") type = DEVICE_TYPE_COOLER;
|
||||
else if (debug_settings["DeviceType"] == "led_strip") type = DEVICE_TYPE_LEDSTRIP;
|
||||
else if (debug_settings["DeviceType"] == "keyboard") type = DEVICE_TYPE_KEYBOARD;
|
||||
else if (debug_settings["DeviceType"] == "mouse") type = DEVICE_TYPE_MOUSE;
|
||||
else if (debug_settings["DeviceType"] == "mousemat") type = DEVICE_TYPE_MOUSEMAT;
|
||||
else if (debug_settings["DeviceType"] == "headset") type = DEVICE_TYPE_HEADSET;
|
||||
else if (debug_settings["DeviceType"] == "headset_stand") type = DEVICE_TYPE_HEADSET_STAND;
|
||||
else if (debug_settings["DeviceType"] == "gamepad") type = DEVICE_TYPE_GAMEPAD;
|
||||
else if (debug_settings["DeviceType"] == "light") type = DEVICE_TYPE_LIGHT;
|
||||
else if (debug_settings["DeviceType"] == "speaker") type = DEVICE_TYPE_SPEAKER;
|
||||
else if (debug_settings["DeviceType"] == "unknown") type = DEVICE_TYPE_UNKNOWN;
|
||||
std::string device_type = JsonUtils::JsonGetString(debug_settings, "DeviceType", "keyboard");
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Set description, location, version, and serial |
|
||||
\*-------------------------------------------------*/
|
||||
description = debug_settings["DeviceDescription"];
|
||||
location = debug_settings["DeviceLocation"];
|
||||
version = debug_settings["DeviceVersion"];
|
||||
serial = debug_settings["DeviceSerial"];
|
||||
if( device_type == "motherboard") type = DEVICE_TYPE_MOTHERBOARD;
|
||||
else if(device_type == "dram") type = DEVICE_TYPE_DRAM;
|
||||
else if(device_type == "gpu") type = DEVICE_TYPE_GPU;
|
||||
else if(device_type == "cooler") type = DEVICE_TYPE_COOLER;
|
||||
else if(device_type == "led_strip") type = DEVICE_TYPE_LEDSTRIP;
|
||||
else if(device_type == "keyboard") type = DEVICE_TYPE_KEYBOARD;
|
||||
else if(device_type == "mouse") type = DEVICE_TYPE_MOUSE;
|
||||
else if(device_type == "mousemat") type = DEVICE_TYPE_MOUSEMAT;
|
||||
else if(device_type == "headset") type = DEVICE_TYPE_HEADSET;
|
||||
else if(device_type == "headset_stand") type = DEVICE_TYPE_HEADSET_STAND;
|
||||
else if(device_type == "gamepad") type = DEVICE_TYPE_GAMEPAD;
|
||||
else if(device_type == "light") type = DEVICE_TYPE_LIGHT;
|
||||
else if(device_type == "speaker") type = DEVICE_TYPE_SPEAKER;
|
||||
else if(device_type == "unknown") type = DEVICE_TYPE_UNKNOWN;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string name_setting = "";
|
||||
std::string type_setting = "keyboard";
|
||||
|
||||
if(debug_settings.contains("name"))
|
||||
{
|
||||
name_setting = debug_settings["name"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("type"))
|
||||
{
|
||||
type_setting = debug_settings["type"];
|
||||
}
|
||||
std::string name_setting = JsonUtils::JsonGetString(debug_settings, "name");
|
||||
std::string type_setting = JsonUtils::JsonGetString(debug_settings, "type", "keyboard");
|
||||
|
||||
if(type_setting == "motherboard")
|
||||
{
|
||||
name = "Debug Motherboard";
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
name = "Debug Motherboard";
|
||||
type = DEVICE_TYPE_MOTHERBOARD;
|
||||
}
|
||||
else if(type_setting == "dram")
|
||||
{
|
||||
name = "Debug DRAM";
|
||||
type = DEVICE_TYPE_DRAM;
|
||||
name = "Debug DRAM";
|
||||
type = DEVICE_TYPE_DRAM;
|
||||
}
|
||||
else if(type_setting == "gpu")
|
||||
{
|
||||
name = "Debug GPU";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
name = "Debug GPU";
|
||||
type = DEVICE_TYPE_GPU;
|
||||
}
|
||||
else if(type_setting == "keyboard")
|
||||
{
|
||||
name = "Debug Keyboard";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
name = "Debug Keyboard";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
}
|
||||
else if(type_setting == "mouse")
|
||||
{
|
||||
name = "Debug Mouse";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
name = "Debug Mouse";
|
||||
type = DEVICE_TYPE_MOUSE;
|
||||
}
|
||||
else if(type_setting == "argb")
|
||||
{
|
||||
name = "Debug ARGB Controller";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
name = "Debug ARGB Controller";
|
||||
type = DEVICE_TYPE_LEDSTRIP;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -143,6 +133,41 @@ RGBController_Debug::RGBController_Debug(bool custom, json settings)
|
||||
{
|
||||
name = name_setting;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Create test configuration |
|
||||
\*---------------------------------------------------------*/
|
||||
nlohmann::json configuration_json;
|
||||
JsonUtils::JsonParse(configuration, configuration_json);
|
||||
|
||||
configuration_json["schema"]["test_string"]["title"] = "String Setting";
|
||||
configuration_json["schema"]["test_string"]["type"] = "string";
|
||||
|
||||
configuration_json["schema"]["test_bool"]["title"] = "Boolean Setting";
|
||||
configuration_json["schema"]["test_bool"]["type"] = "bool";
|
||||
|
||||
configuration_json["schema"]["test_enum"]["title"] = "String Enum Setting";
|
||||
configuration_json["schema"]["test_enum"]["type"] = "string";
|
||||
configuration_json["schema"]["test_enum"]["enum"][0] = "Option 1";
|
||||
configuration_json["schema"]["test_enum"]["enum"][1] = "Option 2";
|
||||
configuration_json["schema"]["test_enum"]["enum"][2] = "Option 3";
|
||||
|
||||
configuration_json["schema"]["test_enum_int"]["title"] = "Integer Enum Setting";
|
||||
configuration_json["schema"]["test_enum_int"]["type"] = "integer";
|
||||
configuration_json["schema"]["test_enum_int"]["enum"][0] = 2;
|
||||
configuration_json["schema"]["test_enum_int"]["enum"][1] = 4;
|
||||
configuration_json["schema"]["test_enum_int"]["enum"][2] = 8;
|
||||
|
||||
configuration_json["schema"]["test_int"]["title"] = "Integer Setting";
|
||||
configuration_json["schema"]["test_int"]["type"] = "integer";
|
||||
|
||||
configuration_json["configuration"]["test_string"] = "This is a test";
|
||||
configuration_json["configuration"]["test_bool"] = true;
|
||||
configuration_json["configuration"]["test_enum"] = "Option 2";
|
||||
configuration_json["configuration"]["test_enum_int"] = 4;
|
||||
configuration_json["configuration"]["test_int"] = 12345;
|
||||
|
||||
configuration = configuration_json.dump();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -181,6 +206,7 @@ void RGBController_Debug::SetupZones()
|
||||
/*-------------------------------------------------*\
|
||||
| Clear any existing color/LED configuration |
|
||||
\*-------------------------------------------------*/
|
||||
led_alt_names.clear();
|
||||
leds.clear();
|
||||
colors.clear();
|
||||
|
||||
@@ -216,9 +242,9 @@ void RGBController_Debug::SetupZones()
|
||||
continue;
|
||||
}
|
||||
|
||||
custom_zone.leds_min = ZoneJson["leds_min"];
|
||||
custom_zone.leds_max = ZoneJson["leds_max"];
|
||||
custom_zone.leds_count = ZoneJson["leds_count"];
|
||||
custom_zone.leds_min = JsonUtils::JsonGetInt(ZoneJson, "leds_min");
|
||||
custom_zone.leds_max = JsonUtils::JsonGetInt(ZoneJson, "leds_max");
|
||||
custom_zone.leds_count = JsonUtils::JsonGetInt(ZoneJson, "leds_count");
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Fill in the matrix map |
|
||||
@@ -241,8 +267,8 @@ void RGBController_Debug::SetupZones()
|
||||
continue;
|
||||
}
|
||||
|
||||
unsigned int H = ZoneJson["matrix_width"];
|
||||
unsigned int W = ZoneJson["matrix_height"];
|
||||
unsigned int H = JsonUtils::JsonGetInt(ZoneJson, "matrix_width");
|
||||
unsigned int W = JsonUtils::JsonGetInt(ZoneJson, "matrix_height");
|
||||
|
||||
BadVal = ((unsigned int)ZoneJson["matrix_map"].size() != H);
|
||||
|
||||
@@ -333,36 +359,11 @@ void RGBController_Debug::SetupZones()
|
||||
}
|
||||
else
|
||||
{
|
||||
bool zone_single = true;
|
||||
bool zone_linear = true;
|
||||
bool zone_resizable = false;
|
||||
bool zone_keyboard = false;
|
||||
bool zone_underglow = false;
|
||||
|
||||
if(debug_settings.contains("single"))
|
||||
{
|
||||
zone_single = debug_settings["single"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("linear"))
|
||||
{
|
||||
zone_linear = debug_settings["linear"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("resizable"))
|
||||
{
|
||||
zone_resizable = debug_settings["resizable"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("keyboard"))
|
||||
{
|
||||
zone_keyboard = debug_settings["keyboard"];
|
||||
}
|
||||
|
||||
if(debug_settings.contains("underglow"))
|
||||
{
|
||||
zone_underglow = debug_settings["underglow"];
|
||||
}
|
||||
bool zone_single = JsonUtils::JsonGetBool(debug_settings, "single", true);
|
||||
bool zone_linear = JsonUtils::JsonGetBool(debug_settings, "linear", true);
|
||||
bool zone_resizable = JsonUtils::JsonGetBool(debug_settings, "resizable", false);
|
||||
bool zone_keyboard = JsonUtils::JsonGetBool(debug_settings, "keyboard", false);
|
||||
bool zone_underglow = JsonUtils::JsonGetBool(debug_settings, "underglow", false);
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Create a single zone/LED |
|
||||
@@ -371,21 +372,23 @@ void RGBController_Debug::SetupZones()
|
||||
{
|
||||
zone single_zone;
|
||||
|
||||
single_zone.name = "Single Zone";
|
||||
single_zone.type = ZONE_TYPE_SINGLE;
|
||||
single_zone.leds_min = 1;
|
||||
single_zone.leds_max = 1;
|
||||
single_zone.leds_count = 1;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones.push_back(single_zone);
|
||||
}
|
||||
else
|
||||
|
||||
zones[zone_idx].name = "Single Zone";
|
||||
zones[zone_idx].type = ZONE_TYPE_SINGLE;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[zone_idx] = single_zone;
|
||||
zones[zone_idx].flags = ZONE_FLAG_MANUALLY_CONFIGURABLE_DEVICE_SPECIFIC;
|
||||
}
|
||||
|
||||
zones[zone_idx].leds_min = 1;
|
||||
zones[zone_idx].leds_max = 1;
|
||||
zones[zone_idx].leds_count = 1;
|
||||
|
||||
led single_led;
|
||||
|
||||
single_led.name = "Single LED";
|
||||
@@ -394,6 +397,27 @@ void RGBController_Debug::SetupZones()
|
||||
|
||||
led_alt_names.push_back("");
|
||||
|
||||
nlohmann::json configuration_json;
|
||||
JsonUtils::JsonParse(configuration, configuration_json);
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
/*-----------------------------------------*\
|
||||
| Create test configuration |
|
||||
\*-----------------------------------------*/
|
||||
configuration_json["zones"][zone_idx]["schema"]["color_order"]["title"] = "Color Order";
|
||||
configuration_json["zones"][zone_idx]["schema"]["color_order"]["type"] = "string";
|
||||
configuration_json["zones"][zone_idx]["schema"]["color_order"]["enum"][0] = "RGB";
|
||||
configuration_json["zones"][zone_idx]["schema"]["color_order"]["enum"][1] = "GRB";
|
||||
}
|
||||
|
||||
if((zones[zone_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_DEVICE_SPECIFIC) == 0)
|
||||
{
|
||||
configuration_json["zones"][zone_idx]["configuration"]["color_order"] = "RGB";
|
||||
}
|
||||
|
||||
configuration = configuration_json.dump();
|
||||
|
||||
zone_idx++;
|
||||
}
|
||||
|
||||
@@ -404,22 +428,18 @@ void RGBController_Debug::SetupZones()
|
||||
{
|
||||
zone linear_zone;
|
||||
|
||||
linear_zone.name = "Linear Zone";
|
||||
linear_zone.type = ZONE_TYPE_LINEAR;
|
||||
linear_zone.leds_min = 10;
|
||||
linear_zone.leds_max = 10;
|
||||
linear_zone.leds_count = 10;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones.push_back(linear_zone);
|
||||
}
|
||||
else
|
||||
{
|
||||
zones[zone_idx] = linear_zone;
|
||||
}
|
||||
|
||||
for(std::size_t led_idx = 0; led_idx < 10; led_idx++)
|
||||
zones[zone_idx].name = "Linear Zone";
|
||||
zones[zone_idx].type = ZONE_TYPE_LINEAR;
|
||||
zones[zone_idx].leds_min = 10;
|
||||
zones[zone_idx].leds_max = 10;
|
||||
zones[zone_idx].leds_count = 10;
|
||||
|
||||
for(std::size_t led_idx = 0; led_idx < zones[zone_idx].leds_count; led_idx++)
|
||||
{
|
||||
led linear_led;
|
||||
|
||||
@@ -441,6 +461,24 @@ void RGBController_Debug::SetupZones()
|
||||
KEYBOARD_LAYOUT layout = KEYBOARD_LAYOUT::KEYBOARD_LAYOUT_ANSI_QWERTY;
|
||||
KEYBOARD_SIZE size = KEYBOARD_SIZE::KEYBOARD_SIZE_FULL;
|
||||
|
||||
nlohmann::json configuration_json;
|
||||
JsonUtils::JsonParse(configuration, configuration_json);
|
||||
|
||||
zone keyboard_zone;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones.push_back(keyboard_zone);
|
||||
}
|
||||
|
||||
zones[zone_idx].name = "Keyboard Zone";
|
||||
zones[zone_idx].type = ZONE_TYPE_MATRIX;
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones[zone_idx].flags = ZONE_FLAG_MANUALLY_CONFIGURABLE_DEVICE_SPECIFIC | ZONE_FLAG_ZONE_GEOMETRY_MAY_CHANGE;
|
||||
}
|
||||
|
||||
if(debug_settings.contains("layout"))
|
||||
{
|
||||
KEYBOARD_LAYOUT temp_layout = debug_settings["layout"];
|
||||
@@ -451,6 +489,29 @@ void RGBController_Debug::SetupZones()
|
||||
}
|
||||
}
|
||||
|
||||
if(zones[zone_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_DEVICE_SPECIFIC)
|
||||
{
|
||||
if(configuration_json.contains("zones") && (zone_idx < (int)configuration_json["zones"].size()))
|
||||
{
|
||||
if(configuration_json["zones"][zone_idx].contains("configuration"))
|
||||
{
|
||||
if(configuration_json["zones"][zone_idx]["configuration"].contains("layout"))
|
||||
{
|
||||
std::string layout_string = configuration_json["zones"][zone_idx]["configuration"]["layout"];
|
||||
|
||||
for(std::size_t layout_idx = 0; layout_idx < NUM_LAYOUTS; layout_idx++)
|
||||
{
|
||||
if(layout_names[layout_idx] == layout_string)
|
||||
{
|
||||
layout = (KEYBOARD_LAYOUT)layout_idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(debug_settings.contains("size"))
|
||||
{
|
||||
size = debug_settings["size"];
|
||||
@@ -458,8 +519,6 @@ void RGBController_Debug::SetupZones()
|
||||
|
||||
KeyboardLayoutManager new_kb(layout, size);
|
||||
|
||||
description += ", Layout: " + layout_names[layout] + ", Size: " + new_kb.GetName();
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Check for custom key inserts and swaps |
|
||||
\*---------------------------------------------*/
|
||||
@@ -518,25 +577,12 @@ void RGBController_Debug::SetupZones()
|
||||
new_kb.ChangeKeys(change);
|
||||
}
|
||||
|
||||
zone keyboard_zone;
|
||||
zones[zone_idx].leds_min = new_kb.GetKeyCount();
|
||||
zones[zone_idx].leds_max = new_kb.GetKeyCount();
|
||||
zones[zone_idx].leds_count = new_kb.GetKeyCount();
|
||||
zones[zone_idx].matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
|
||||
keyboard_zone.name = "Keyboard Zone";
|
||||
keyboard_zone.type = ZONE_TYPE_MATRIX;
|
||||
keyboard_zone.leds_min = new_kb.GetKeyCount();
|
||||
keyboard_zone.leds_max = new_kb.GetKeyCount();
|
||||
keyboard_zone.leds_count = new_kb.GetKeyCount();
|
||||
keyboard_zone.matrix_map = new_kb.GetKeyMap(KEYBOARD_MAP_FILL_TYPE_COUNT);
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
zones.push_back(keyboard_zone);
|
||||
}
|
||||
else
|
||||
{
|
||||
zones[zone_idx] = keyboard_zone;
|
||||
}
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < keyboard_zone.leds_count; led_idx++)
|
||||
for(unsigned int led_idx = 0; led_idx < zones[zone_idx].leds_count; led_idx++)
|
||||
{
|
||||
led keyboard_led;
|
||||
|
||||
@@ -547,6 +593,28 @@ void RGBController_Debug::SetupZones()
|
||||
led_alt_names.push_back(new_kb.GetKeyAltNameAt(led_idx));
|
||||
}
|
||||
|
||||
if(first_run)
|
||||
{
|
||||
/*-----------------------------------------*\
|
||||
| Create test configuration |
|
||||
\*-----------------------------------------*/
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["title"] = "Layout";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["type"] = "string";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][0] = "Default",
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][1] = "ANSI QWERTY";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][2] = "ISO QWERTY";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][3] = "ISO QWERTZ";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][4] = "ISO AZERTY";
|
||||
configuration_json["zones"][zone_idx]["schema"]["layout"]["enum"][5] = "JIS";
|
||||
}
|
||||
|
||||
if((zones[zone_idx].flags & ZONE_FLAG_MANUALLY_CONFIGURED_DEVICE_SPECIFIC) == 0)
|
||||
{
|
||||
configuration_json["zones"][zone_idx]["configuration"]["layout"] = "Default";
|
||||
}
|
||||
|
||||
configuration = configuration_json.dump();
|
||||
|
||||
zone_idx++;
|
||||
}
|
||||
|
||||
@@ -674,3 +742,13 @@ void RGBController_Debug::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_Debug::DeviceUpdateDeviceSpecificConfiguration()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_Debug::DeviceUpdateDeviceSpecificZoneConfiguration(int zone)
|
||||
{
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@ public:
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
void DeviceUpdateDeviceSpecificConfiguration();
|
||||
void DeviceUpdateDeviceSpecificZoneConfiguration(int zone);
|
||||
|
||||
private:
|
||||
json debug_settings;
|
||||
bool custom_controller;
|
||||
|
||||
@@ -235,8 +235,7 @@ void RGBController_E131::SetupZones()
|
||||
led_zone.leds_count = devices[zone_idx].num_leds;
|
||||
led_zone.flags = ZONE_FLAG_MANUALLY_CONFIGURABLE_TYPE
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_MATRIX_MAP
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_SEGMENTS
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_COLOR_ORDER;
|
||||
| ZONE_FLAG_MANUALLY_CONFIGURABLE_SEGMENTS;
|
||||
|
||||
zones.push_back(led_zone);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ ENESMBusController::ENESMBusController(ENESMBusInterface* interface, ene_dev_id
|
||||
| If this is running with TRACE or higher loglevel |
|
||||
| then dump the entire Feature list to log |
|
||||
\*-------------------------------------------------*/
|
||||
if(LogManager::get()->getLoglevel() >= LL_TRACE)
|
||||
if(LogManager::get()->GetLogLevel() >= LL_TRACE)
|
||||
{
|
||||
LOG_TRACE("[ENE SMBus] ENE config table for 0x%02X:", dev);
|
||||
LOG_TRACE(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X", config_table[0], config_table[1], config_table[2], config_table[3],
|
||||
|
||||
@@ -154,7 +154,7 @@ DetectedControllers DetectENESMBusDRAMControllers(std::vector<i2c_smbus_interfac
|
||||
{
|
||||
int address_list_idx = -1;
|
||||
|
||||
IF_DRAM_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_DRAM_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
LOG_DEBUG("[ENE SMBus DRAM] Remapping ENE SMBus RAM modules on 0x77");
|
||||
|
||||
@@ -220,9 +220,9 @@ DetectedControllers DetectENESMBusMotherboardControllers(std::vector<i2c_smbus_i
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
// Add ENE (ASUS Aura) motherboard controllers
|
||||
IF_MOBO_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(buses[bus]->pci_subsystem_vendor == ASUS_SUB_VEN || buses[bus]->pci_subsystem_vendor == 0 || buses[bus]->pci_subsystem_vendor == 0xFFFF)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == ASUS_SUB_VEN || buses[bus]->info.pci_subsystem_vendor == 0 || buses[bus]->info.pci_subsystem_vendor == 0xFFFF)
|
||||
{
|
||||
for(unsigned int address_list_idx = 0; address_list_idx < AURA_MOBO_ADDRESS_COUNT; address_list_idx++)
|
||||
{
|
||||
@@ -302,6 +302,7 @@ REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 3060 Ti Gaming OC",
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3060 Ti OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3060TI_O8G_OC, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 3060 Ti OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_3060TI_O8G_OC_V2, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3060 Ti V2 OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3060TI_O8G_V2_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3060 Ti V2 OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3060TI_LHR_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3060TI_O8G_V2_2_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3070 OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3070_OC, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3070 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3070_O8G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 3070 White OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX3070_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_3070_O8G_WHITE, 0x67);
|
||||
@@ -409,7 +410,8 @@ REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 4090 Gaming White",
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 4090 Gaming White OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_4090_O24G_GAMING_WHITE, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 4090 Gaming White OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_4090_O24G_GAMING_WHITE_2, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG MATRIX PLATINUM GeForce RTX 4090", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, ASUS_SUB_VEN, ASUS_ROG_MATRIX_PLATINUM_RTX_4090_24G, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5070 Gaming", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5070_O12G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5060 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5060_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5060_O8G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5070 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5070_O12G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5070 Ti Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5070TI_O16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS ROG STRIX GeForce RTX 5070 Ti Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, ASUS_SUB_VEN, ASUS_ROG_STRIX_RTX_5070TI_O16G_GAMING_OC, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF GeForce RTX 5080 Gaming OC", DetectENESMBusGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, ASUS_SUB_VEN, ASUS_TUF_RTX_5080_O16G_GAMING, 0x67);
|
||||
@@ -448,6 +450,7 @@ REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7700 XT Gaming OC",
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7800 XT Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI32_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7800XT_O16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7800 XT Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI32_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7800XT_O16G_GAMING_0606, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7800 XT Gaming White OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI32_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7800XT_O16G_WHITE_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7900 GRE Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI31_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7900GRE_O16G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7900 XT Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI31_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7900XT_020G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 7900 XTX Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI31_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_7900XTX_O24G_GAMING, 0x67);
|
||||
REGISTER_I2C_PCI_DETECTOR("ASUS TUF Radeon RX 9070 Gaming OC", DetectENESMBusGPUControllers, AMD_GPU_VEN, AMD_NAVI48_DEV, ASUS_SUB_VEN, ASUS_TUF_RX_9070_016G_GAMING, 0x67);
|
||||
|
||||
@@ -28,7 +28,7 @@ ene_interface_type ENESMBusInterface_i2c_smbus::GetInterfaceType()
|
||||
|
||||
std::string ENESMBusInterface_i2c_smbus::GetLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
return("I2C: " + return_string);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ DetectedControllers DetectEVGAAmpereGPUControllers(i2c_smbus_interface* bus, uin
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
EVGAGPUv3Controller* controller;
|
||||
RGBController_EVGAGPUv3* rgb_controller;
|
||||
|
||||
@@ -26,7 +26,7 @@ EVGAGPUv3Controller::~EVGAGPUv3Controller()
|
||||
|
||||
std::string EVGAGPUv3Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
|
||||
@@ -25,7 +25,7 @@ EVGAGP102Controller::~EVGAGP102Controller()
|
||||
|
||||
std::string EVGAGP102Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", zi.dev_addr);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -21,7 +21,7 @@ DetectedControllers DetectEVGAGP102GPUControllers(i2c_smbus_interface* bus, uint
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
std::vector<EVGAGP102Controller*> controllers;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ EVGAGPUv1Controller::~EVGAGPUv1Controller()
|
||||
|
||||
std::string EVGAGPUv1Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -20,7 +20,7 @@ DetectedControllers DetectEVGAPascalGPUControllers(i2c_smbus_interface* bus, uin
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
EVGAGPUv1Controller* controller = new EVGAGPUv1Controller(bus, address, name);
|
||||
RGBController_EVGAGPUv1* rgb_controller = new RGBController_EVGAGPUv1(controller);
|
||||
|
||||
@@ -32,7 +32,7 @@ EVGAACX30SMBusController::~EVGAACX30SMBusController()
|
||||
|
||||
std::string EVGAACX30SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -46,9 +46,9 @@ DetectedControllers DetectAcx30SMBusControllers(std::vector<i2c_smbus_interface
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_MOBO_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(buses[bus]->pci_subsystem_vendor == EVGA_SUB_VEN)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == EVGA_SUB_VEN)
|
||||
{
|
||||
LOG_DEBUG(SMBUS_CHECK_DEVICE_MESSAGE_EN, EVGA_DETECTOR_NAME, bus, VENDOR_NAME, SMBUS_ADDRESS);
|
||||
// Check for ACX 30 controller at 0x28
|
||||
|
||||
@@ -25,7 +25,7 @@ EVGAGPUv2Controller::~EVGAGPUv2Controller()
|
||||
|
||||
std::string EVGAGPUv2Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
|
||||
@@ -19,7 +19,7 @@ DetectedControllers DetectEVGATuringGPUControllers(i2c_smbus_interface* bus, uin
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
EVGAGPUv2Controller* controller = new EVGAGPUv2Controller(bus, address, name);
|
||||
RGBController_EVGAGPUv2* rgb_controller = new RGBController_EVGAGPUv2(controller);
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#include "ElgatoLightStripController.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "ElgatoLightStripController.h"
|
||||
#include "JsonUtils.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
@@ -58,7 +59,8 @@ ElgatoLightStripController::ElgatoLightStripController(std::string ip)
|
||||
}
|
||||
|
||||
std::string result = recv_list[5];
|
||||
json elgato_lightstrip_data = json::parse(result);
|
||||
json elgato_lightstrip_data;
|
||||
JsonUtils::JsonParse(result, elgato_lightstrip_data);
|
||||
|
||||
firmware_version = elgato_lightstrip_data["firmwareVersion"];
|
||||
serialnumber = elgato_lightstrip_data["serialNumber"];
|
||||
|
||||
@@ -44,7 +44,7 @@ FnaticStreakController::~FnaticStreakController()
|
||||
|
||||
std::string FnaticStreakController::GetDeviceLocation()
|
||||
{
|
||||
return("HID " + location);
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string FnaticStreakController::GetNameString()
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ GainwardGPUv1Controller::~GainwardGPUv1Controller()
|
||||
|
||||
std::string GainwardGPUv1Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ GainwardGPUv2Controller::~GainwardGPUv2Controller() = default;
|
||||
|
||||
std::string GainwardGPUv2Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -26,7 +26,7 @@ GalaxGPUv1Controller::~GalaxGPUv1Controller()
|
||||
|
||||
std::string GalaxGPUv1Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -26,7 +26,7 @@ GalaxGPUv2Controller::~GalaxGPUv2Controller()
|
||||
|
||||
std::string GalaxGPUv2Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ RGBFusion2BlackwellGPUController::~RGBFusion2BlackwellGPUController()
|
||||
|
||||
std::string RGBFusion2BlackwellGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
|
||||
bool TestForGigabyteRGBFusion2BlackwellGPUController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
if(bus->pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
if(bus->info.pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ unsigned int RGBFusion2DRAMController::GetLEDCount()
|
||||
|
||||
std::string RGBFusion2DRAMController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ DetectedControllers DetectGigabyteRGBFusion2DRAMControllers(std::vector<i2c_smbu
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_DRAM_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_DRAM_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
// Check for RGB Fusion 2 DRAM controller at 0x67
|
||||
if(TestForGigabyteRGBFusion2DRAMController(buses[bus], 0x67))
|
||||
|
||||
@@ -28,7 +28,7 @@ RGBFusion2GPUController::~RGBFusion2GPUController()
|
||||
|
||||
std::string RGBFusion2GPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
|
||||
bool TestForGigabyteRGBFusion2GPUController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
if(bus->pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
if(bus->info.pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ std::string RGBFusion2SMBusController::GetDeviceName()
|
||||
|
||||
std::string RGBFusion2SMBusController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+3
-3
@@ -114,16 +114,16 @@ DetectedControllers DetectGigabyteRGBFusion2SMBusControllers(std::vector<i2c_smb
|
||||
LOG_DEBUG(GIGABYTE_FOUND_MB_MESSAGE_EN, DETECTOR_NAME, dmi.getMainboard().c_str());
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_MOBO_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(buses[bus]->pci_subsystem_vendor == GIGABYTE_SUB_VEN)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == GIGABYTE_SUB_VEN)
|
||||
{
|
||||
/*-------------------------------------*\
|
||||
| TODO - Is this necessary? Or an |
|
||||
| artifact of my own system? Skip dmcd |
|
||||
| devices |
|
||||
\*-------------------------------------*/
|
||||
std::string device_name = std::string(buses[bus]->device_name);
|
||||
std::string device_name = std::string(buses[bus]->info.device_name);
|
||||
|
||||
if(device_name.find("dmdc") == std::string::npos)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ std::string RGBFusionController::GetDeviceName()
|
||||
|
||||
std::string RGBFusionController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -49,9 +49,9 @@ DetectedControllers DetectGigabyteRGBFusionControllers(std::vector<i2c_smbus_int
|
||||
|
||||
for(unsigned int bus = 0; bus < buses.size(); bus++)
|
||||
{
|
||||
IF_MOBO_SMBUS(buses[bus]->pci_vendor, buses[bus]->pci_device)
|
||||
IF_MOBO_SMBUS(buses[bus]->info.pci_vendor, buses[bus]->info.pci_device)
|
||||
{
|
||||
if(buses[bus]->pci_subsystem_vendor == GIGABYTE_SUB_VEN)
|
||||
if(buses[bus]->info.pci_subsystem_vendor == GIGABYTE_SUB_VEN)
|
||||
{
|
||||
LOG_DEBUG(SMBUS_CHECK_DEVICE_MESSAGE_EN, DETECTOR_NAME, bus, VENDOR_NAME, SMBUS_ADDRESS);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ RGBFusionGPUController::~RGBFusionGPUController()
|
||||
|
||||
std::string RGBFusionGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -98,6 +98,7 @@ DetectedControllers DetectGigabyteRGBFusionGPUControllers(i2c_smbus_interface* b
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_I2C_PCI_DETECTOR("Gigabyte GTX 1050 G1 Gaming", DetectGigabyteRGBFusionGPUControllers, NVIDIA_VEN, NVIDIA_GTX1050_DEV, GIGABYTE_SUB_VEN, GIGABYTE_GTX1050_G1_GAMING_SUB_DEV, 0x47);
|
||||
REGISTER_I2C_PCI_DETECTOR("Gigabyte GeForce GTX 1050 Ti G1 Gaming Rev A1", DetectGigabyteRGBFusionGPUControllers, NVIDIA_VEN, NVIDIA_GTX1050TI_DEV, GIGABYTE_SUB_VEN, GIGABYTE_GTX1050TI_G1_GAMING_SUB_DEV, 0x47);
|
||||
REGISTER_I2C_PCI_DETECTOR("Gigabyte GeForce GTX 1050 Ti G1 Gaming", DetectGigabyteRGBFusionGPUControllers, NVIDIA_VEN, NVIDIA_GTX1050TI_DEV, GIGABYTE_SUB_VEN, GIGABYTE_GTX1050TI_G1_GAMING_SUB_DEV, 0x48);
|
||||
REGISTER_I2C_PCI_DETECTOR("Gigabyte GeForce GTX 1060 G1 Gaming", DetectGigabyteRGBFusionGPUControllers, NVIDIA_VEN, NVIDIA_GTX1060_DEV, GIGABYTE_SUB_VEN, GIGABYTE_GTX1060_G1_GAMING_SUB_DEV, 0x48);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "base64.hpp"
|
||||
#include "GoveeController.h"
|
||||
#include "JsonUtils.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
using namespace std::chrono_literals;
|
||||
@@ -106,7 +107,8 @@ void GoveeController::ReceiveBroadcast(char* recv_buf, int size)
|
||||
/*-----------------------------------------------------*\
|
||||
| Convert null-terminated response to JSON |
|
||||
\*-----------------------------------------------------*/
|
||||
json response = json::parse(recv_buf);
|
||||
json response;
|
||||
JsonUtils::JsonParse(recv_buf, response);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Check if the response contains the method name |
|
||||
|
||||
@@ -40,7 +40,7 @@ HyperXDRAMController::~HyperXDRAMController()
|
||||
|
||||
std::string HyperXDRAMController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -55,7 +55,7 @@ DetectedControllers DetectHyperXDRAMControllers(i2c_smbus_interface* bus, std::v
|
||||
unsigned char slots_valid = 0x00;
|
||||
|
||||
// Check for HyperX controller at 0x27
|
||||
LOG_DEBUG("[%s] Testing bus %d at address 0x27", HYPERX_CONTROLLER_NAME, bus->port_id);
|
||||
LOG_DEBUG("[%s] Testing bus %d at address 0x27", HYPERX_CONTROLLER_NAME, bus->info.port_id);
|
||||
|
||||
if(TestForHyperXDRAMController(bus, 0x27))
|
||||
{
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
#include "HyperXAlloyOriginsController.h"
|
||||
#include "HyperXAlloyOriginsCoreController.h"
|
||||
#include "HyperXAlloyOrigins60and65Controller.h"
|
||||
#include "HyperXOrigins2_65Controller.h"
|
||||
#include "RGBController_HyperXAlloyElite.h"
|
||||
#include "RGBController_HyperXAlloyElite2.h"
|
||||
#include "RGBController_HyperXAlloyFPS.h"
|
||||
#include "RGBController_HyperXAlloyOrigins.h"
|
||||
#include "RGBController_HyperXAlloyOriginsCore.h"
|
||||
#include "RGBController_HyperXAlloyOrigins60and65.h"
|
||||
#include "RGBController_HyperXOrigins2_65.h"
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| HyperX keyboard vendor and product IDs |
|
||||
@@ -44,6 +46,7 @@
|
||||
#define HYPERX_ALLOY_ORIGINS_65_HP_PID 0x038F
|
||||
#define HYPERX_ALLOY_ORIGINS_CORE_HP_PID 0x098F
|
||||
#define HYPERX_ALLOY_ORIGINS_HP_PID 0x0591
|
||||
#define HYPERX_ORIGINS_2_65_HP_PID 0x0CC2
|
||||
|
||||
AlloyOrigins60and65MappingLayoutType GetAlloyOrigins60and65MappingLayoutType(int pid)
|
||||
{
|
||||
@@ -170,12 +173,32 @@ DetectedControllers DetectHyperXAlloyOrigins60and65(hid_device_info* info, const
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
DetectedControllers DetectHyperXOrigins2_65(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
hid_device* dev;
|
||||
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
HyperXOrigins2_65Controller* controller = new HyperXOrigins2_65Controller(dev, info->path, name);
|
||||
RGBController_HyperXOrigins2_65* rgb_controller = new RGBController_HyperXOrigins2_65(controller);
|
||||
|
||||
detected_controllers.push_back(rgb_controller);
|
||||
}
|
||||
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_HID_DETECTOR_IP("HyperX Alloy Elite RGB", DetectHyperXAlloyElite, HYPERX_KEYBOARD_VID, HYPERX_ALLOY_ELITE_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_IP("HyperX Alloy FPS RGB", DetectHyperXAlloyFPS, HYPERX_KEYBOARD_VID, HYPERX_ALLOY_FPS_RGB_PID, 2, 0xFF01);
|
||||
REGISTER_HID_DETECTOR_I("HyperX Alloy Origins Core", DetectHyperXAlloyOriginsCore, HYPERX_KEYBOARD_VID, HYPERX_ALLOY_ORIGINS_CORE_PID, 2);
|
||||
|
||||
REGISTER_HID_DETECTOR_I("HyperX Alloy Origins Core (HP)", DetectHyperXAlloyOriginsCore, HP_KEYBOARD_VID, HYPERX_ALLOY_ORIGINS_CORE_HP_PID, 2);
|
||||
|
||||
REGISTER_HID_DETECTOR_I("HyperX Origins 2 65 (HP)", DetectHyperXOrigins2_65, HP_KEYBOARD_VID, HYPERX_ORIGINS_2_65_HP_PID, 3);
|
||||
|
||||
#ifdef _WIN32
|
||||
REGISTER_HID_DETECTOR_I("HyperX Alloy Origins", DetectHyperXAlloyOrigins, HYPERX_KEYBOARD_VID, HYPERX_ALLOY_ORIGINS_PID, 3);
|
||||
REGISTER_HID_DETECTOR_IP("HyperX Alloy Elite 2", DetectHyperXAlloyElite2, HYPERX_KEYBOARD_VID, HYPERX_ALLOY_ELITE_2_PID, 3, 0xFF90);
|
||||
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| HyperXOrigins2_65Controller.cpp |
|
||||
| |
|
||||
| Driver for HyperX Origins 2 65 keyboard |
|
||||
| |
|
||||
| Ricardo Amorim 28 Mar 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstring>
|
||||
#include "HyperXOrigins2_65Controller.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
HyperXOrigins2_65Controller::HyperXOrigins2_65Controller(hid_device* dev_handle, const char* path, std::string dev_name)
|
||||
{
|
||||
dev = dev_handle;
|
||||
location = path;
|
||||
name = dev_name;
|
||||
}
|
||||
|
||||
HyperXOrigins2_65Controller::~HyperXOrigins2_65Controller()
|
||||
{
|
||||
hid_close(dev);
|
||||
}
|
||||
|
||||
std::string HyperXOrigins2_65Controller::GetDeviceLocation()
|
||||
{
|
||||
return("HID: " + location);
|
||||
}
|
||||
|
||||
std::string HyperXOrigins2_65Controller::GetNameString()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
std::string HyperXOrigins2_65Controller::GetSerialString()
|
||||
{
|
||||
wchar_t serial_string[128];
|
||||
int ret = hid_get_serial_number_string(dev, serial_string, 128);
|
||||
|
||||
if(ret != 0)
|
||||
{
|
||||
return ("");
|
||||
}
|
||||
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void HyperXOrigins2_65Controller::SetLEDsDirect(std::vector<RGBColor> colors)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up variables to track progress of color transmit |
|
||||
| Do this after inserting blanks |
|
||||
\*-----------------------------------------------------*/
|
||||
int colors_to_send = (int)colors.size();
|
||||
int colors_sent = 0;
|
||||
|
||||
SendDirectInitialization();
|
||||
|
||||
for(int pkt_idx = 0; pkt_idx < 4; pkt_idx++)
|
||||
{
|
||||
if(colors_to_send > 20)
|
||||
{
|
||||
SendDirectColorPacket(&colors[colors_sent], 20, pkt_idx);
|
||||
colors_sent += 20;
|
||||
colors_to_send -= 20;
|
||||
}
|
||||
else if(colors_to_send > 0)
|
||||
{
|
||||
SendDirectColorPacket(&colors[colors_sent], colors_to_send, pkt_idx);
|
||||
colors_sent += colors_to_send;
|
||||
colors_to_send -= colors_to_send;
|
||||
}
|
||||
else
|
||||
{
|
||||
RGBColor temp = 0x00000000;
|
||||
SendDirectColorPacket(&temp, 1, pkt_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HyperXOrigins2_65Controller::SendDirectInitialization()
|
||||
{
|
||||
unsigned char buf[65];
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Zero out buffer |
|
||||
\*-----------------------------------------------------*/
|
||||
memset(buf, 0x00, sizeof(buf));
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up Direct Initialization packet |
|
||||
\*-----------------------------------------------------*/
|
||||
buf[0x00] = 0x44;
|
||||
buf[0x01] = 0x01;
|
||||
buf[0x02] = 0x04;
|
||||
buf[0x03] = 0x00;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, buf, 65);
|
||||
}
|
||||
|
||||
void HyperXOrigins2_65Controller::SendDirectColorPacket
|
||||
(
|
||||
RGBColor* color_data,
|
||||
unsigned int color_count,
|
||||
unsigned int seq
|
||||
)
|
||||
{
|
||||
unsigned char buf[65];
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Zero out buffer |
|
||||
\*-----------------------------------------------------*/
|
||||
memset(buf, 0x00, sizeof(buf));
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Set up Direct Initialization packet |
|
||||
\*-----------------------------------------------------*/
|
||||
buf[0x00] = 0x44;
|
||||
buf[0x01] = 0x02;
|
||||
buf[0x02] = (unsigned char)seq;
|
||||
buf[0x03] = 0x00;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| The maximum number of colors per packet is 20 |
|
||||
\*-----------------------------------------------------*/
|
||||
if(color_count > 20)
|
||||
{
|
||||
color_count = 20;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Copy in color data |
|
||||
\*-----------------------------------------------------*/
|
||||
for(unsigned int color_idx = 0; color_idx < color_count; color_idx++)
|
||||
{
|
||||
buf[4 + (color_idx * 3)] = RGBGetRValue(color_data[color_idx]);
|
||||
buf[4 + (color_idx * 3) + 1] = RGBGetGValue(color_data[color_idx]);
|
||||
buf[4 + (color_idx * 3) + 2] = RGBGetBValue(color_data[color_idx]);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, buf, 65);
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| HyperXOrigins2_65Controller.h |
|
||||
| |
|
||||
| Driver for HyperX Origins 2 65 keyboard |
|
||||
| |
|
||||
| Ricardo Amorim 28 Mar 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <hidapi.h>
|
||||
#include "RGBController.h"
|
||||
|
||||
class HyperXOrigins2_65Controller
|
||||
{
|
||||
public:
|
||||
HyperXOrigins2_65Controller(hid_device* dev_handle, const char* path, std::string dev_name);
|
||||
~HyperXOrigins2_65Controller();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetNameString();
|
||||
std::string GetSerialString();
|
||||
|
||||
void SetLEDsDirect(std::vector<RGBColor> colors);
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
std::string location;
|
||||
std::string name;
|
||||
|
||||
void SendDirectInitialization();
|
||||
void SendDirectColorPacket
|
||||
(
|
||||
RGBColor* color_data,
|
||||
unsigned int color_count,
|
||||
unsigned int seq
|
||||
);
|
||||
};
|
||||
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_HyperXOrigins2_65.cpp |
|
||||
| |
|
||||
| RGBController for HyperX Origins 2 65 keyboard |
|
||||
| |
|
||||
| Ricardo Amorim 28 Mar 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBControllerKeyNames.h"
|
||||
#include "RGBController_HyperXOrigins2_65.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
//0xFFFFFFFF indicates an unused entry in matrix
|
||||
#define NA 0xFFFFFFFF
|
||||
|
||||
static unsigned int matrix_map[5][15] =
|
||||
{ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
||||
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, NA, 29 },
|
||||
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 },
|
||||
{ 45, 61, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59 },
|
||||
{ 60, 62, 63, 65, NA, NA, 66, NA, NA, 68, 69, 70, 71, 72, 73 } };
|
||||
|
||||
static const char* zone_names[] =
|
||||
{
|
||||
ZONE_EN_KEYBOARD,
|
||||
};
|
||||
|
||||
static zone_type zone_types[] =
|
||||
{
|
||||
ZONE_TYPE_MATRIX,
|
||||
};
|
||||
|
||||
static const unsigned int zone_sizes[] =
|
||||
{
|
||||
74,
|
||||
};
|
||||
|
||||
static const char *led_names[] =
|
||||
{
|
||||
KEY_EN_ESCAPE,
|
||||
KEY_EN_1,
|
||||
KEY_EN_2,
|
||||
KEY_EN_3,
|
||||
KEY_EN_4,
|
||||
KEY_EN_5,
|
||||
KEY_EN_6,
|
||||
KEY_EN_7,
|
||||
KEY_EN_8,
|
||||
KEY_EN_9,
|
||||
KEY_EN_0,
|
||||
KEY_EN_MINUS,
|
||||
KEY_EN_EQUALS,
|
||||
KEY_EN_BACKSPACE,
|
||||
KEY_EN_DELETE,
|
||||
KEY_EN_TAB,
|
||||
KEY_EN_Q,
|
||||
KEY_EN_W,
|
||||
KEY_EN_E,
|
||||
KEY_EN_R,
|
||||
KEY_EN_T,
|
||||
KEY_EN_Y,
|
||||
KEY_EN_U,
|
||||
KEY_EN_I,
|
||||
KEY_EN_O,
|
||||
KEY_EN_P,
|
||||
KEY_EN_LEFT_BRACKET,
|
||||
KEY_EN_RIGHT_BRACKET,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_HOME,
|
||||
KEY_EN_CAPS_LOCK,
|
||||
KEY_EN_A,
|
||||
KEY_EN_S,
|
||||
KEY_EN_D,
|
||||
KEY_EN_F,
|
||||
KEY_EN_G,
|
||||
KEY_EN_H,
|
||||
KEY_EN_J,
|
||||
KEY_EN_K,
|
||||
KEY_EN_L,
|
||||
KEY_EN_SEMICOLON,
|
||||
KEY_EN_QUOTE,
|
||||
KEY_EN_POUND,
|
||||
KEY_EN_ISO_ENTER,
|
||||
KEY_EN_PAGE_UP,
|
||||
KEY_EN_LEFT_SHIFT,
|
||||
KEY_EN_Z,
|
||||
KEY_EN_X,
|
||||
KEY_EN_C,
|
||||
KEY_EN_V,
|
||||
KEY_EN_B,
|
||||
KEY_EN_N,
|
||||
KEY_EN_M,
|
||||
KEY_EN_COMMA,
|
||||
KEY_EN_PERIOD,
|
||||
KEY_EN_FORWARD_SLASH,
|
||||
KEY_EN_RIGHT_SHIFT,
|
||||
KEY_EN_UP_ARROW,
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_PAGE_DOWN,
|
||||
KEY_EN_LEFT_CONTROL,
|
||||
KEY_EN_ISO_BACK_SLASH,
|
||||
KEY_EN_LEFT_WINDOWS,
|
||||
KEY_EN_LEFT_ALT,
|
||||
KEY_EN_UNUSED,
|
||||
"Left Space",
|
||||
KEY_EN_SPACE,
|
||||
"Right Space",
|
||||
KEY_EN_UNUSED,
|
||||
KEY_EN_RIGHT_ALT,
|
||||
KEY_EN_RIGHT_FUNCTION,
|
||||
KEY_EN_LEFT_ARROW,
|
||||
KEY_EN_DOWN_ARROW,
|
||||
KEY_EN_RIGHT_ARROW
|
||||
};
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name HyperX Origins 2 65
|
||||
@category Keyboard
|
||||
@type USB
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectHyperXOrigins2_65
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_HyperXOrigins2_65::RGBController_HyperXOrigins2_65(HyperXOrigins2_65Controller* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetNameString();
|
||||
vendor = "HyperX";
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
location = controller->GetDeviceLocation();
|
||||
serial = controller->GetSerialString();
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = 0xFFFF;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
|
||||
keepalive_thread_run = 1;
|
||||
keepalive_thread = new std::thread(&RGBController_HyperXOrigins2_65::KeepaliveThread, this);
|
||||
}
|
||||
|
||||
RGBController_HyperXOrigins2_65::~RGBController_HyperXOrigins2_65()
|
||||
{
|
||||
Shutdown();
|
||||
|
||||
keepalive_thread_run = 0;
|
||||
keepalive_thread->join();
|
||||
delete keepalive_thread;
|
||||
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_HyperXOrigins2_65::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Set up zones |
|
||||
\*---------------------------------------------------------*/
|
||||
unsigned int total_led_count = 0;
|
||||
for(unsigned int zone_idx = 0; zone_idx < 1; zone_idx++)
|
||||
{
|
||||
zone new_zone;
|
||||
new_zone.name = zone_names[zone_idx];
|
||||
new_zone.type = zone_types[zone_idx];
|
||||
new_zone.leds_min = zone_sizes[zone_idx];
|
||||
new_zone.leds_max = zone_sizes[zone_idx];
|
||||
new_zone.leds_count = zone_sizes[zone_idx];
|
||||
|
||||
if(zone_types[zone_idx] == ZONE_TYPE_MATRIX)
|
||||
{
|
||||
new_zone.matrix_map.Set(5, 15, (unsigned int *)&matrix_map);
|
||||
}
|
||||
|
||||
zones.push_back(new_zone);
|
||||
|
||||
total_led_count += zone_sizes[zone_idx];
|
||||
}
|
||||
|
||||
for(unsigned int led_idx = 0; led_idx < total_led_count; led_idx++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = led_names[led_idx];
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_HyperXOrigins2_65::DeviceUpdateLEDs()
|
||||
{
|
||||
controller->SetLEDsDirect(colors);
|
||||
}
|
||||
|
||||
void RGBController_HyperXOrigins2_65::DeviceUpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_HyperXOrigins2_65::DeviceUpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_HyperXOrigins2_65::DeviceUpdateMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void RGBController_HyperXOrigins2_65::KeepaliveThread()
|
||||
{
|
||||
while(keepalive_thread_run.load())
|
||||
{
|
||||
if(active_mode == 0)
|
||||
{
|
||||
if((std::chrono::steady_clock::now() - last_update_time) > std::chrono::milliseconds(50))
|
||||
{
|
||||
UpdateLEDs();
|
||||
}
|
||||
}
|
||||
std::this_thread::sleep_for(10ms);;
|
||||
}
|
||||
}
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_HyperXOrigins2_65.h |
|
||||
| |
|
||||
| RGBController for HyperX Origins 2 65 keyboard |
|
||||
| |
|
||||
| Ricardo Amorim 28 Mar 2026 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include "RGBController.h"
|
||||
#include "HyperXOrigins2_65Controller.h"
|
||||
|
||||
class RGBController_HyperXOrigins2_65 : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_HyperXOrigins2_65(HyperXOrigins2_65Controller* controller_ptr);
|
||||
~RGBController_HyperXOrigins2_65();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void DeviceUpdateZoneLEDs(int zone);
|
||||
void DeviceUpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
void KeepaliveThread();
|
||||
|
||||
private:
|
||||
HyperXOrigins2_65Controller* controller;
|
||||
std::thread* keepalive_thread;
|
||||
std::atomic<bool> keepalive_thread_run;
|
||||
std::chrono::time_point<std::chrono::steady_clock> last_update_time;
|
||||
};
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <cstdint>
|
||||
#include "KasaSmartController.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "JsonUtils.h"
|
||||
#include "KasaSmartController.h"
|
||||
#include "hsv.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
@@ -64,11 +65,7 @@ bool KasaSmartController::Initialize()
|
||||
}
|
||||
|
||||
json system_information;
|
||||
try
|
||||
{
|
||||
system_information = json::parse(system_info_json);
|
||||
}
|
||||
catch (json::parse_error&)
|
||||
if(!JsonUtils::JsonParse(system_info_json, system_information))
|
||||
{
|
||||
/*-----------------------*\
|
||||
| Can't parse system info |
|
||||
|
||||
@@ -28,7 +28,7 @@ KingstonFuryDRAMController::KingstonFuryDRAMController(i2c_smbus_interface* bus,
|
||||
|
||||
std::string KingstonFuryDRAMController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
return_string.append(", addresses [");
|
||||
for(std::size_t idx = 0; idx < slots.size(); idx++)
|
||||
{
|
||||
|
||||
@@ -104,7 +104,7 @@ void LEDStripController::InitializeI2C(char* i2cname)
|
||||
{
|
||||
for(unsigned int i2c_idx = 0; i2c_idx < ResourceManager::get()->GetI2CBuses().size(); i2c_idx++)
|
||||
{
|
||||
if(ResourceManager::get()->GetI2CBuses()[i2c_idx]->device_name == std::string(i2cname))
|
||||
if(ResourceManager::get()->GetI2CBuses()[i2c_idx]->info.device_name == std::string(i2cname))
|
||||
{
|
||||
if(i2c_addr < 128)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ std::string LEDStripController::GetLocation()
|
||||
}
|
||||
else if(i2cport != NULL)
|
||||
{
|
||||
return("I2C: " + std::string(i2cport->device_name) + ", Address " + std::to_string(i2c_addr));
|
||||
return("I2C: " + std::string(i2cport->info.device_name) + ", Address " + std::to_string(i2c_addr));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ RGBController_LenovoUSB::RGBController_LenovoUSB(LenovoUSBController* controller
|
||||
type = DEVICE_TYPE_KEYBOARD;
|
||||
vendor = "Lenovo";
|
||||
|
||||
if(LogManager::get()->getLoglevel() >= LL_TRACE)
|
||||
if(LogManager::get()->GetLogLevel() >= LL_TRACE)
|
||||
{
|
||||
DumpControllerInformation();
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ void logitech_device::initialiseDevice()
|
||||
| If this is running with DEBUG or higher loglevel then |
|
||||
| dump the entire Feature list to log |
|
||||
\*-----------------------------------------------------------------*/
|
||||
if(LogManager::get()->getLoglevel() > 4)
|
||||
if(LogManager::get()->GetLogLevel() >= LL_DEBUG)
|
||||
{
|
||||
getDeviceFeatureList(); //This will populate the feature list
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ MSIGPUController::~MSIGPUController()
|
||||
|
||||
std::string MSIGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -18,7 +18,7 @@ DetectedControllers DetectMSIGPUControllers(i2c_smbus_interface* bus, uint8_t i2
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if((bus->pci_vendor != NVIDIA_VEN || bus->port_id == 1) && (bus->pci_vendor != AMD_GPU_VEN || is_amd_gpu_i2c_bus(bus)))
|
||||
if((bus->info.pci_vendor != NVIDIA_VEN || bus->info.port_id == 1) && (bus->info.pci_vendor != AMD_GPU_VEN || is_amd_gpu_i2c_bus(bus)))
|
||||
{
|
||||
MSIGPUController* controller = new MSIGPUController(bus, i2c_addr, name);
|
||||
RGBController_MSIGPU* rgb_controller = new RGBController_MSIGPU(controller);
|
||||
|
||||
@@ -29,7 +29,7 @@ MSIGPUv2Controller::~MSIGPUv2Controller()
|
||||
|
||||
std::string MSIGPUv2Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -19,9 +19,9 @@ DetectedControllers DetectMSIGPUv2Controllers(i2c_smbus_interface* bus, uint8_t
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->pci_vendor != NVIDIA_VEN || bus->port_id == 1)
|
||||
if(bus->info.pci_vendor != NVIDIA_VEN || bus->info.port_id == 1)
|
||||
{
|
||||
int msi_gpu_id = bus->pci_subsystem_device | bus->pci_device << 16;
|
||||
int msi_gpu_id = bus->info.pci_subsystem_device | bus->info.pci_device << 16;
|
||||
MSIGPUv2Controller* controller = new MSIGPUv2Controller(bus, i2c_addr, name);
|
||||
RGBController_MSIGPUv2* rgb_controller = new RGBController_MSIGPUv2(controller, msi_gpu_id);
|
||||
|
||||
@@ -62,11 +62,13 @@ REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 4090 Gaming X Trio",
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 4090 Gaming X Slim", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, MSI_SUB_VEN, MSI_RTX4090_GAMING_X_SLIM_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 4090 Suprim Liquid X", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, MSI_SUB_VEN, MSI_RTX4090_SUPRIM_LIQUID_X_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 4090 Suprim X", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, MSI_SUB_VEN, MSI_RTX4090_SUPRIM_X_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5070 Gaming Trio", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, MSI_SUB_VEN, MSI_RTX5070_GAMING_TRIO_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5070 Ti Gaming Trio OC Plus", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, MSI_SUB_VEN, MSI_RTX5070TI_GAMING_TRIO_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5070 Ti VANGUARD SOC", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, MSI_SUB_VEN, MSI_RTX5070TI_VANGUARD_SOC_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5080 Gaming Trio OC", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, MSI_SUB_VEN, MSI_RTX5080_GAMING_TRIO_OC_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5080 VANGUARD OC SOC", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, MSI_SUB_VEN, MSI_RTX5080_VANGUARD_SOC_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5080 SUPRIM SOC", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, MSI_SUB_VEN, MSI_RTX5080_SUPRIM_SOC_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5080 SUPRIM LIQUID SOC", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, MSI_SUB_VEN, MSI_RTX5080_SUPRIM_LIQUID_SOC_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5090 Gaming Trio OC", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, MSI_SUB_VEN, MSI_RTX5090_GAMING_TRIO_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5090 VANGUARD SOC", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, MSI_SUB_VEN, MSI_RTX5090_VANGUARD_SOC_SUB_DEV, 0x68);
|
||||
REGISTER_I2C_PCI_DETECTOR("MSI GeForce RTX 5090 SUPRIM SOC", DetectMSIGPUv2Controllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, MSI_SUB_VEN, MSI_RTX5090_SUPRIM_SOC_SUB_DEV, 0x68);
|
||||
|
||||
+1
-1
@@ -478,7 +478,7 @@ void RGBController_MSIMysticLight185::GetDeviceConfig()
|
||||
|
||||
if(zones[i].colors != nullptr)
|
||||
{
|
||||
for(size_t j = 0; j < GetLEDsInZone((unsigned int)i); ++j)
|
||||
for(size_t j = 0; j < LEDsInZone((unsigned int)i); ++j)
|
||||
{
|
||||
zones[i].colors[j] = color;
|
||||
}
|
||||
|
||||
+7
-1
@@ -67,7 +67,10 @@ static const std::string board_names[] =
|
||||
"MSI MAG B850 TOMAHAWK MAX WIFI (MS-7E62)",
|
||||
"MSI PRO B850M-P WIFI (MS-7E71)",
|
||||
"MSI MAG Z890 TOMAHAWK WIFI (MS-7E32)",
|
||||
"MSI MPG B850 EDGE TI WIFI (MS-7E62)"
|
||||
"MSI MPG B850 EDGE TI WIFI (MS-7E62)",
|
||||
"MSI PRO B850M-VC WIFI6E (MS-7E71)",
|
||||
"MSI MAG B850 TOMAHAWK WIFI (MS-7E53)",
|
||||
"MSI MEG Z890 UNIFY-X (MS-7E20)",
|
||||
};
|
||||
|
||||
static const mystic_light_761_config board_configs[] =
|
||||
@@ -93,6 +96,9 @@ static const mystic_light_761_config board_configs[] =
|
||||
{ &(board_names[18]), 0, 0, 0, 1, &zone_set1, MSIMysticLight761Controller::DIRECT_MODE_ZONE_BASED }, // MSI PRO B850M-P WIFI (MS-7E71)
|
||||
{ &(board_names[19]), 0, 0, 0, 1, &zone_set1, MSIMysticLight761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MAG Z890 TOMAHAWK WIFI (MS-7E32)
|
||||
{ &(board_names[20]), 0, 0, 0, 1, &zone_set1, MSIMysticLight761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MPG B850 EDGE TI WIFI (MS-7E62)
|
||||
{ &(board_names[21]), 0, 0, 0, 1, &zone_set1, MSIMysticLight761Controller::DIRECT_MODE_ZONE_BASED }, // MSI PRO B850M-VC WIFI6E (MS-7E71)
|
||||
{ &(board_names[22]), 0, 0, 0, 1, &zone_set1, MSIMysticLight761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MAG B850 TOMAHAWK WIFI (MS-7E53)
|
||||
{ &(board_names[23]), 0, 0, 0, 1, &zone_set1, MSIMysticLight761Controller::DIRECT_MODE_ZONE_BASED }, // MSI MEG Z890 UNIFY-X (MS-7E20)
|
||||
};
|
||||
|
||||
enum MSI_ZONE setup_map [] =
|
||||
|
||||
+1
-1
@@ -414,7 +414,7 @@ void RGBController_MSIMysticLight761::GetDeviceConfig()
|
||||
|
||||
if(zones[i].colors != nullptr)
|
||||
{
|
||||
for(size_t j = 0; j < GetLEDsInZone((unsigned int)i); ++j)
|
||||
for(size_t j = 0; j < LEDsInZone((unsigned int)i); ++j)
|
||||
{
|
||||
zones[i].colors[j] = color;
|
||||
}
|
||||
|
||||
@@ -244,6 +244,7 @@ REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E80", DetectMSIMysticLightCont
|
||||
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E81", DetectMSIMysticLightControllers, MSI_USB_VID, 0x7E81, 0x0001, 0x00);
|
||||
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E34", DetectMSIMysticLightControllers, MSI_USB_VID, 0x7E34, 0x0001, 0x00);
|
||||
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E32", DetectMSIMysticLightControllers, MSI_USB_VID, 0x7E32, 0x0001, 0x00);
|
||||
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E20", DetectMSIMysticLightControllers, MSI_USB_VID, 0x7E20, 0x0001, 0x00);
|
||||
// Detector for the set of common boards
|
||||
REGISTER_HID_DETECTOR_PU("MSI Mystic Light Common", DetectMSIMysticLightControllers, MSI_USB_VID_COMMON, MSI_USB_PID_COMMON, 0x0001, 0x00);
|
||||
REGISTER_HID_DETECTOR_PU("MSI Mystic Light X870", DetectMSIMysticLightControllers, MSI_USB_VID_COMMON, MSI_USB_PID_COMMON, 0xFF00, 0x01);
|
||||
|
||||
@@ -30,7 +30,7 @@ ManliGPUController::~ManliGPUController()
|
||||
|
||||
std::string ManliGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "NanoleafController.h"
|
||||
#include "LogManager.h"
|
||||
#include "httplib.h"
|
||||
#include "JsonUtils.h"
|
||||
|
||||
long APIRequest(std::string method, std::string location, std::string URI, json* request_data = nullptr, json* response_data = nullptr)
|
||||
{
|
||||
@@ -91,7 +92,7 @@ long APIRequest(std::string method, std::string location, std::string URI, json*
|
||||
{
|
||||
if(response_data)
|
||||
{
|
||||
*response_data = json::parse(body);
|
||||
JsonUtils::JsonParse(body, *response_data);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -27,7 +27,7 @@ PNYARGBEpicXGPUController::~PNYARGBEpicXGPUController()
|
||||
|
||||
std::string PNYARGBEpicXGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", i2c_addr);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -21,7 +21,7 @@ DetectedControllers DetectPNYARGBEpicXGPUSmallControllers(i2c_smbus_interface* b
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
PNYARGBEpicXGPUController* controller = new PNYARGBEpicXGPUController(bus, i2c_addr, name, false);
|
||||
RGBController_PNYARGBEpicXGPU* rgb_controller = new RGBController_PNYARGBEpicXGPU(controller);
|
||||
@@ -36,7 +36,7 @@ DetectedControllers DetectPNYARGBEpicXGPULargeControllers(i2c_smbus_interface* b
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
PNYARGBEpicXGPUController* controller = new PNYARGBEpicXGPUController(bus, i2c_addr, name, true);
|
||||
RGBController_PNYARGBEpicXGPU* rgb_controller = new RGBController_PNYARGBEpicXGPU(controller);
|
||||
@@ -47,6 +47,7 @@ DetectedControllers DetectPNYARGBEpicXGPULargeControllers(i2c_smbus_interface* b
|
||||
return(detected_controllers);
|
||||
}
|
||||
|
||||
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5060Ti ARGB Epic-X OC", DetectPNYARGBEpicXGPUSmallControllers, NVIDIA_VEN, NVIDIA_RTX5060TI_DEV, PNY_SUB_VEN, PNY_RTX_5060TI_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
|
||||
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5070 ARGB Epic-X OC", DetectPNYARGBEpicXGPUSmallControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, PNY_SUB_VEN, PNY_RTX_5070_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
|
||||
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5070Ti ARGB Epic-X OC", DetectPNYARGBEpicXGPUSmallControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PNY_SUB_VEN, PNY_RTX_5070TI_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
|
||||
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5080 ARGB Epic-X OC", DetectPNYARGBEpicXGPULargeControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, PNY_SUB_VEN, PNY_RTX_5080_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
|
||||
|
||||
@@ -30,7 +30,7 @@ std::string PNYGPUController::GetDeviceName()
|
||||
|
||||
std::string PNYGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -19,7 +19,7 @@ DetectedControllers DetectPNYGPUControllers(i2c_smbus_interface* bus, uint8_t i2
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
PNYGPUController* controller = new PNYGPUController(bus, i2c_addr, name);
|
||||
RGBController_PNYGPU* rgb_controller = new RGBController_PNYGPU(controller);
|
||||
|
||||
@@ -25,7 +25,7 @@ PNYLovelaceGPUController::~PNYLovelaceGPUController()
|
||||
|
||||
std::string PNYLovelaceGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -19,7 +19,7 @@ DetectedControllers DetectPNYLovelaceGPUControllers(i2c_smbus_interface* bus, ui
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
PNYLovelaceGPUController* controller = new PNYLovelaceGPUController(bus, i2c_addr, name);
|
||||
RGBController_PNYLovelaceGPU* rgb_controller = new RGBController_PNYLovelaceGPU(controller);
|
||||
|
||||
@@ -25,7 +25,7 @@ PalitGPUController::~PalitGPUController()
|
||||
|
||||
std::string PalitGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -21,7 +21,7 @@ DetectedControllers DetectPalitGPUControllers(i2c_smbus_interface* bus, uint8_t
|
||||
{
|
||||
DetectedControllers detected_controllers;
|
||||
|
||||
if(bus->port_id == 1)
|
||||
if(bus->info.port_id == 1)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Check for PALIT string |
|
||||
|
||||
@@ -46,7 +46,7 @@ std::string PatriotViperController::GetDeviceName()
|
||||
|
||||
std::string PatriotViperController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -45,7 +45,7 @@ DetectedControllers DetectPatriotViperControllers(i2c_smbus_interface* bus, std:
|
||||
/*-----------------------------------------------------*\
|
||||
| Check for Patriot Viper controller at 0x77 |
|
||||
\*-----------------------------------------------------*/
|
||||
LOG_DEBUG("[%s] Testing bus %d at address 0x77", PATRIOT_CONTROLLER_NAME, bus->port_id);
|
||||
LOG_DEBUG("[%s] Testing bus %d at address 0x77", PATRIOT_CONTROLLER_NAME, bus->info.port_id);
|
||||
|
||||
if(TestForPatriotViperController(bus, 0x77))
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ std::string PatriotViperSteelController::GetDeviceName()
|
||||
|
||||
std::string PatriotViperSteelController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -43,7 +43,7 @@ DetectedControllers DetectPatriotViperSteelControllers(i2c_smbus_interface* bus,
|
||||
/*-----------------------------------------------------*\
|
||||
| Check for Patriot Viper controller at 0x77 |
|
||||
\*-----------------------------------------------------*/
|
||||
LOG_DEBUG("[%s] Testing bus %d at address 0x77", PATRIOT_CONTROLLER_NAME, bus->port_id);
|
||||
LOG_DEBUG("[%s] Testing bus %d at address 0x77", PATRIOT_CONTROLLER_NAME, bus->info.port_id);
|
||||
|
||||
if(TestForPatriotViperSteelController(bus, 0x77))
|
||||
{
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "PhilipsWizController.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "JsonUtils.h"
|
||||
#include "PhilipsWizController.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
using namespace std::chrono_literals;
|
||||
@@ -194,7 +195,8 @@ void PhilipsWizController::ReceiveThreadFunction()
|
||||
/*-----------------------------------------------------------------*\
|
||||
| Convert null-terminated response to JSON |
|
||||
\*-----------------------------------------------------------------*/
|
||||
json response = json::parse(recv_buf);
|
||||
json response;
|
||||
JsonUtils::JsonParse(recv_buf, response);
|
||||
|
||||
/*-----------------------------------------------------------------*\
|
||||
| Check if the response contains the method name |
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ PowerColorRedDevilV1Controller::PowerColorRedDevilV1Controller(i2c_smbus_interfa
|
||||
this->dev = dev;
|
||||
this->name = dev_name;
|
||||
|
||||
if(bus->pci_device > AMD_NAVI10_DEV) // Only Navi 2 cards have this mode
|
||||
if(bus->info.pci_device > AMD_NAVI10_DEV) // Only Navi 2 cards have this mode
|
||||
{
|
||||
this->has_sync_mode = true;
|
||||
}
|
||||
@@ -33,7 +33,7 @@ PowerColorRedDevilV1Controller::~PowerColorRedDevilV1Controller()
|
||||
|
||||
std::string PowerColorRedDevilV1Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ PowerColorRedDevilV2Controller::~PowerColorRedDevilV2Controller()
|
||||
|
||||
std::string PowerColorRedDevilV2Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
@@ -164,4 +164,4 @@ int PowerColorRedDevilV2Controller::RegisterWrite(unsigned char reg, unsigned ch
|
||||
int ret = bus->i2c_smbus_write_i2c_block_data(dev, reg, 3, data);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ enum
|
||||
|
||||
bool TestForSapphireGPUController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
if(bus->pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
if(bus->info.pci_vendor == AMD_GPU_VEN && !is_amd_gpu_i2c_bus(bus))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ SapphireNitroGlowV1Controller::~SapphireNitroGlowV1Controller()
|
||||
|
||||
std::string SapphireNitroGlowV1Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ SapphireNitroGlowV3Controller::~SapphireNitroGlowV3Controller()
|
||||
|
||||
std::string SapphireNitroGlowV3Controller::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
@@ -25,7 +25,7 @@ TForceXtreemController::~TForceXtreemController()
|
||||
|
||||
std::string TForceXtreemController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
|
||||
@@ -29,7 +29,7 @@ ZotacBlackwellGPUController::~ZotacBlackwellGPUController()
|
||||
|
||||
std::string ZotacBlackwellGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
std::string return_string(bus->info.device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user