mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-07-10 05:15:10 -04:00
Changes made to RGBFusion2USBController for issue 588
Other code cleanup removed by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
@@ -239,7 +239,7 @@ void RGBController_RGBFusion2USB::SetupZones()
|
||||
|
||||
if (!boolSingleLED)
|
||||
{
|
||||
controller->SetLedCount(zones[zone_idx].leds_count);
|
||||
controller->SetLedCount(zl->second.at(0).header, zones[zone_idx].leds_count);
|
||||
controller->DisableBuiltinEffect(0, 0x3);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,10 +111,10 @@ void RGBFusion2USBController::SetCalibration()
|
||||
SendPacket(buffer);
|
||||
}
|
||||
|
||||
void RGBFusion2USBController::SetLedCount(unsigned int count)
|
||||
void RGBFusion2USBController::SetLedCount(unsigned int led, unsigned int count)
|
||||
{
|
||||
LEDCount s0 = LedCountToEnum(count);
|
||||
SendPacket(0x34, s0 | (s0 << 4)); // D_LED1 | D_LED2
|
||||
led == HDR_D_LED1_RGB ? D_LED1_count = LedCountToEnum(count) : D_LED1_count = LedCountToEnum(count);
|
||||
SendPacket(0x34, D_LED1_count | (D_LED2_count << 4));
|
||||
}
|
||||
|
||||
bool RGBFusion2USBController::DisableBuiltinEffect(int enable_bit, int mask)
|
||||
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
);
|
||||
|
||||
void SetLEDEffect(unsigned int led, int mode, unsigned int speed, bool random, unsigned char red, unsigned char green, unsigned char blue);
|
||||
void SetLedCount(unsigned int count);
|
||||
void SetLedCount(unsigned int led, unsigned int count);
|
||||
void SetMode(int mode);
|
||||
bool ApplyEffect();
|
||||
bool DisableBuiltinEffect(int enable_bit, int mask);
|
||||
@@ -195,4 +195,6 @@ private:
|
||||
std::string chip_id;
|
||||
int effect_disabled = 0;
|
||||
int report_id = 0xCC;
|
||||
LEDCount D_LED1_count;
|
||||
LEDCount D_LED2_count;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user