diff --git a/Controllers/HyperXDRAMController/HyperXDRAMController.cpp b/Controllers/HyperXDRAMController/HyperXDRAMController.cpp index 00629b89..77f7cb8c 100644 --- a/Controllers/HyperXDRAMController/HyperXDRAMController.cpp +++ b/Controllers/HyperXDRAMController/HyperXDRAMController.cpp @@ -76,6 +76,12 @@ unsigned int HyperXDRAMController::GetMode() return(mode); } +void HyperXDRAMController::SendApply() +{ + bus->i2c_smbus_write_byte_data(dev, HYPERX_REG_APPLY, 0x02); + bus->i2c_smbus_write_byte_data(dev, HYPERX_REG_APPLY, 0x03); +} + void HyperXDRAMController::SetEffectColor(unsigned char red, unsigned char green, unsigned char blue) { bus->i2c_smbus_write_byte_data(dev, HYPERX_REG_APPLY, 0x01); @@ -179,9 +185,6 @@ void HyperXDRAMController::SetLEDColor(unsigned int slot, unsigned int led, unsi bus->i2c_smbus_write_byte_data(dev, green_base + (3 * led), green); bus->i2c_smbus_write_byte_data(dev, blue_base + (3 * led), blue ); bus->i2c_smbus_write_byte_data(dev, bright_base + (3 * led), 0x64 ); - - bus->i2c_smbus_write_byte_data(dev, HYPERX_REG_APPLY, 0x02); - bus->i2c_smbus_write_byte_data(dev, HYPERX_REG_APPLY, 0x03); } void HyperXDRAMController::SetMode(unsigned char new_mode, bool random, unsigned short new_speed) diff --git a/Controllers/HyperXDRAMController/HyperXDRAMController.h b/Controllers/HyperXDRAMController/HyperXDRAMController.h index 3792fbe3..910e0e80 100644 --- a/Controllers/HyperXDRAMController/HyperXDRAMController.h +++ b/Controllers/HyperXDRAMController/HyperXDRAMController.h @@ -212,8 +212,11 @@ public: unsigned int GetLEDCount(); unsigned int GetSlotCount(); unsigned int GetMode(); - void SetMode(unsigned char new_mode, bool random, unsigned short new_speed); + void SendApply(); + + void SetMode(unsigned char new_mode, bool random, unsigned short new_speed); + void SetAllColors(unsigned char red, unsigned char green, unsigned char blue); void SetEffectColor(unsigned char red, unsigned char green, unsigned char blue); void SetLEDColor(unsigned int led, unsigned char red, unsigned char green, unsigned char blue); diff --git a/Controllers/HyperXDRAMController/RGBController_HyperXDRAM.cpp b/Controllers/HyperXDRAMController/RGBController_HyperXDRAM.cpp index 7eaed359..f019f8a5 100644 --- a/Controllers/HyperXDRAMController/RGBController_HyperXDRAM.cpp +++ b/Controllers/HyperXDRAMController/RGBController_HyperXDRAM.cpp @@ -181,6 +181,7 @@ void RGBController_HyperXDRAM::DeviceUpdateLEDs() unsigned char blu = RGBGetBValue(color); hyperx->SetLEDColor(led_idx, red, grn, blu); } + hyperx->SendApply(); } else { @@ -204,6 +205,7 @@ void RGBController_HyperXDRAM::UpdateZoneLEDs(int zone) unsigned char blu = RGBGetBValue(color); hyperx->SetLEDColor(led, red, grn, blu); } + hyperx->SendApply(); } else { @@ -229,6 +231,7 @@ void RGBController_HyperXDRAM::UpdateSingleLED(int led) { hyperx->SetEffectColor(red, grn, blu); } + hyperx->SendApply(); } void RGBController_HyperXDRAM::SetCustomMode()