mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-18 11:35:21 -04:00
Add support for ROG Gladius II mouse
This commit is contained in:
@@ -19,6 +19,7 @@ enum
|
||||
{
|
||||
AURA_MOUSE_ZONE_LOGO = 0,
|
||||
AURA_MOUSE_ZONE_SCROLL = 1,
|
||||
AURA_MOUSE_ZONE_UNDERGLOW = 2,
|
||||
AURA_MOUSE_ZONE_ALL = 3,
|
||||
};
|
||||
|
||||
|
||||
@@ -18,10 +18,13 @@
|
||||
#define AURA_MOTHERBOARD_1_PID 0x18F3
|
||||
#define AURA_MOTHERBOARD_2_PID 0x1939
|
||||
#define AURA_ROG_GLADIUS_II_CORE_PID 0x18DD
|
||||
#define AURA_ROG_GLADIUS_II_PID 0x1845
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned short usb_vid;
|
||||
unsigned short usb_pid;
|
||||
unsigned short usb_interface;
|
||||
const char * name;
|
||||
} aura_device;
|
||||
|
||||
@@ -29,32 +32,33 @@ typedef struct
|
||||
|
||||
static const aura_device addressable_device_list[] =
|
||||
{
|
||||
/*-----------------------------------------------------------------------------*\
|
||||
| ASUS AURA Addressable |
|
||||
\*-----------------------------------------------------------------------------*/
|
||||
{ AURA_USB_VID, AURA_TERMINAL_PID, "ASUS ROG AURA Terminal" },
|
||||
{ AURA_USB_VID, AURA_ADDRESSABLE_1_PID, "ASUS Aura Addressable" },
|
||||
{ AURA_USB_VID, AURA_ADDRESSABLE_2_PID, "ASUS Aura Addressable" },
|
||||
{ AURA_USB_VID, AURA_ADDRESSABLE_3_PID, "ASUS Aura Addressable" },
|
||||
{ AURA_USB_VID, AURA_ADDRESSABLE_4_PID, "ASUS Aura Addressable" },
|
||||
/*---------------------------------------------------------------------------------*\
|
||||
| ASUS AURA Addressable |
|
||||
\*---------------------------------------------------------------------------------*/
|
||||
{ AURA_USB_VID, AURA_TERMINAL_PID, 0, "ASUS ROG AURA Terminal" },
|
||||
{ AURA_USB_VID, AURA_ADDRESSABLE_1_PID, 0, "ASUS Aura Addressable" },
|
||||
{ AURA_USB_VID, AURA_ADDRESSABLE_2_PID, 0, "ASUS Aura Addressable" },
|
||||
{ AURA_USB_VID, AURA_ADDRESSABLE_3_PID, 0, "ASUS Aura Addressable" },
|
||||
{ AURA_USB_VID, AURA_ADDRESSABLE_4_PID, 0, "ASUS Aura Addressable" },
|
||||
};
|
||||
|
||||
#define MOTHERBOARD_NUM_DEVICES (sizeof(motherboard_device_list) / sizeof(motherboard_device_list[ 0 ]))
|
||||
|
||||
static const aura_device motherboard_device_list[] =
|
||||
{
|
||||
/*-----------------------------------------------------------------------------*\
|
||||
| ASUS AURA Motherboard |
|
||||
\*-----------------------------------------------------------------------------*/
|
||||
{ AURA_USB_VID, AURA_MOTHERBOARD_1_PID, "ASUS Aura Motherboard" },
|
||||
{ AURA_USB_VID, AURA_MOTHERBOARD_2_PID, "ASUS Aura Motherboard" },
|
||||
/*---------------------------------------------------------------------------------*\
|
||||
| ASUS AURA Motherboard |
|
||||
\*---------------------------------------------------------------------------------*/
|
||||
{ AURA_USB_VID, AURA_MOTHERBOARD_1_PID, 0, "ASUS Aura Motherboard" },
|
||||
{ AURA_USB_VID, AURA_MOTHERBOARD_2_PID, 0, "ASUS Aura Motherboard" },
|
||||
};
|
||||
|
||||
#define MOUSE_NUM_DEVICES (sizeof(mouse_device_list) / sizeof(mouse_device_list[ 0 ]))
|
||||
|
||||
static const aura_device mouse_device_list[] =
|
||||
{
|
||||
{ AURA_USB_VID, AURA_ROG_GLADIUS_II_CORE_PID, "ASUS ROG Gladius II Core" },
|
||||
{ AURA_USB_VID, AURA_ROG_GLADIUS_II_CORE_PID, 0, "ASUS ROG Gladius II Core" },
|
||||
{ AURA_USB_VID, AURA_ROG_GLADIUS_II_PID, 2, "ASUS ROG Gladius II" },
|
||||
};
|
||||
|
||||
void DetectAuraUSBControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
@@ -138,10 +142,10 @@ void DetectAuraUSBControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
if((info->vendor_id == mouse_device_list[pid_idx].usb_vid)
|
||||
&&(info->product_id == mouse_device_list[pid_idx].usb_pid)
|
||||
#ifdef USE_HID_USAGE
|
||||
&&(info->interface_number == 0 )
|
||||
&&(info->interface_number == mouse_device_list[pid_idx].usb_interface )
|
||||
&&(info->usage_page == 0xFF01))
|
||||
#else
|
||||
&&(info->interface_number == 0 ))
|
||||
&&(info->interface_number == mouse_device_list[pid_idx].usb_interface ))
|
||||
#endif
|
||||
{
|
||||
dev = hid_open_path(info->path);
|
||||
|
||||
@@ -90,6 +90,23 @@ void RGBController_AuraMouse::SetupZones()
|
||||
|
||||
leds.push_back(scroll_led);
|
||||
|
||||
zone underglow_zone;
|
||||
|
||||
underglow_zone.name = "Underglow";
|
||||
underglow_zone.type = ZONE_TYPE_SINGLE;
|
||||
underglow_zone.leds_min = 1;
|
||||
underglow_zone.leds_max = 1;
|
||||
underglow_zone.leds_count = 1;
|
||||
underglow_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(underglow_zone);
|
||||
|
||||
led underglow_led;
|
||||
|
||||
underglow_led.name = "Underglow";
|
||||
|
||||
leds.push_back(underglow_led);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
@@ -124,7 +141,7 @@ void RGBController_AuraMouse::UpdateSingleLED(int led)
|
||||
|
||||
aura->SendUpdate(AURA_MOUSE_ZONE_LOGO, modes[active_mode].value, red, grn, blu);
|
||||
}
|
||||
else
|
||||
else if(led == 1)
|
||||
{
|
||||
red = RGBGetRValue(colors[led]);
|
||||
grn = RGBGetGValue(colors[led]);
|
||||
@@ -132,6 +149,14 @@ void RGBController_AuraMouse::UpdateSingleLED(int led)
|
||||
|
||||
aura->SendUpdate(AURA_MOUSE_ZONE_SCROLL, modes[active_mode].value, red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
red = RGBGetRValue(colors[led]);
|
||||
grn = RGBGetGValue(colors[led]);
|
||||
blu = RGBGetBValue(colors[led]);
|
||||
|
||||
aura->SendUpdate(AURA_MOUSE_ZONE_UNDERGLOW, modes[active_mode].value, red, grn, blu);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -163,6 +188,12 @@ void RGBController_AuraMouse::DeviceUpdateMode()
|
||||
blu = RGBGetBValue(colors[1]);
|
||||
|
||||
aura->SendUpdate(AURA_MOUSE_ZONE_SCROLL, modes[active_mode].value, red, grn, blu);
|
||||
|
||||
red = RGBGetRValue(colors[2]);
|
||||
grn = RGBGetGValue(colors[2]);
|
||||
blu = RGBGetBValue(colors[2]);
|
||||
|
||||
aura->SendUpdate(AURA_MOUSE_ZONE_UNDERGLOW, modes[active_mode].value, red, grn, blu);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user