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

@@ -16,9 +16,9 @@ x11 = ["slint/backend-winit-x11"]
tokio-debug = ["console-subscriber"]
[dependencies]
console-subscriber = { version = "0.2.0", optional = true }
console-subscriber = { version = "^0.4", optional = true }
nix = { version = "^0.28.0", features = ["fs"] }
nix = { version = "^0.29.0", features = ["fs"] }
tempfile = "3.3.0"
betrayer = { version = "0.2.0" }

View File

@@ -65,6 +65,7 @@ impl From<PowerZones> for SlintPowerZones {
PowerZones::Lid => SlintPowerZones::Lid,
PowerZones::RearGlow => SlintPowerZones::RearGlow,
PowerZones::KeyboardAndLightbar => SlintPowerZones::KeyboardAndLightbar,
PowerZones::Ally => SlintPowerZones::Ally,
PowerZones::None => SlintPowerZones::Keyboard,
}
}
@@ -79,6 +80,7 @@ impl From<SlintPowerZones> for PowerZones {
SlintPowerZones::Lid => PowerZones::Lid,
SlintPowerZones::RearGlow => PowerZones::RearGlow,
SlintPowerZones::KeyboardAndLightbar => PowerZones::KeyboardAndLightbar,
SlintPowerZones::Ally => PowerZones::Ally,
}
}
}
@@ -151,6 +153,7 @@ impl From<SlintDeviceType> for AuraDeviceType {
SlintDeviceType::Tuf => Self::LaptopTuf,
SlintDeviceType::ScsiExtDisk => Self::ScsiExtDisk,
SlintDeviceType::Unknown => Self::Unknown,
SlintDeviceType::Ally => Self::Ally,
}
}
}
@@ -163,6 +166,7 @@ impl From<AuraDeviceType> for SlintDeviceType {
AuraDeviceType::LaptopTuf => SlintDeviceType::Tuf,
AuraDeviceType::ScsiExtDisk => SlintDeviceType::ScsiExtDisk,
AuraDeviceType::Unknown => SlintDeviceType::Unknown,
AuraDeviceType::Ally => SlintDeviceType::Ally,
}
}
}

View File

@@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-08-26 05:52+0000\n"
"POT-Creation-Date: 2024-08-26 07:16+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -4,6 +4,7 @@ export enum AuraDevType {
Tuf,
ScsiExtDisk,
Unknown,
Ally,
}
export struct AuraEffect {
@@ -28,6 +29,7 @@ export enum PowerZones {
Lid,
RearGlow,
KeyboardAndLightbar,
Ally,
}
export struct AuraPowerState {
@@ -52,6 +54,7 @@ export global AuraPageData {
@tr("Aura power zone" => "Lid"),
@tr("Aura power zone" => "Rear Glow"),
@tr("Aura power zone" => "Keyboard and Lightbar"),
@tr("Aura power zone" => "Ally"),
];
// Exists only for the older 0x1866 keybaords. On page setup it must
// be set to match the supported_power_zones