Fix Tricolor mode

This commit is contained in:
Cyril Bosselut 2024-01-28 02:52:13 +00:00 committed by Adam Honse
parent ce3c30f443
commit c1d3e91c32
3 changed files with 12 additions and 6 deletions

View file

@ -75,7 +75,7 @@ void RGBFusion2GPUController::SetZone(uint8_t zone, uint8_t mode, fusion2_config
{
uint8_t zone_pkt[8] = { RGB_FUSION2_GPU_REG_MODE, mode, zone_config.speed, zone_config.brightness, mystery_flag, (uint8_t)(zone + 1), 0x00, 0x00 };
bus->i2c_write_block(dev, sizeof(zone_pkt), zone_pkt);
}
}
break;
case RGB_FUSION2_GPU_MODE_GRADIENT:
@ -103,7 +103,7 @@ void RGBFusion2GPUController::SetZone(uint8_t zone, uint8_t mode, fusion2_config
}
break;
case RGB_FUSION2_GPU_MODE_COLOR_SHIFT:
case RGB_FUSION2_GPU_MODE_COLOR_SHIFT:
{
mystery_flag = zone_config.numberOfColors;
uint8_t zone_pkt[8] = { RGB_FUSION2_GPU_REG_MODE, mode, zone_config.speed, zone_config.brightness, mystery_flag, (uint8_t)(zone + 1), 0x00, 0x00 };
@ -138,7 +138,7 @@ void RGBFusion2GPUController::SetZone(uint8_t zone, uint8_t mode, fusion2_config
bus->i2c_write_block(dev, sizeof(zone_pktD), zone_pktD);
}
break;
default:
{
LOG_TRACE("[%s] Mode %02d not found", "fusion2 gpu", mode);

View file

@ -46,7 +46,7 @@ bool TestForGigabyteRGBFusion2GPUController(i2c_smbus_interface* bus, unsigned c
//GeForce RTX 4080 Gigabyte AORUS MASTER 16G 0xAB 0x10 0x52 0x07
//Note that GeForce RTX 3080 Ti AORUS XTREME WATERFORCE 12G LHS exposes three i2c buses but only one returns a 0xAB
//response and controls the RGB lighting. The other buses return 0x00 0x00 0x00 0x00.
//Note that GeForce RTX 4080 Gigabyte AORUS MASTER 16G exposes two i2c bus with writable address 0x71 but on respond
//Note that GeForce RTX 4080 Gigabyte AORUS MASTER 16G exposes two i2c bus with writable address 0x71 but one respond
//0x00 0x00 0x00 0x00 so it should be the one controlling the LCD screen. So we skip this bus
//All seen responses start with 0xAB, so we check for this.

View file

@ -9,6 +9,7 @@
\*-----------------------------------------*/
#include "RGBController_GigabyteRGBFusion2GPU.h"
#include "LogManager.h"
/**------------------------------------------------------------------*\
@name Gigabyte Fusion 2 GPU
@ -144,6 +145,8 @@ RGBController_RGBFusion2GPU::RGBController_RGBFusion2GPU(RGBFusion2GPUController
Tricolor.speed_max = RGB_FUSION2_GPU_SPEED_FASTEST;
Tricolor.speed = RGB_FUSION2_GPU_SPEED_NORMAL;
Tricolor.color_mode = MODE_COLORS_MODE_SPECIFIC;
Tricolor.colors_min = 1;
Tricolor.colors_max = 3;
Tricolor.colors.resize(3);
Tricolor.brightness_min = RGB_FUSION2_GPU_BRIGHTNESS_MIN;
Tricolor.brightness_max = RGB_FUSION2_GPU_BRIGHTNESS_MAX;
@ -220,18 +223,21 @@ void RGBController_RGBFusion2GPU::DeviceUpdateLEDs()
}
}
void RGBController_RGBFusion2GPU::UpdateZoneLEDs(int /*zone*/)
void RGBController_RGBFusion2GPU::UpdateZoneLEDs(int zone)
{
LOG_TRACE("[%s] Update zone #%d", name.c_str(), zone);
DeviceUpdateLEDs();
}
void RGBController_RGBFusion2GPU::UpdateSingleLED(int /*led*/)
void RGBController_RGBFusion2GPU::UpdateSingleLED(int led)
{
LOG_TRACE("[%s] Update single led : %d", name.c_str(), led);
DeviceUpdateLEDs();
}
void RGBController_RGBFusion2GPU::DeviceUpdateMode()
{
LOG_TRACE("[%s] Switching to mode %s @ brightness %d and speed %d", name.c_str(), modes[active_mode].name, modes[active_mode].brightness, modes[active_mode].speed);
DeviceUpdateLEDs();
}