iGame Turing GPU with Direct mode without persistence
This commit is contained in:
parent
9e75a68008
commit
f7eb61614e
6 changed files with 30 additions and 8 deletions
|
|
@ -65,12 +65,19 @@ void ColorfulTuringGPUController::SetStateDisplay(RGBColor color)
|
||||||
bus->i2c_write_block(dev, COLORFUL_COLOR_PACKET_LENGTH, data_pkt);
|
bus->i2c_write_block(dev, COLORFUL_COLOR_PACKET_LENGTH, data_pkt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorfulTuringGPUController::SetDirect(RGBColor color)
|
void ColorfulTuringGPUController::SetDirect(RGBColor color, bool save)
|
||||||
{
|
{
|
||||||
uint8_t r = RGBGetRValue(color);
|
uint8_t r = RGBGetRValue(color);
|
||||||
uint8_t g = RGBGetGValue(color);
|
uint8_t g = RGBGetGValue(color);
|
||||||
uint8_t b = RGBGetBValue(color);
|
uint8_t b = RGBGetBValue(color);
|
||||||
uint8_t data_pkt[COLORFUL_COLOR_PACKET_LENGTH] = { 0x88, 0x02, 0x32, 0x02, r, g, b};
|
uint8_t data_pkt[COLORFUL_COLOR_PACKET_LENGTH] = { 0x08, 0x0, 0x20, 0x10, r, g, b};
|
||||||
|
if(save)
|
||||||
|
{
|
||||||
|
data_pkt[0] = 0x88;
|
||||||
|
data_pkt[1] = 0x02;
|
||||||
|
data_pkt[2] = 0x32;
|
||||||
|
data_pkt[3] = 0x02;
|
||||||
|
}
|
||||||
|
|
||||||
int crc = 1;
|
int crc = 1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ public:
|
||||||
std::string GetDeviceLocation();
|
std::string GetDeviceLocation();
|
||||||
int GetMode();
|
int GetMode();
|
||||||
RGBColor GetColor();
|
RGBColor GetColor();
|
||||||
void SetDirect(RGBColor color);
|
void SetDirect(RGBColor color, bool save);
|
||||||
void SetStateDisplay(RGBColor color);
|
void SetStateDisplay(RGBColor color);
|
||||||
void SetBreathing(RGBColor color);
|
void SetBreathing(RGBColor color);
|
||||||
void SetOff();
|
void SetOff();
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,5 @@ void DetectColorfulTuringGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_ad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 2070 SUPER Advanced OC-V", DetectColorfulTuringGPUControllers, NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_2070_SUPER_ADVANCED_OCV, 0x50);
|
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 2070 SUPER Advanced OC-V", DetectColorfulTuringGPUControllers, NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_2070_SUPER_ADVANCED_OCV, 0x50);
|
||||||
|
REGISTER_I2C_PCI_DETECTOR("iGame GeForce RTX 2070 SUPER Advanced OC-V", DetectColorfulTuringGPUControllers, NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, COLORFUL_SUB_VEN, COLORFUL_IGAME_RTX_2070_SUPER_ADVANCED_OCV2, 0x50);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ RGBController_ColorfulTuringGPU::RGBController_ColorfulTuringGPU(ColorfulTuringG
|
||||||
mode Direct;
|
mode Direct;
|
||||||
Direct.name = "Direct";
|
Direct.name = "Direct";
|
||||||
Direct.value = COLORFUL_TURING_GPU_RGB_MODE_STATIC;
|
Direct.value = COLORFUL_TURING_GPU_RGB_MODE_STATIC;
|
||||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_MANUAL_SAVE;
|
||||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||||
modes.push_back(Direct);
|
modes.push_back(Direct);
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ void RGBController_ColorfulTuringGPU::SetupZones()
|
||||||
zone new_zone;
|
zone new_zone;
|
||||||
|
|
||||||
new_zone.name = "GPU";
|
new_zone.name = "GPU";
|
||||||
new_zone.type = ZONE_TYPE_LINEAR;
|
new_zone.type = ZONE_TYPE_SINGLE;
|
||||||
new_zone.leds_min = 1;
|
new_zone.leds_min = 1;
|
||||||
new_zone.leds_max = 1;
|
new_zone.leds_max = 1;
|
||||||
new_zone.leds_count = 1;
|
new_zone.leds_count = 1;
|
||||||
|
|
@ -122,10 +122,10 @@ void RGBController_ColorfulTuringGPU::DeviceUpdateLEDs()
|
||||||
controller->SetStateDisplay(colors[0]);
|
controller->SetStateDisplay(colors[0]);
|
||||||
break;
|
break;
|
||||||
case COLORFUL_TURING_GPU_RGB_MODE_STATIC:
|
case COLORFUL_TURING_GPU_RGB_MODE_STATIC:
|
||||||
controller->SetDirect(colors[0]);
|
controller->SetDirect(colors[0], false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
controller->SetDirect(colors[0]);
|
controller->SetDirect(colors[0], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -143,3 +143,15 @@ void RGBController_ColorfulTuringGPU::DeviceUpdateMode()
|
||||||
{
|
{
|
||||||
DeviceUpdateLEDs();
|
DeviceUpdateLEDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RGBController_ColorfulTuringGPU::DeviceSaveMode()
|
||||||
|
{
|
||||||
|
switch(modes[active_mode].value)
|
||||||
|
{
|
||||||
|
case COLORFUL_TURING_GPU_RGB_MODE_STATIC:
|
||||||
|
controller->SetDirect(colors[0], true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
DeviceUpdateLEDs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ public:
|
||||||
void UpdateZoneLEDs(int zone);
|
void UpdateZoneLEDs(int zone);
|
||||||
void UpdateSingleLED(int led);
|
void UpdateSingleLED(int led);
|
||||||
void DeviceUpdateMode();
|
void DeviceUpdateMode();
|
||||||
|
void DeviceSaveMode();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ColorfulTuringGPUController* controller;
|
ColorfulTuringGPUController* controller;
|
||||||
|
|
|
||||||
|
|
@ -296,6 +296,7 @@
|
||||||
| Colorful Sub-Device IDs |
|
| Colorful Sub-Device IDs |
|
||||||
\*-----------------------------------------------------*/
|
\*-----------------------------------------------------*/
|
||||||
#define COLORFUL_IGAME_RTX_2070_SUPER_ADVANCED_OCV 0X1401
|
#define COLORFUL_IGAME_RTX_2070_SUPER_ADVANCED_OCV 0X1401
|
||||||
|
#define COLORFUL_IGAME_RTX_2070_SUPER_ADVANCED_OCV2 0X140A
|
||||||
#define COLORFUL_IGAME_RTX_3060_ADVANCED_OC_12G_LV 0x140A
|
#define COLORFUL_IGAME_RTX_3060_ADVANCED_OC_12G_LV 0x140A
|
||||||
#define COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G 0x150A
|
#define COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G 0x150A
|
||||||
#define COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G_2 0x1501
|
#define COLORFUL_IGAME_RTX_3060_ULTRAW_OC_12G_2 0x1501
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue