From c7baf972b851eda9d991ad0f5a0e184338d0670b Mon Sep 17 00:00:00 2001 From: orestis gounalakis Date: Wed, 24 Dec 2025 20:40:17 +0200 Subject: [PATCH 1/3] add support for manli RTX 4090 gallardo --- .../ManliGPUController/ManliGPUController.cpp | 116 +++++++++++ .../ManliGPUController/ManliGPUController.h | 70 +++++++ .../ManliGPUControllerDetect.cpp | 60 ++++++ .../RGBController_ManliGPU.cpp | 192 ++++++++++++++++++ .../RGBController_ManliGPU.h | 39 ++++ pci_ids/pci_ids.h | 1 + 6 files changed, 478 insertions(+) create mode 100644 Controllers/ManliGPUController/ManliGPUController.cpp create mode 100644 Controllers/ManliGPUController/ManliGPUController.h create mode 100644 Controllers/ManliGPUController/ManliGPUControllerDetect.cpp create mode 100644 Controllers/ManliGPUController/RGBController_ManliGPU.cpp create mode 100644 Controllers/ManliGPUController/RGBController_ManliGPU.h diff --git a/Controllers/ManliGPUController/ManliGPUController.cpp b/Controllers/ManliGPUController/ManliGPUController.cpp new file mode 100644 index 000000000..0037c97f8 --- /dev/null +++ b/Controllers/ManliGPUController/ManliGPUController.cpp @@ -0,0 +1,116 @@ +/*---------------------------------------------------------*\ +| ManliGPUController.cpp | +| | +| Driver for Manli GPU RGB controllers | +| | +| Based on ZotacV2GPUController | +| Adapted for Manli RTX 4090 Gallardo | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-or-later | +\*---------------------------------------------------------*/ + +#include "ManliGPUController.h" + +ManliGPUController::ManliGPUController(i2c_smbus_interface* bus, u8 dev, std::string dev_name) +{ + this->bus = bus; + this->dev = dev; + this->name = dev_name; + + if(dev) + { + ReadVersion(); + } +} + +ManliGPUController::~ManliGPUController() +{ +} + +std::string ManliGPUController::GetDeviceLocation() +{ + std::string return_string(bus->device_name); + char addr[5]; + snprintf(addr, 5, "0x%02X", dev); + return_string.append(", address "); + return_string.append(addr); + return ("I2C: " + return_string); +} + +std::string ManliGPUController::GetName() +{ + return(name); +} + +std::string ManliGPUController::GetVersion() +{ + return(version); +} + +bool ManliGPUController::ReadVersion() +{ + u8 data_pkt[] = { MANLI_GPU_REG_RGB, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + if(bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt) < 0) + { + return false; + } + + u8 rdata_pkt[I2C_SMBUS_BLOCK_MAX] = { 0x00 }; + int rdata_len = sizeof(rdata_pkt); + if(bus->i2c_read_block(dev, &rdata_len, rdata_pkt) < 0) + { + return false; + } + + version = std::string((char*)rdata_pkt); + + return true; +} + +bool ManliGPUController::TurnOnOff(bool on) +{ + ManliGPUZone zoneConfig; + return SendCommand(on, zoneConfig); +} + +bool ManliGPUController::SetMode(ManliGPUZone zoneConfig) +{ + return SendCommand(true, zoneConfig); +} + +bool ManliGPUController::SendCommand(bool on, ManliGPUZone zoneConfig) +{ + u8 data_pkt[30] = { 0x00 }; + + data_pkt[0] = on ? (u8)0x01 : (u8)0x00; + + // Color Cycle: Uses breathing mode (0x01) with flag 0x07 + if(zoneConfig.mode == MANLI_GPU_MODE_COLOR_CYCLE) + { + data_pkt[6] = 0x01; // mode = breathing + data_pkt[7] = 0x00; // R + data_pkt[8] = 0x00; // G + data_pkt[9] = 0x00; // B + data_pkt[10] = 0x32; // speed = 50 + data_pkt[11] = 0x64; // brightness = 100 + data_pkt[13] = 0x07; // color cycle flag + } + else + { + // Standard modes + data_pkt[6] = (u8)zoneConfig.mode; + data_pkt[7] = (u8)RGBGetRValue(zoneConfig.color1); + data_pkt[8] = (u8)RGBGetGValue(zoneConfig.color1); + data_pkt[9] = (u8)RGBGetBValue(zoneConfig.color1); + data_pkt[10] = (u8)zoneConfig.speed; + data_pkt[11] = (u8)zoneConfig.brightness; + } + + if(bus->i2c_smbus_write_i2c_block_data(dev, MANLI_GPU_REG_RGB, sizeof(data_pkt), data_pkt) < 0) + { + return false; + } + return true; +} + diff --git a/Controllers/ManliGPUController/ManliGPUController.h b/Controllers/ManliGPUController/ManliGPUController.h new file mode 100644 index 000000000..095c115f2 --- /dev/null +++ b/Controllers/ManliGPUController/ManliGPUController.h @@ -0,0 +1,70 @@ +/*---------------------------------------------------------*\ +| ManliGPUController.h | +| | +| Driver for Manli GPU RGB controllers | +| | +| Based on ZotacV2GPUController | +| Adapted for Manli RTX 4090 Gallardo | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-or-later | +\*---------------------------------------------------------*/ + +#pragma once + +#include +#include "i2c_smbus.h" +#include "RGBController.h" + +enum +{ + MANLI_GPU_REG_RGB = 0xA0, +}; + +enum +{ + MANLI_GPU_MODE_STATIC = 0x00, // Static color + MANLI_GPU_MODE_BREATHING = 0x01, // Breathing effect + MANLI_GPU_MODE_WAVE = 0x02, // Wave effect + MANLI_GPU_MODE_STROBING = 0x03, // Strobing effect + MANLI_GPU_MODE_RAINBOW = 0x08, // Rainbow effect (all colors move) + MANLI_GPU_MODE_COLOR_CYCLE = 0x10, // Color Cycle (breathing + flag 0x07) +}; + +struct ManliGPUConfig +{ + int numberOfZones = 0; + bool supportsExternalLEDStrip = false; +}; + +struct ManliGPUZone +{ + int mode = 0; + RGBColor color1 = ToRGBColor(0, 0, 0); + unsigned int speed = 0; + unsigned int brightness = 0; +}; + +class ManliGPUController +{ +public: + ManliGPUController(i2c_smbus_interface* bus, u8 dev, std::string dev_name); + ~ManliGPUController(); + + std::string GetDeviceLocation(); + std::string GetName(); + std::string GetVersion(); + + bool TurnOnOff(bool on); + bool SetMode(ManliGPUZone zoneConfig); + +private: + i2c_smbus_interface* bus; + u8 dev; + std::string name; + std::string version; + + bool ReadVersion(); + bool SendCommand(bool on, ManliGPUZone zoneConfig); +}; + diff --git a/Controllers/ManliGPUController/ManliGPUControllerDetect.cpp b/Controllers/ManliGPUController/ManliGPUControllerDetect.cpp new file mode 100644 index 000000000..24782d201 --- /dev/null +++ b/Controllers/ManliGPUController/ManliGPUControllerDetect.cpp @@ -0,0 +1,60 @@ +/*---------------------------------------------------------*\ +| ManliGPUControllerDetect.cpp | +| | +| Detector for Manli GPU | +| | +| Based on ZotacV2GPUControllerDetect | +| Adapted for Manli RTX 4090 Gallardo | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-or-later | +\*---------------------------------------------------------*/ + +#include "Detector.h" +#include "ManliGPUController.h" +#include "RGBController_ManliGPU.h" +#include "i2c_smbus.h" +#include "pci_ids.h" +#include "LogManager.h" + +/******************************************************************************************\ +* * +* DetectManliGPUControllers * +* * +* Detect Manli GPU RGB controllers on the enumerated I2C busses * +* at address 0x49. * +* * +* bus - pointer to i2c_smbus_interface where RGB device is connected * +* dev - I2C address of RGB device * +* * +\******************************************************************************************/ + +void DetectManliGPUControllers(i2c_smbus_interface* bus, u8 i2c_addr, const std::string& name) +{ + u8 data_pkt[] = { MANLI_GPU_REG_RGB, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + if(bus->i2c_write_block(i2c_addr, sizeof(data_pkt), data_pkt) < 0) + { + return; + } + + u8 rdata_pkt[I2C_SMBUS_BLOCK_MAX] = { 0x00 }; + int rdata_len = sizeof(rdata_pkt); + + if(bus->i2c_read_block(i2c_addr, &rdata_len, rdata_pkt) >= 0) + { + ManliGPUController* controller = new ManliGPUController(bus, i2c_addr, name); + RGBController_ManliGPU* rgb_controller = new RGBController_ManliGPU(controller); + + if(rgb_controller->config.numberOfZones > 0) + { + ResourceManager::get()->RegisterRGBController(rgb_controller); + } + else + { + LOG_ERROR("[%s] RGB controller not registered.", name.c_str()); + } + } +} + +REGISTER_I2C_PCI_DETECTOR("MANLI GeForce RTX 4090 Gallardo", DetectManliGPUControllers, NVIDIA_VEN, NVIDIA_RTX4090_DEV, NVIDIA_SUB_VEN, MANLI_RTX4090_GALLARDO_SUB_DEV, 0x49); + diff --git a/Controllers/ManliGPUController/RGBController_ManliGPU.cpp b/Controllers/ManliGPUController/RGBController_ManliGPU.cpp new file mode 100644 index 000000000..e84e28770 --- /dev/null +++ b/Controllers/ManliGPUController/RGBController_ManliGPU.cpp @@ -0,0 +1,192 @@ +/*---------------------------------------------------------*\ +| RGBController_ManliGPU.cpp | +| | +| RGBController for Manli GPU | +| | +| Based on RGBController_ZotacV2GPU | +| Adapted for Manli RTX 4090 Gallardo | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-or-later | +\*---------------------------------------------------------*/ + +#include +#include "RGBController_ManliGPU.h" +#include "LogManager.h" + +std::map MANLI_GPU_CONFIG = +{ + { "N675M-1018", { 1, false } }, // MANLI GeForce RTX 4090 Gallardo +}; + +/**------------------------------------------------------------------*\ + @name Manli GPU + @category GPU + @type I2C + @save :robot: + @direct :white_check_mark: + @effects :tools: + @detectors DetectManliGPUControllers + @comment + Manli GPU RGB controllers use I2C communication at address 0x49. + Supported modes: Static, Breathing, Wave, Strobing, Color Cycle. +\*-------------------------------------------------------------------*/ + +RGBController_ManliGPU::RGBController_ManliGPU(ManliGPUController* controller_ptr) +{ + controller = controller_ptr; + + name = controller->GetName(); + vendor = "MANLI"; + description = "MANLI RGB GPU Device (" + controller->GetVersion() + ")"; + location = controller->GetDeviceLocation(); + type = DEVICE_TYPE_GPU; + + if(MANLI_GPU_CONFIG.count(controller->GetVersion()) > 0) + { + config = MANLI_GPU_CONFIG.at(controller->GetVersion()); + } + else + { + LOG_ERROR("[%s] Unrecognized controller version %s", name.c_str(), controller->GetVersion().c_str()); + config = { 0, false }; + } + + version += std::to_string(config.numberOfZones) + " zones"; + + mode STATIC; + STATIC.name = "Static"; + STATIC.value = MANLI_GPU_MODE_STATIC; + STATIC.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR; + STATIC.brightness_min = 0; + STATIC.brightness_max = 100; + STATIC.brightness = 100; + STATIC.color_mode = MODE_COLORS_MODE_SPECIFIC; + STATIC.colors_min = 1; + STATIC.colors_max = 1; + STATIC.colors.resize(1); + STATIC.colors[0] = ToRGBColor(0, 0, 255); + modes.push_back(STATIC); + + mode BREATHING; + BREATHING.name = "Breathing"; + BREATHING.value = MANLI_GPU_MODE_BREATHING; + BREATHING.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR; + BREATHING.brightness_min = 0; + BREATHING.brightness_max = 100; + BREATHING.brightness = 100; + BREATHING.speed_min = 0; + BREATHING.speed_max = 100; + BREATHING.speed = 50; + BREATHING.color_mode = MODE_COLORS_MODE_SPECIFIC; + BREATHING.colors_min = 1; + BREATHING.colors_max = 1; + BREATHING.colors.resize(1); + BREATHING.colors[0] = ToRGBColor(0, 0, 255); + modes.push_back(BREATHING); + + mode WAVE; + WAVE.name = "Wave"; + WAVE.value = MANLI_GPU_MODE_WAVE; + WAVE.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_SPEED; + WAVE.speed_min = 0; + WAVE.speed_max = 100; + WAVE.speed = 50; + WAVE.color_mode = MODE_COLORS_NONE; + modes.push_back(WAVE); + + mode STROBING; + STROBING.name = "Strobing"; + STROBING.value = MANLI_GPU_MODE_STROBING; + STROBING.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR; + STROBING.brightness_min = 0; + STROBING.brightness_max = 100; + STROBING.brightness = 100; + STROBING.speed_min = 0; + STROBING.speed_max = 100; + STROBING.speed = 50; + STROBING.color_mode = MODE_COLORS_MODE_SPECIFIC; + STROBING.colors_min = 1; + STROBING.colors_max = 1; + STROBING.colors.resize(1); + STROBING.colors[0] = ToRGBColor(0, 0, 255); + modes.push_back(STROBING); + + // Rainbow: All colors move across the LED + mode RAINBOW; + RAINBOW.name = "Rainbow"; + RAINBOW.value = MANLI_GPU_MODE_RAINBOW; + RAINBOW.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_SPEED; + RAINBOW.speed_min = 0; + RAINBOW.speed_max = 100; + RAINBOW.speed = 50; + RAINBOW.color_mode = MODE_COLORS_NONE; + modes.push_back(RAINBOW); + + // Color Cycle: Cycles through colors with brief LED-off between transitions + mode COLOR_CYCLE; + COLOR_CYCLE.name = "Color Cycle"; + COLOR_CYCLE.value = MANLI_GPU_MODE_COLOR_CYCLE; + COLOR_CYCLE.flags = MODE_FLAG_AUTOMATIC_SAVE; + COLOR_CYCLE.color_mode = MODE_COLORS_NONE; + modes.push_back(COLOR_CYCLE); + + SetupZones(); +} + +RGBController_ManliGPU::~RGBController_ManliGPU() +{ + delete controller; +} + +void RGBController_ManliGPU::SetupZones() +{ + led new_led; + new_led.name = "GPU LED"; + leds.push_back(new_led); + + zone new_zone; + new_zone.name = "GPU Zone"; + new_zone.type = ZONE_TYPE_SINGLE; + new_zone.leds_min = 1; + new_zone.leds_max = 1; + new_zone.leds_count = 1; + new_zone.matrix_map = NULL; + zones.push_back(new_zone); + + SetupColors(); +} + +void RGBController_ManliGPU::ResizeZone(int /*zone*/, int /*new_size*/) +{ + /*---------------------------------------------------------*\ + | This device does not support resizing zones | + \*---------------------------------------------------------*/ +} + +void RGBController_ManliGPU::DeviceUpdateLEDs() +{ + DeviceUpdateMode(); +} + +void RGBController_ManliGPU::UpdateZoneLEDs(int /*zone*/) +{ + DeviceUpdateMode(); +} + +void RGBController_ManliGPU::UpdateSingleLED(int /*led*/) +{ + DeviceUpdateMode(); +} + +void RGBController_ManliGPU::DeviceUpdateMode() +{ + ManliGPUZone zoneConfig; + zoneConfig.mode = modes[active_mode].value; + zoneConfig.color1 = modes[active_mode].colors.size() >= 1 ? modes[active_mode].colors[0] : ToRGBColor(0, 0, 0); + zoneConfig.speed = modes[active_mode].speed; + zoneConfig.brightness = modes[active_mode].brightness; + + controller->SetMode(zoneConfig); +} + diff --git a/Controllers/ManliGPUController/RGBController_ManliGPU.h b/Controllers/ManliGPUController/RGBController_ManliGPU.h new file mode 100644 index 000000000..61435f5b1 --- /dev/null +++ b/Controllers/ManliGPUController/RGBController_ManliGPU.h @@ -0,0 +1,39 @@ +/*---------------------------------------------------------*\ +| RGBController_ManliGPU.h | +| | +| RGBController for Manli GPU | +| | +| Based on RGBController_ZotacV2GPU | +| Adapted for Manli RTX 4090 Gallardo | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-or-later | +\*---------------------------------------------------------*/ + +#pragma once + +#include "RGBController.h" +#include "ManliGPUController.h" + +class RGBController_ManliGPU : public RGBController +{ +public: + RGBController_ManliGPU(ManliGPUController* controller_ptr); + ~RGBController_ManliGPU(); + + void SetupZones(); + + void ResizeZone(int zone, int new_size); + + void DeviceUpdateLEDs(); + void UpdateZoneLEDs(int zone); + void UpdateSingleLED(int led); + + void DeviceUpdateMode(); + + ManliGPUConfig config; + +private: + ManliGPUController* controller; +}; + diff --git a/pci_ids/pci_ids.h b/pci_ids/pci_ids.h index 978c35095..9f0cb1517 100644 --- a/pci_ids/pci_ids.h +++ b/pci_ids/pci_ids.h @@ -970,6 +970,7 @@ | Manli Sub-Device IDs | \*-----------------------------------------------------*/ #define MANLI_RTX3080TI_GALLARDO_SUB_DEV 0x2612 +#define MANLI_RTX4090_GALLARDO_SUB_DEV 0x167C /*---------------------------------------------------------*\ | PCI ID Macros | From b6de926a62758158d4f2bcbe04498b347776b730 Mon Sep 17 00:00:00 2001 From: orestis gounalakis Date: Thu, 25 Dec 2025 07:42:57 +0200 Subject: [PATCH 2/3] if speed at color cycle --- .../ManliGPUController/ManliGPUController.cpp | 39 ++++++++------ .../ManliGPUControllerDetect.cpp | 3 +- .../RGBController_ManliGPU.cpp | 53 +++++++++++-------- 3 files changed, 57 insertions(+), 38 deletions(-) diff --git a/Controllers/ManliGPUController/ManliGPUController.cpp b/Controllers/ManliGPUController/ManliGPUController.cpp index 0037c97f8..8f04aeb43 100644 --- a/Controllers/ManliGPUController/ManliGPUController.cpp +++ b/Controllers/ManliGPUController/ManliGPUController.cpp @@ -64,7 +64,6 @@ bool ManliGPUController::ReadVersion() } version = std::string((char*)rdata_pkt); - return true; } @@ -81,36 +80,46 @@ bool ManliGPUController::SetMode(ManliGPUZone zoneConfig) bool ManliGPUController::SendCommand(bool on, ManliGPUZone zoneConfig) { - u8 data_pkt[30] = { 0x00 }; - - data_pkt[0] = on ? (u8)0x01 : (u8)0x00; - - // Color Cycle: Uses breathing mode (0x01) with flag 0x07 + /*---------------------------------------------------------*\ + | Color Cycle: Uses breathing mode (0x01) with flag 0x07 | + | This cycles through colors with brightness and speed | + \*---------------------------------------------------------*/ if(zoneConfig.mode == MANLI_GPU_MODE_COLOR_CYCLE) { + u8 data_pkt[30] = { 0x00 }; + data_pkt[0] = on ? (u8)0x01 : (u8)0x00; data_pkt[6] = 0x01; // mode = breathing data_pkt[7] = 0x00; // R data_pkt[8] = 0x00; // G data_pkt[9] = 0x00; // B - data_pkt[10] = 0x32; // speed = 50 - data_pkt[11] = 0x64; // brightness = 100 + data_pkt[10] = (u8)zoneConfig.speed; + data_pkt[11] = (u8)zoneConfig.brightness; data_pkt[13] = 0x07; // color cycle flag + + if(bus->i2c_smbus_write_i2c_block_data(dev, MANLI_GPU_REG_RGB, sizeof(data_pkt), data_pkt) < 0) + { + return false; + } + return true; } + /*---------------------------------------------------------*\ + | Standard modes (Static, Breathing, Wave, Strobing, Rainbow)| + \*---------------------------------------------------------*/ else { - // Standard modes + u8 data_pkt[30] = { 0x00 }; + data_pkt[0] = on ? (u8)0x01 : (u8)0x00; data_pkt[6] = (u8)zoneConfig.mode; data_pkt[7] = (u8)RGBGetRValue(zoneConfig.color1); data_pkt[8] = (u8)RGBGetGValue(zoneConfig.color1); data_pkt[9] = (u8)RGBGetBValue(zoneConfig.color1); data_pkt[10] = (u8)zoneConfig.speed; data_pkt[11] = (u8)zoneConfig.brightness; - } - if(bus->i2c_smbus_write_i2c_block_data(dev, MANLI_GPU_REG_RGB, sizeof(data_pkt), data_pkt) < 0) - { - return false; + if(bus->i2c_smbus_write_i2c_block_data(dev, MANLI_GPU_REG_RGB, sizeof(data_pkt), data_pkt) < 0) + { + return false; + } + return true; } - return true; } - diff --git a/Controllers/ManliGPUController/ManliGPUControllerDetect.cpp b/Controllers/ManliGPUController/ManliGPUControllerDetect.cpp index 24782d201..413a5935d 100644 --- a/Controllers/ManliGPUController/ManliGPUControllerDetect.cpp +++ b/Controllers/ManliGPUController/ManliGPUControllerDetect.cpp @@ -51,7 +51,8 @@ void DetectManliGPUControllers(i2c_smbus_interface* bus, u8 i2c_addr, const std: } else { - LOG_ERROR("[%s] RGB controller not registered.", name.c_str()); + LOG_ERROR("[%s] RGB controller not registered - invalid zone count: %d", name.c_str(), rgb_controller->config.numberOfZones); + delete rgb_controller; } } } diff --git a/Controllers/ManliGPUController/RGBController_ManliGPU.cpp b/Controllers/ManliGPUController/RGBController_ManliGPU.cpp index e84e28770..c58ae191b 100644 --- a/Controllers/ManliGPUController/RGBController_ManliGPU.cpp +++ b/Controllers/ManliGPUController/RGBController_ManliGPU.cpp @@ -12,7 +12,6 @@ #include #include "RGBController_ManliGPU.h" -#include "LogManager.h" std::map MANLI_GPU_CONFIG = { @@ -24,12 +23,12 @@ std::map MANLI_GPU_CONFIG = @category GPU @type I2C @save :robot: - @direct :white_check_mark: - @effects :tools: + @direct :x: + @effects :white_check_mark: @detectors DetectManliGPUControllers @comment Manli GPU RGB controllers use I2C communication at address 0x49. - Supported modes: Static, Breathing, Wave, Strobing, Color Cycle. + Supported modes: Static, Breathing, Wave, Strobing, Rainbow, Color Cycle. \*-------------------------------------------------------------------*/ RGBController_ManliGPU::RGBController_ManliGPU(ManliGPUController* controller_ptr) @@ -48,7 +47,6 @@ RGBController_ManliGPU::RGBController_ManliGPU(ManliGPUController* controller_pt } else { - LOG_ERROR("[%s] Unrecognized controller version %s", name.c_str(), controller->GetVersion().c_str()); config = { 0, false }; } @@ -106,29 +104,33 @@ RGBController_ManliGPU::RGBController_ManliGPU(ManliGPUController* controller_pt STROBING.speed_max = 100; STROBING.speed = 50; STROBING.color_mode = MODE_COLORS_MODE_SPECIFIC; - STROBING.colors_min = 1; - STROBING.colors_max = 1; + STROBING.colors_min = 1; + STROBING.colors_max = 1; STROBING.colors.resize(1); STROBING.colors[0] = ToRGBColor(0, 0, 255); modes.push_back(STROBING); - // Rainbow: All colors move across the LED mode RAINBOW; - RAINBOW.name = "Rainbow"; - RAINBOW.value = MANLI_GPU_MODE_RAINBOW; - RAINBOW.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_SPEED; - RAINBOW.speed_min = 0; - RAINBOW.speed_max = 100; - RAINBOW.speed = 50; - RAINBOW.color_mode = MODE_COLORS_NONE; + RAINBOW.name = "Rainbow"; + RAINBOW.value = MANLI_GPU_MODE_RAINBOW; + RAINBOW.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_SPEED; + RAINBOW.speed_min = 0; + RAINBOW.speed_max = 100; + RAINBOW.speed = 50; + RAINBOW.color_mode = MODE_COLORS_NONE; modes.push_back(RAINBOW); - // Color Cycle: Cycles through colors with brief LED-off between transitions mode COLOR_CYCLE; - COLOR_CYCLE.name = "Color Cycle"; - COLOR_CYCLE.value = MANLI_GPU_MODE_COLOR_CYCLE; - COLOR_CYCLE.flags = MODE_FLAG_AUTOMATIC_SAVE; - COLOR_CYCLE.color_mode = MODE_COLORS_NONE; + COLOR_CYCLE.name = "Color Cycle"; + COLOR_CYCLE.value = MANLI_GPU_MODE_COLOR_CYCLE; + COLOR_CYCLE.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED; + COLOR_CYCLE.brightness_min = 0; + COLOR_CYCLE.brightness_max = 100; + COLOR_CYCLE.brightness = 100; + COLOR_CYCLE.speed_min = 0; + COLOR_CYCLE.speed_max = 100; + COLOR_CYCLE.speed = 50; + COLOR_CYCLE.color_mode = MODE_COLORS_NONE; modes.push_back(COLOR_CYCLE); SetupZones(); @@ -183,10 +185,17 @@ void RGBController_ManliGPU::DeviceUpdateMode() { ManliGPUZone zoneConfig; zoneConfig.mode = modes[active_mode].value; - zoneConfig.color1 = modes[active_mode].colors.size() >= 1 ? modes[active_mode].colors[0] : ToRGBColor(0, 0, 0); zoneConfig.speed = modes[active_mode].speed; zoneConfig.brightness = modes[active_mode].brightness; + if(modes[active_mode].colors.size() >= 1) + { + zoneConfig.color1 = modes[active_mode].colors[0]; + } + else + { + zoneConfig.color1 = ToRGBColor(0, 0, 0); + } + controller->SetMode(zoneConfig); } - From c11eab03dea3619079918e291403131e8767fb3a Mon Sep 17 00:00:00 2001 From: orestis gounalakis Date: Thu, 25 Dec 2025 15:21:21 +0200 Subject: [PATCH 3/3] add comments for modes --- Controllers/ManliGPUController/ManliGPUController.h | 4 ++-- Controllers/ManliGPUController/RGBController_ManliGPU.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Controllers/ManliGPUController/ManliGPUController.h b/Controllers/ManliGPUController/ManliGPUController.h index 095c115f2..276082b85 100644 --- a/Controllers/ManliGPUController/ManliGPUController.h +++ b/Controllers/ManliGPUController/ManliGPUController.h @@ -25,9 +25,9 @@ enum { MANLI_GPU_MODE_STATIC = 0x00, // Static color MANLI_GPU_MODE_BREATHING = 0x01, // Breathing effect - MANLI_GPU_MODE_WAVE = 0x02, // Wave effect + MANLI_GPU_MODE_WAVE = 0x02, // Wave effect (no brightness - HW limitation) MANLI_GPU_MODE_STROBING = 0x03, // Strobing effect - MANLI_GPU_MODE_RAINBOW = 0x08, // Rainbow effect (all colors move) + MANLI_GPU_MODE_RAINBOW = 0x08, // Rainbow effect (no brightness - HW limitation) MANLI_GPU_MODE_COLOR_CYCLE = 0x10, // Color Cycle (breathing + flag 0x07) }; diff --git a/Controllers/ManliGPUController/RGBController_ManliGPU.cpp b/Controllers/ManliGPUController/RGBController_ManliGPU.cpp index c58ae191b..84f5b7066 100644 --- a/Controllers/ManliGPUController/RGBController_ManliGPU.cpp +++ b/Controllers/ManliGPUController/RGBController_ManliGPU.cpp @@ -86,7 +86,7 @@ RGBController_ManliGPU::RGBController_ManliGPU(ManliGPUController* controller_pt mode WAVE; WAVE.name = "Wave"; WAVE.value = MANLI_GPU_MODE_WAVE; - WAVE.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_SPEED; + WAVE.flags = MODE_FLAG_AUTOMATIC_SAVE | MODE_FLAG_HAS_SPEED; // No brightness - HW limitation WAVE.speed_min = 0; WAVE.speed_max = 100; WAVE.speed = 50;