add version to Asus Throne

This commit is contained in:
Mola19 2021-10-29 02:00:59 +02:00 committed by Adam Honse
parent f779388794
commit 4223cd97b9
3 changed files with 22 additions and 2 deletions

View file

@ -43,6 +43,24 @@ std::string AuraHeadsetStandController::GetSerialString()
return(return_string);
}
std::string AuraHeadsetStandController::GetVersion()
{
unsigned char usb_buf[65];
memset(usb_buf, 0x00, sizeof(usb_buf));
usb_buf[0x00] = 0x00;
usb_buf[0x01] = 0x12;
usb_buf[0x02] = 0x00;
hid_write(dev, usb_buf, 65);
unsigned char usb_buf_out[65];
hid_read(dev, usb_buf_out, 65);
char version[5];
snprintf(version, 5, "%04X", (usb_buf_out[6] << 8) | usb_buf_out[7]);
return std::string(version);
}
void AuraHeadsetStandController::UpdateLeds
(
std::vector<RGBColor> colors

View file

@ -37,6 +37,7 @@ public:
std::string GetDeviceLocation();
std::string GetSerialString();
std::string GetVersion();
void UpdateLeds
(

View file

@ -17,6 +17,7 @@ RGBController_AuraHeadsetStand::RGBController_AuraHeadsetStand(AuraHeadsetStandC
vendor = "ASUS";
type = DEVICE_TYPE_HEADSET_STAND;
description = "ASUS Aura Headset Stand Device";
version = aura->GetVersion();
location = aura->GetDeviceLocation();
serial = aura->GetSerialString();
@ -57,7 +58,7 @@ RGBController_AuraHeadsetStand::RGBController_AuraHeadsetStand(AuraHeadsetStandC
modes.push_back(Breathing);
mode Strobing;
Strobing.name = "Strobing";
Strobing.name = "Flashing";
Strobing.value = AURA_HEADSET_STAND_MODE_STROBING;
Strobing.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Strobing.brightness_min = AURA_HEADSETSTAND_BRIGHTNESS_MIN;
@ -83,7 +84,7 @@ RGBController_AuraHeadsetStand::RGBController_AuraHeadsetStand(AuraHeadsetStandC
modes.push_back(SpectrumCycle);
mode Rainbow;
Rainbow.name = "Rainbow";
Rainbow.name = "Rainbow Wave";
Rainbow.value = AURA_HEADSET_STAND_MODE_RAINBOW;
Rainbow.flags = MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
Rainbow.speed_min = AURA_HEADSETSTAND_SPEED_MIN;