From f4dc9862f5018d65aaef41757e46779df26bcf54 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Fri, 24 Jan 2020 00:23:37 -0600 Subject: [PATCH] Add delay to improve Corsair Pro detection, default modes to down instead of left, clean up Wraith Prism initialization --- .../AMDWraithPrismController.cpp | 4 ++-- .../CorsairProControllerDetect.cpp | 13 +++++++++++++ RGBController/RGBController_CorsairPro.cpp | 6 +++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Controllers/AMDWraithPrismController/AMDWraithPrismController.cpp b/Controllers/AMDWraithPrismController/AMDWraithPrismController.cpp index b67e01f50..9a99a6a90 100644 --- a/Controllers/AMDWraithPrismController/AMDWraithPrismController.cpp +++ b/Controllers/AMDWraithPrismController/AMDWraithPrismController.cpp @@ -20,17 +20,17 @@ AMDWraithPrismController::AMDWraithPrismController(libusb_device_handle* dev_han current_fan_mode = AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC; current_fan_speed = 0x00; + current_fan_random_color = false; current_logo_mode = AMD_WRAITH_PRISM_FAN_LOGO_MODE_STATIC; current_logo_speed = 0x00; + current_logo_random_color = false; current_ring_mode = AMD_WRAITH_PRISM_EFFECT_CHANNEL_STATIC; current_ring_speed = 0x00; current_ring_direction = false; SendEnableCommand(); - SetRingEffectChannel(0x00); - SendApplyCommand(); } AMDWraithPrismController::~AMDWraithPrismController() diff --git a/Controllers/CorsairProController/CorsairProControllerDetect.cpp b/Controllers/CorsairProController/CorsairProControllerDetect.cpp index f19b154dd..28b4f6840 100644 --- a/Controllers/CorsairProController/CorsairProControllerDetect.cpp +++ b/Controllers/CorsairProController/CorsairProControllerDetect.cpp @@ -6,6 +6,17 @@ #include #include +#ifdef WIN32 +#include +#else +#include + +static void Sleep(unsigned int milliseconds) +{ + usleep(1000 * milliseconds); +} +#endif + /******************************************************************************************\ * * * TestForCorsairProController * @@ -53,6 +64,8 @@ bool TestForCorsairProController(i2c_smbus_interface* bus, unsigned char address } } + Sleep(10); + return(pass); } /* TestForCorsairProController() */ diff --git a/RGBController/RGBController_CorsairPro.cpp b/RGBController/RGBController_CorsairPro.cpp index 597e19193..975ed509c 100644 --- a/RGBController/RGBController_CorsairPro.cpp +++ b/RGBController/RGBController_CorsairPro.cpp @@ -127,7 +127,7 @@ RGBController_CorsairPro::RGBController_CorsairPro(CorsairProController* corsair RainbowWave.speed_max = CORSAIR_PRO_SPEED_FAST; RainbowWave.random = false; RainbowWave.speed = CORSAIR_PRO_SPEED_SLOW; - RainbowWave.direction = MODE_DIRECTION_LEFT; + RainbowWave.direction = MODE_DIRECTION_DOWN; modes.push_back(RainbowWave); mode ColorWave; @@ -138,7 +138,7 @@ RGBController_CorsairPro::RGBController_CorsairPro(CorsairProController* corsair ColorWave.speed_max = CORSAIR_PRO_SPEED_FAST; ColorWave.random = false; ColorWave.speed = CORSAIR_PRO_SPEED_SLOW; - ColorWave.direction = MODE_DIRECTION_LEFT; + ColorWave.direction = MODE_DIRECTION_DOWN; modes.push_back(ColorWave); mode Visor; @@ -160,7 +160,7 @@ RGBController_CorsairPro::RGBController_CorsairPro(CorsairProController* corsair Rain.speed_max = CORSAIR_PRO_SPEED_FAST; Rain.random = false; Rain.speed = CORSAIR_PRO_SPEED_SLOW; - Rain.direction = MODE_DIRECTION_LEFT; + Rain.direction = MODE_DIRECTION_DOWN; modes.push_back(Rain); mode Marquee;