Finish AMD Wraith Prism mode updates including working speed table, working random color flag, and appropriate fan/logo modes for ring-specific effects

This commit is contained in:
Adam Honse committed 2020-01-23 23:27:35 -06:00
1 parent 79f0137440
commit fb3690127c
3 files changed
+45 -5

No files matched your search

@@ -129,7 +129,7 @@ std::string AMDWraithPrismController::GetFirmwareVersionString()
void AMDWraithPrismController::SetFanMode(unsigned char mode, unsigned char speed, bool random_color)
{
current_fan_mode = mode;
current_fan_speed = speed_values_fan_logo[speed][mode];
current_fan_speed = speed_values_fan_logo[mode][speed];
current_fan_random_color = random_color;
}
@@ -152,7 +152,7 @@ void AMDWraithPrismController::SetFanColor(unsigned char red, unsigned char gree
void AMDWraithPrismController::SetLogoMode(unsigned char mode, unsigned char speed, bool random_color)
{
current_logo_mode = mode;
current_logo_speed = speed_values_fan_logo[speed][mode];
current_logo_speed = speed_values_fan_logo[mode][speed];
current_logo_random_color = random_color;
}
@@ -175,7 +175,7 @@ void AMDWraithPrismController::SetLogoColor(unsigned char red, unsigned char gre
void AMDWraithPrismController::SetRingMode(unsigned char mode, unsigned char speed, bool direction, bool random_color)
{
current_ring_mode = mode;
current_ring_speed = speed_values_ring[speed][mode];
current_ring_speed = speed_values_ring[mode][speed];
current_ring_direction = direction;
current_ring_random_color = random_color;
}
@@ -22,6 +22,7 @@ static const unsigned char max_brightness_fan_logo[] =
static const unsigned char speed_values_fan_logo[][5] =
{
{ 0x00, 0x00, 0x00, 0x00, 0x00 }, /* */
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, /* Static */
{ 0x96, 0x8C, 0x80, 0x6E, 0x68 }, /* Color Cycle */
{ 0x3C, 0x37, 0x31, 0x2C, 0x26 }, /* Breathing */
+41 -2
View File
@@ -51,6 +51,36 @@ RGBController_AMDWraithPrism::RGBController_AMDWraithPrism(AMDWraithPrismControl
Rainbow.speed = AMD_WRAITH_PRISM_SPEED_NORMAL;
modes.push_back(Rainbow);
mode Bounce;
Bounce.name = "Bounce";
Bounce.value = AMD_WRAITH_PRISM_EFFECT_CHANNEL_BOUNCE;
Bounce.flags = MODE_FLAG_HAS_SPEED;
Bounce.speed_min = AMD_WRAITH_PRISM_SPEED_SLOWEST;
Bounce.speed_max = AMD_WRAITH_PRISM_SPEED_FASTEST;
Bounce.random = true;
Bounce.speed = AMD_WRAITH_PRISM_SPEED_NORMAL;
modes.push_back(Bounce);
mode Chase;
Chase.name = "Chase";
Chase.value = AMD_WRAITH_PRISM_EFFECT_CHANNEL_CHASE;
Chase.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_COLOR | MODE_FLAG_PER_LED_COLOR | MODE_FLAG_RANDOM_COLOR;
Chase.speed_min = AMD_WRAITH_PRISM_SPEED_SLOWEST;
Chase.speed_max = AMD_WRAITH_PRISM_SPEED_FASTEST;
Chase.random = false;
Chase.speed = AMD_WRAITH_PRISM_SPEED_NORMAL;
modes.push_back(Chase);
mode Swirl;
Swirl.name = "Swirl";
Swirl.value = AMD_WRAITH_PRISM_EFFECT_CHANNEL_SWIRL;
Swirl.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_COLOR | MODE_FLAG_PER_LED_COLOR | MODE_FLAG_RANDOM_COLOR;
Swirl.speed_min = AMD_WRAITH_PRISM_SPEED_SLOWEST;
Swirl.speed_max = AMD_WRAITH_PRISM_SPEED_FASTEST;
Swirl.random = false;
Swirl.speed = AMD_WRAITH_PRISM_SPEED_NORMAL;
modes.push_back(Swirl);
led logo_led;
logo_led.name = "Logo";
leds.push_back(logo_led);
@@ -109,6 +139,7 @@ void RGBController_AMDWraithPrism::SetMode(int mode)
{
case AMD_WRAITH_PRISM_EFFECT_CHANNEL_COLOR_CYCLE:
case AMD_WRAITH_PRISM_EFFECT_CHANNEL_RAINBOW:
case AMD_WRAITH_PRISM_EFFECT_CHANNEL_BOUNCE:
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[mode].speed, modes[mode].random);
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[mode].speed, modes[mode].random);
break;
@@ -119,8 +150,16 @@ void RGBController_AMDWraithPrism::SetMode(int mode)
break;
default:
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC, modes[mode].speed, modes[mode].random);
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC, modes[mode].speed, modes[mode].random);
if(modes[mode].random)
{
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[mode].speed, modes[mode].random);
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_COLOR_CYCLE, modes[mode].speed, modes[mode].random);
}
else
{
wraith->SetFanMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC, modes[mode].speed, modes[mode].random);
wraith->SetLogoMode(AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC, modes[mode].speed, modes[mode].random);
}
break;
}