Add Ally 1 and X as "old" style devices for power

These have a slightly different power settings data which needs to be verified.
We can use the old style for now.

Closes #542
This commit is contained in:
Luke D. Jones
2024-08-27 11:46:09 +12:00
parent c3880d055d
commit 8f35220c5f
16 changed files with 1006 additions and 785 deletions

View File

@@ -74,6 +74,7 @@ pub enum AuraDeviceType {
LaptopPre2021 = 1,
LaptopTuf = 2,
ScsiExtDisk = 3,
Ally = 4,
Unknown = 255,
}
@@ -90,6 +91,10 @@ impl AuraDeviceType {
*self == Self::LaptopPost2021
}
pub fn is_ally(&self) -> bool {
*self == Self::Ally
}
pub fn is_scsi(&self) -> bool {
*self == Self::ScsiExtDisk
}
@@ -101,6 +106,7 @@ impl From<&str> for AuraDeviceType {
"tuf" => AuraDeviceType::LaptopTuf,
"1932" => AuraDeviceType::ScsiExtDisk,
"1866" | "18c6" | "1869" | "1854" => Self::LaptopPre2021,
"1abe" | "1b4c" => Self::Ally,
_ => Self::LaptopPost2021,
}
}
@@ -128,5 +134,7 @@ pub enum PowerZones {
RearGlow = 4,
/// Exists for the older 0x1866 models
KeyboardAndLightbar = 5,
/// Ally specific for creating correct packet
Ally = 6,
None = 255,
}