mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-19 03:56:26 -04:00
LED ID correction and zone fix for Basilisk V3
* Change LED ID to 0 * Swap Logo and Scroll Wheel Zone order * Created `SupportsBreathing()` function to allow removal of hardware mode for the Basilisk V3
This commit is contained in:
@@ -43,18 +43,21 @@ RGBController_Razer::RGBController_Razer(RazerController* controller_ptr)
|
||||
Static.brightness = 255;
|
||||
modes.push_back(Static);
|
||||
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = RAZER_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.colors.resize(1);
|
||||
Breathing.brightness_min = 0;
|
||||
Breathing.brightness_max = 255;
|
||||
Breathing.brightness = 255;
|
||||
modes.push_back(Breathing);
|
||||
if(controller->SupportsBreathing())
|
||||
{
|
||||
mode Breathing;
|
||||
Breathing.name = "Breathing";
|
||||
Breathing.value = RAZER_MODE_BREATHING;
|
||||
Breathing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_BRIGHTNESS;
|
||||
Breathing.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Breathing.colors_min = 1;
|
||||
Breathing.colors_max = 2;
|
||||
Breathing.colors.resize(1);
|
||||
Breathing.brightness_min = 0;
|
||||
Breathing.brightness_max = 255;
|
||||
Breathing.brightness = 255;
|
||||
modes.push_back(Breathing);
|
||||
}
|
||||
|
||||
mode SpectrumCycle;
|
||||
SpectrumCycle.name = "Spectrum Cycle";
|
||||
|
||||
@@ -110,6 +110,7 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
|
||||
\*-----------------------------------------------------------------*/
|
||||
switch(dev_pid)
|
||||
{
|
||||
case RAZER_BASILISK_V3_PID:
|
||||
case RAZER_BASE_STATION_CHROMA_PID:
|
||||
case RAZER_BASE_STATION_V2_CHROMA_PID:
|
||||
case RAZER_CHARGING_PAD_CHROMA_PID:
|
||||
@@ -446,6 +447,30 @@ void RazerController::SetModeWave(unsigned char direction)
|
||||
razer_set_mode_wave(direction);
|
||||
}
|
||||
|
||||
bool RazerController::SupportsBreathing()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Breathing Mode is assumed as supported in hardware |
|
||||
| Add PIDs only for devices that DO NOT support the |
|
||||
| hardware breathing mode i.e. Packet captures show |
|
||||
| software driving the basic `Breathing` mode |
|
||||
\*-----------------------------------------------------*/
|
||||
bool supports_breathing = true;
|
||||
|
||||
switch(dev_pid)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Mice |
|
||||
\*-----------------------------------------------------*/
|
||||
case RAZER_BASILISK_V3_PID:
|
||||
|
||||
supports_breathing = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return(supports_breathing);
|
||||
}
|
||||
|
||||
bool RazerController::SupportsReactive()
|
||||
{
|
||||
return(false);
|
||||
|
||||
@@ -182,6 +182,7 @@ public:
|
||||
void SetModeStatic(unsigned char red, unsigned char grn, unsigned char blu);
|
||||
void SetModeWave(unsigned char direction);
|
||||
|
||||
bool SupportsBreathing();
|
||||
bool SupportsReactive();
|
||||
bool SupportsWave();
|
||||
|
||||
|
||||
@@ -5102,8 +5102,8 @@ static const razer_device basilisk_v3_device =
|
||||
1,
|
||||
11,
|
||||
{
|
||||
&basilisk_v3_scroll_wheel_zone,
|
||||
&basilisk_v3_logo_zone,
|
||||
&basilisk_v3_scroll_wheel_zone,
|
||||
&basilisk_v3_ledstrip_zone,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
Reference in New Issue
Block a user