Add delay to improve Corsair Pro detection, default modes to down instead of left, clean up Wraith Prism initialization

This commit is contained in:
Adam Honse committed 2020-01-24 00:23:37 -06:00
1 parent fb3690127c
commit f4dc9862f5
3 files changed
+18 -5

No files matched your search

@@ -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()
@@ -6,6 +6,17 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef WIN32
#include <Windows.h>
#else
#include <unistd.h>
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() */
+3 -3
View File
@@ -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;