Update AMD Wraith Prism controller to new RGBController API

master
Adam Honse 6 years ago
parent 7c1c9a7979
commit f806f3ad66

@ -331,7 +331,7 @@ void DetectRGBControllers(void)
//DetectHue2Controllers(rgb_controllers); //DetectHue2Controllers(rgb_controllers);
//DetectHuePlusControllers(rgb_controllers); //DetectHuePlusControllers(rgb_controllers);
//DetectAMDWraithPrismControllers(rgb_controllers); DetectAMDWraithPrismControllers(rgb_controllers);
//DetectMSI3ZoneControllers(rgb_controllers); //DetectMSI3ZoneControllers(rgb_controllers);
//DetectPoseidonZRGBControllers(rgb_controllers); //DetectPoseidonZRGBControllers(rgb_controllers);
//DetectHyperXKeyboardControllers(rgb_controllers); //DetectHyperXKeyboardControllers(rgb_controllers);

@ -29,7 +29,7 @@ INCLUDEPATH += \
net_port/ \ net_port/ \
serial_port/ \ serial_port/ \
super_io/ \ super_io/ \
# Controllers/AMDWraithPrismController/ \ Controllers/AMDWraithPrismController/ \
Controllers/AuraController/ \ Controllers/AuraController/ \
# Controllers/AuraGPUController/ \ # Controllers/AuraGPUController/ \
# Controllers/CorsairController/ \ # Controllers/CorsairController/ \
@ -75,8 +75,8 @@ SOURCES += \
qt/hsv.cpp \ qt/hsv.cpp \
serial_port/serial_port.cpp \ serial_port/serial_port.cpp \
super_io/super_io.cpp \ super_io/super_io.cpp \
# Controllers/AMDWraithPrismController/AMDWraithPrismController.cpp \ Controllers/AMDWraithPrismController/AMDWraithPrismController.cpp \
# Controllers/AMDWraithPrismController/AMDWraithPrismControllerDetect.cpp \ Controllers/AMDWraithPrismController/AMDWraithPrismControllerDetect.cpp \
Controllers/AuraController/AuraController.cpp \ Controllers/AuraController/AuraController.cpp \
Controllers/AuraController/AuraControllerDetect.cpp \ Controllers/AuraController/AuraControllerDetect.cpp \
# Controllers/AuraGPUController/AuraGPUController.cpp \ # Controllers/AuraGPUController/AuraGPUController.cpp \
@ -121,7 +121,7 @@ SOURCES += \
Controllers/ThermaltakeRiingController/ThermaltakeRiingControllerDetect.cpp \ Controllers/ThermaltakeRiingController/ThermaltakeRiingControllerDetect.cpp \
RGBController/RGBController.cpp \ RGBController/RGBController.cpp \
# RGBController/E131ControllerDetect.cpp \ # RGBController/E131ControllerDetect.cpp \
# RGBController/RGBController_AMDWraithPrism.cpp \ RGBController/RGBController_AMDWraithPrism.cpp \
RGBController/RGBController_Aura.cpp \ RGBController/RGBController_Aura.cpp \
# RGBController/RGBController_AuraGPU.cpp \ # RGBController/RGBController_AuraGPU.cpp \
# RGBController/RGBController_Corsair.cpp \ # RGBController/RGBController_Corsair.cpp \

@ -84,49 +84,66 @@ RGBController_AMDWraithPrism::RGBController_AMDWraithPrism(AMDWraithPrismControl
Swirl.speed = AMD_WRAITH_PRISM_SPEED_NORMAL; Swirl.speed = AMD_WRAITH_PRISM_SPEED_NORMAL;
modes.push_back(Swirl); modes.push_back(Swirl);
led logo_led; SetupZones();
logo_led.name = "Logo"; }
leds.push_back(logo_led);
colors.push_back(0x00000000); RGBController_AMDWraithPrism::~RGBController_AMDWraithPrism()
{
}
void RGBController_AMDWraithPrism::SetupZones()
{
/*---------------------------------------------------------*\
| Set up zones |
\*---------------------------------------------------------*/
zone logo_zone; zone logo_zone;
logo_zone.name = "Logo"; logo_zone.name = "Logo";
logo_zone.type = ZONE_TYPE_SINGLE; logo_zone.type = ZONE_TYPE_SINGLE;
std::vector<int> logo_zone_map; logo_zone.leds_min = 1;
logo_zone_map.push_back(0); logo_zone.leds_max = 1;
logo_zone.map.push_back(logo_zone_map); logo_zone.leds_count = 1;
zones.push_back(logo_zone); zones.push_back(logo_zone);
led fan_led;
fan_led.name = "Fan";
leds.push_back(fan_led);
colors.push_back(0x00000000);
zone fan_zone; zone fan_zone;
fan_zone.name = "Fan"; fan_zone.name = "Fan";
fan_zone.type = ZONE_TYPE_SINGLE; fan_zone.type = ZONE_TYPE_SINGLE;
std::vector<int> fan_zone_map; fan_zone.leds_min = 1;
fan_zone_map.push_back(1); fan_zone.leds_max = 1;
fan_zone.map.push_back(fan_zone_map); fan_zone.leds_count = 1;
zones.push_back(fan_zone); zones.push_back(fan_zone);
zone ring_zone;
ring_zone.name = "Ring";
ring_zone.type = ZONE_TYPE_SINGLE;
ring_zone.leds_min = 1;
ring_zone.leds_max = 1;
ring_zone.leds_count = 1;
zones.push_back(ring_zone);
/*---------------------------------------------------------*\
| Set up LEDs |
\*---------------------------------------------------------*/
led logo_led;
logo_led.name = "Logo LED";
leds.push_back(logo_led);
led fan_led;
fan_led.name = "Fan LED";
leds.push_back(fan_led);
led ring_led; led ring_led;
ring_led.name = "Ring"; ring_led.name = "Ring LED";
leds.push_back(ring_led); leds.push_back(ring_led);
colors.push_back(0x00000000);
zone ring_zone; SetupColors();
ring_zone.name = "Ring";
ring_zone.type = ZONE_TYPE_SINGLE;
std::vector<int> ring_zone_map;
ring_zone_map.push_back(2);
ring_zone.map.push_back(ring_zone_map);
zones.push_back(ring_zone);
} }
RGBController_AMDWraithPrism::~RGBController_AMDWraithPrism() void RGBController_AMDWraithPrism::ResizeZone(int /*zone*/, int /*new_size*/)
{ {
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
} }
void RGBController_AMDWraithPrism::UpdateLEDs() void RGBController_AMDWraithPrism::UpdateLEDs()

@ -16,6 +16,11 @@ class RGBController_AMDWraithPrism : public RGBController
public: public:
RGBController_AMDWraithPrism(AMDWraithPrismController* wraith_ptr); RGBController_AMDWraithPrism(AMDWraithPrismController* wraith_ptr);
~RGBController_AMDWraithPrism(); ~RGBController_AMDWraithPrism();
void SetupZones();
void ResizeZone(int zone, int new_size);
void UpdateLEDs(); void UpdateLEDs();
void UpdateZoneLEDs(int zone); void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led); void UpdateSingleLED(int led);

Loading…
Cancel
Save