Unify the aura data more. Prep for better format

This commit is contained in:
Luke D. Jones
2024-08-30 21:29:13 +12:00
parent 8f35220c5f
commit 4a97f173be
4 changed files with 153 additions and 195 deletions

View File

@@ -3,7 +3,7 @@
device_name: "FA506I", device_name: "FA506I",
product_id: "", product_id: "",
layout_name: "fa506i", layout_name: "fa506i",
basic_modes: [Static, Breathe, RainbowCycle, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -12,7 +12,7 @@
device_name: "FA506Q", device_name: "FA506Q",
product_id: "", product_id: "",
layout_name: "fa506i", layout_name: "fa506i",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -21,7 +21,7 @@
device_name: "FA507", device_name: "FA507",
product_id: "", product_id: "",
layout_name: "fa507", layout_name: "fa507",
basic_modes: [Static, Breathe, RainbowCycle, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -30,7 +30,7 @@
device_name: "FX505", device_name: "FX505",
product_id: "", product_id: "",
layout_name: "fx505d", layout_name: "fx505d",
basic_modes: [Static, Breathe, RainbowCycle, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -39,7 +39,7 @@
device_name: "FX506", device_name: "FX506",
product_id: "", product_id: "",
layout_name: "fa506i", layout_name: "fa506i",
basic_modes: [Static, Breathe, RainbowCycle, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -48,7 +48,7 @@
device_name: "FX507Z", device_name: "FX507Z",
product_id: "", product_id: "",
layout_name: "fa506i", layout_name: "fa506i",
basic_modes: [Static, Breathe, RainbowCycle, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -57,7 +57,7 @@
device_name: "FX516P", device_name: "FX516P",
product_id: "", product_id: "",
layout_name: "fa506i", layout_name: "fa506i",
basic_modes: [Static, Breathe, RainbowCycle], basic_modes: [Static, Breathe, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -75,7 +75,7 @@
device_name: "FX705D", device_name: "FX705D",
product_id: "", product_id: "",
layout_name: "fx505d", layout_name: "fx505d",
basic_modes: [Static, Breathe, RainbowCycle, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -89,15 +89,6 @@
advanced_type: None, advanced_type: None,
power_zones: [Keyboard, Lightbar], power_zones: [Keyboard, Lightbar],
), ),
(
device_name: "G512LI",
product_id: "",
layout_name: "g512",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard, Lightbar],
),
( (
device_name: "G513I", device_name: "G513I",
product_id: "", product_id: "",
@@ -125,6 +116,15 @@
advanced_type: PerKey, advanced_type: PerKey,
power_zones: [Keyboard, Lightbar], power_zones: [Keyboard, Lightbar],
), ),
(
device_name: "G513R",
product_id: "",
layout_name: "g513i-per-key",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
basic_zones: [],
advanced_type: PerKey,
power_zones: [Keyboard, Lightbar],
),
( (
device_name: "G513RC", device_name: "G513RC",
product_id: "", product_id: "",
@@ -135,73 +135,10 @@
power_zones: [Keyboard, Lightbar], power_zones: [Keyboard, Lightbar],
), ),
( (
device_name: "G513RM", device_name: "G531G",
product_id: "",
layout_name: "g513i",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [Key1, Key2, Key3, Key4],
advanced_type: None,
power_zones: [Keyboard, Lightbar],
),
(
device_name: "G513RS",
product_id: "",
layout_name: "g513i-per-key",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
basic_zones: [],
advanced_type: PerKey,
power_zones: [Keyboard, Lightbar],
),
(
device_name: "G513RW",
product_id: "",
layout_name: "g513i-per-key",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
basic_zones: [],
advanced_type: PerKey,
power_zones: [Keyboard, Lightbar],
),
(
device_name: "G531",
product_id: "",
layout_name: "g513i-per-key",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
basic_zones: [],
advanced_type: PerKey,
power_zones: [Keyboard],
),
(
device_name: "G531GD",
product_id: "", product_id: "",
layout_name: "gx502", layout_name: "gx502",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard],
),
(
device_name: "G531GT",
product_id: "",
layout_name: "gx502",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard],
),
(
device_name: "G531GU",
product_id: "",
layout_name: "gx502",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave],
basic_zones: [Key1, Key2, Key3, Key4],
advanced_type: None,
power_zones: [Keyboard],
),
(
device_name: "G531GV",
product_id: "",
layout_name: "gx502",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave],
basic_zones: [Key1, Key2, Key3, Key4], basic_zones: [Key1, Key2, Key3, Key4],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -246,7 +183,7 @@
device_name: "G614J", device_name: "G614J",
product_id: "", product_id: "",
layout_name: "g634j-per-key", layout_name: "g634j-per-key",
basic_modes: [Static, Breathe, Pulse, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard, Lightbar], power_zones: [Keyboard, Lightbar],
@@ -255,7 +192,7 @@
device_name: "G614JJ", device_name: "G614JJ",
product_id: "", product_id: "",
layout_name: "g634j-per-key", layout_name: "g634j-per-key",
basic_modes: [Static, Breathe, Pulse, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [Key1, Key2, Key3, Key4], basic_zones: [Key1, Key2, Key3, Key4],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard, Lightbar], power_zones: [Keyboard, Lightbar],
@@ -264,7 +201,7 @@
device_name: "G614JZ", device_name: "G614JZ",
product_id: "", product_id: "",
layout_name: "g634j-per-key", layout_name: "g634j-per-key",
basic_modes: [Static, Breathe, Pulse, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [Key1, Key2, Key3, Key4], basic_zones: [Key1, Key2, Key3, Key4],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard, Lightbar], power_zones: [Keyboard, Lightbar],
@@ -405,19 +342,10 @@
power_zones: [Keyboard], power_zones: [Keyboard],
), ),
( (
device_name: "G731GT", device_name: "G731G",
product_id: "", product_id: "",
layout_name: "g533q", layout_name: "g533q",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard],
),
(
device_name: "G731GU",
product_id: "",
layout_name: "g533q",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -426,7 +354,7 @@
device_name: "G731GV", device_name: "G731GV",
product_id: "", product_id: "",
layout_name: "g533q", layout_name: "g533q",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [Key1, Key2, Key3, Key4], basic_zones: [Key1, Key2, Key3, Key4],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -435,7 +363,7 @@
device_name: "G731GW", device_name: "G731GW",
product_id: "", product_id: "",
layout_name: "g533q", layout_name: "g533q",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [Key1, Key2, Key3, Key4], basic_zones: [Key1, Key2, Key3, Key4],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -450,7 +378,7 @@
power_zones: [Keyboard, Lightbar, Logo, Lid], power_zones: [Keyboard, Lightbar, Logo, Lid],
), ),
( (
device_name: "G733PZ", device_name: "G733P",
product_id: "", product_id: "",
layout_name: "g733pz-per-key", layout_name: "g733pz-per-key",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
@@ -516,7 +444,16 @@
device_name: "GA402N", device_name: "GA402N",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse, RainbowWave, RainbowCycle], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard],
),
(
device_name: "GA402NU-0002",
product_id: "",
layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -525,7 +462,7 @@
device_name: "GA402R", device_name: "GA402R",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -534,25 +471,16 @@
device_name: "GA402X", device_name: "GA402X",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
), ),
( (
device_name: "GA402XI", device_name: "GA402XV-NC012",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, RainbowCycle], basic_modes: [Static, Breathe, Pulse],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard],
),
(
device_name: "GA402XV",
product_id: "",
layout_name: "ga401q",
basic_modes: [Static, Breathe, RainbowCycle, Comet],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -570,7 +498,7 @@
device_name: "GA503Q", device_name: "GA503Q",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse, RainbowWave, RainbowCycle], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -588,7 +516,7 @@
device_name: "GA503R", device_name: "GA503R",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse, RainbowWave, RainbowCycle], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -633,7 +561,7 @@
device_name: "GL553V", device_name: "GL553V",
product_id: "", product_id: "",
layout_name: "g533q", layout_name: "g533q",
basic_modes: [Static, Breathe, RainbowCycle], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [Key1, Key2, Key3, Key4], basic_zones: [Key1, Key2, Key3, Key4],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -642,7 +570,7 @@
device_name: "GL703G", device_name: "GL703G",
product_id: "", product_id: "",
layout_name: "gl503", layout_name: "gl503",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -656,15 +584,6 @@
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
), ),
(
device_name: "GU502",
product_id: "",
layout_name: "gx502",
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash],
basic_zones: [],
advanced_type: PerKey,
power_zones: [Keyboard],
),
( (
device_name: "GU502L", device_name: "GU502L",
product_id: "", product_id: "",
@@ -674,15 +593,6 @@
advanced_type: PerKey, advanced_type: PerKey,
power_zones: [Keyboard], power_zones: [Keyboard],
), ),
(
device_name: "GU502LU",
product_id: "",
layout_name: "gx502",
basic_modes: [Static, Breathe, RainbowCycle, Pulse],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard],
),
( (
device_name: "GU603H", device_name: "GU603H",
product_id: "", product_id: "",
@@ -759,7 +669,7 @@
device_name: "GV601R", device_name: "GV601R",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, RainbowCycle, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -777,7 +687,7 @@
device_name: "GV604V", device_name: "GV604V",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, RainbowCycle, Pulse], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
@@ -872,15 +782,6 @@
advanced_type: None, advanced_type: None,
power_zones: [Keyboard], power_zones: [Keyboard],
), ),
(
device_name: "GZ301Z",
product_id: "",
layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse],
basic_zones: [],
advanced_type: None,
power_zones: [Keyboard],
),
( (
device_name: "GZ301Z", device_name: "GZ301Z",
product_id: "18c6", product_id: "18c6",
@@ -903,7 +804,7 @@
device_name: "RC71L", device_name: "RC71L",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Ally], power_zones: [Ally],
@@ -912,7 +813,7 @@
device_name: "RC72L", device_name: "RC72L",
product_id: "", product_id: "",
layout_name: "ga401q", layout_name: "ga401q",
basic_modes: [Static, Breathe, Pulse, RainbowCycle, RainbowWave], basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
basic_zones: [], basic_zones: [],
advanced_type: None, advanced_type: None,
power_zones: [Ally], power_zones: [Ally],

View File

@@ -171,6 +171,7 @@ impl LedSupportFile {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use std::collections::HashMap;
use std::fs::OpenOptions; use std::fs::OpenOptions;
use std::io::Write; use std::io::Write;
use std::path::PathBuf; use std::path::PathBuf;
@@ -212,6 +213,11 @@ mod tests {
let mut tmp_sort = tmp.clone(); let mut tmp_sort = tmp.clone();
tmp_sort.0.sort_by(|a, b| a.product_id.cmp(&b.product_id)); tmp_sort.0.sort_by(|a, b| a.product_id.cmp(&b.product_id));
tmp_sort.0.sort_by(|a, b| a.device_name.cmp(&b.device_name)); tmp_sort.0.sort_by(|a, b| a.device_name.cmp(&b.device_name));
for model in tmp_sort.0.iter_mut() {
model
.basic_modes
.sort_by(|a, b| (*a as u8).cmp(&(*b as u8)));
}
if tmp != tmp_sort { if tmp != tmp_sort {
let sorted = let sorted =
ron::ser::to_string_pretty(&tmp_sort, PrettyConfig::new().depth_limit(2)).unwrap(); ron::ser::to_string_pretty(&tmp_sort, PrettyConfig::new().depth_limit(2)).unwrap();
@@ -234,4 +240,31 @@ mod tests {
ron::ser::to_string_pretty(&tmp, my_config).unwrap() ron::ser::to_string_pretty(&tmp, my_config).unwrap()
); );
} }
#[test]
fn find_data_file_groups() {
let mut data = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
data.push("data/aura_support.ron");
let buf = std::fs::read_to_string(&data).unwrap();
let tmp = ron::from_str::<LedSupportFile>(&buf).unwrap();
let mut modes: HashMap<Vec<AuraModeNum>, Vec<String>> = HashMap::new();
for entry in tmp.0 {
if let Some(modes) = modes.get_mut(&entry.basic_modes) {
modes.push(entry.device_name);
} else {
modes.insert(entry.basic_modes, vec![entry.device_name]);
}
}
dbg!(modes);
// let my_config = PrettyConfig::new().depth_limit(2);
// println!(
// "RON: {}",
// ron::ser::to_string_pretty(&tmp, my_config).unwrap()
// );
}
} }

View File

@@ -2,7 +2,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-08-26 07:16+0000\n" "POT-Creation-Date: 2024-08-30 09:28+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -412,192 +412,197 @@ msgctxt "PageSystem"
msgid "Throttle Policy on AC" msgid "Throttle Policy on AC"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:49 #: rog-control-center/ui/types/aura_types.slint:51
msgctxt "Aura power zone" msgctxt "Aura power zone"
msgid "Logo" msgid "Logo"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:50 rog-control-center/ui/types/aura_types.slint:59 #: rog-control-center/ui/types/aura_types.slint:52 rog-control-center/ui/types/aura_types.slint:62
msgctxt "Aura power zone" msgctxt "Aura power zone"
msgid "Keyboard" msgid "Keyboard"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:51 rog-control-center/ui/types/aura_types.slint:60 #: rog-control-center/ui/types/aura_types.slint:53 rog-control-center/ui/types/aura_types.slint:63
msgctxt "Aura power zone" msgctxt "Aura power zone"
msgid "Lightbar" msgid "Lightbar"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:52 #: rog-control-center/ui/types/aura_types.slint:54
msgctxt "Aura power zone" msgctxt "Aura power zone"
msgid "Lid" msgid "Lid"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:53 #: rog-control-center/ui/types/aura_types.slint:55
msgctxt "Aura power zone" msgctxt "Aura power zone"
msgid "Rear Glow" msgid "Rear Glow"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:54 rog-control-center/ui/types/aura_types.slint:61 #: rog-control-center/ui/types/aura_types.slint:56 rog-control-center/ui/types/aura_types.slint:64
msgctxt "Aura power zone" msgctxt "Aura power zone"
msgid "Keyboard and Lightbar" msgid "Keyboard and Lightbar"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:64 #: rog-control-center/ui/types/aura_types.slint:57
msgctxt "Aura brightness" msgctxt "Aura power zone"
msgid "Off" msgid "Ally"
msgstr ""
#: rog-control-center/ui/types/aura_types.slint:65
msgctxt "Aura brightness"
msgid "Low"
msgstr ""
#: rog-control-center/ui/types/aura_types.slint:66
msgctxt "Aura brightness"
msgid "Med"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:67 #: rog-control-center/ui/types/aura_types.slint:67
msgctxt "Aura brightness" msgctxt "Aura brightness"
msgid "Off"
msgstr ""
#: rog-control-center/ui/types/aura_types.slint:68
msgctxt "Aura brightness"
msgid "Low"
msgstr ""
#: rog-control-center/ui/types/aura_types.slint:69
msgctxt "Aura brightness"
msgid "Med"
msgstr ""
#: rog-control-center/ui/types/aura_types.slint:70
msgctxt "Aura brightness"
msgid "High" msgid "High"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:72 rog-control-center/ui/types/aura_types.slint:87 #: rog-control-center/ui/types/aura_types.slint:75 rog-control-center/ui/types/aura_types.slint:90
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Static" msgid "Static"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:73 rog-control-center/ui/types/aura_types.slint:88 #: rog-control-center/ui/types/aura_types.slint:76 rog-control-center/ui/types/aura_types.slint:91
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Breathe" msgid "Breathe"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:74 rog-control-center/ui/types/aura_types.slint:89 #: rog-control-center/ui/types/aura_types.slint:77 rog-control-center/ui/types/aura_types.slint:92
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Strobe" msgid "Strobe"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:75 #: rog-control-center/ui/types/aura_types.slint:78
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Rainbow" msgid "Rainbow"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:76 #: rog-control-center/ui/types/aura_types.slint:79
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Star" msgid "Star"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:77 #: rog-control-center/ui/types/aura_types.slint:80
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Rain" msgid "Rain"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:78 #: rog-control-center/ui/types/aura_types.slint:81
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Highlight" msgid "Highlight"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:79 #: rog-control-center/ui/types/aura_types.slint:82
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Laser" msgid "Laser"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:80 #: rog-control-center/ui/types/aura_types.slint:83
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Ripple" msgid "Ripple"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:81 #: rog-control-center/ui/types/aura_types.slint:84
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Nothing" msgid "Nothing"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:82 #: rog-control-center/ui/types/aura_types.slint:85
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Pulse" msgid "Pulse"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:83 #: rog-control-center/ui/types/aura_types.slint:86
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Comet" msgid "Comet"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:84 #: rog-control-center/ui/types/aura_types.slint:87
msgctxt "Basic aura mode" msgctxt "Basic aura mode"
msgid "Flash" msgid "Flash"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:96 #: rog-control-center/ui/types/aura_types.slint:99
msgctxt "Aura zone" msgctxt "Aura zone"
msgid "None" msgid "None"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:97 #: rog-control-center/ui/types/aura_types.slint:100
msgctxt "Aura zone" msgctxt "Aura zone"
msgid "Key1" msgid "Key1"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:98 #: rog-control-center/ui/types/aura_types.slint:101
msgctxt "Aura zone" msgctxt "Aura zone"
msgid "Key2" msgid "Key2"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:99 #: rog-control-center/ui/types/aura_types.slint:102
msgctxt "Aura zone" msgctxt "Aura zone"
msgid "Key3" msgid "Key3"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:100 #: rog-control-center/ui/types/aura_types.slint:103
msgctxt "Aura zone" msgctxt "Aura zone"
msgid "Key4" msgid "Key4"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:101 #: rog-control-center/ui/types/aura_types.slint:104
msgctxt "Aura zone" msgctxt "Aura zone"
msgid "Logo" msgid "Logo"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:102 #: rog-control-center/ui/types/aura_types.slint:105
msgctxt "Aura zone" msgctxt "Aura zone"
msgid "Lightbar Left" msgid "Lightbar Left"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:103 #: rog-control-center/ui/types/aura_types.slint:106
msgctxt "Aura zone" msgctxt "Aura zone"
msgid "Lightbar Right" msgid "Lightbar Right"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:107 #: rog-control-center/ui/types/aura_types.slint:110
msgctxt "Aura direction" msgctxt "Aura direction"
msgid "Right" msgid "Right"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:108 #: rog-control-center/ui/types/aura_types.slint:111
msgctxt "Aura direction" msgctxt "Aura direction"
msgid "Left" msgid "Left"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:109 #: rog-control-center/ui/types/aura_types.slint:112
msgctxt "Aura direction" msgctxt "Aura direction"
msgid "Up" msgid "Up"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:110 #: rog-control-center/ui/types/aura_types.slint:113
msgctxt "Aura direction" msgctxt "Aura direction"
msgid "Down" msgid "Down"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:114 #: rog-control-center/ui/types/aura_types.slint:117
msgctxt "Aura speed" msgctxt "Aura speed"
msgid "Low" msgid "Low"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:115 #: rog-control-center/ui/types/aura_types.slint:118
msgctxt "Aura speed" msgctxt "Aura speed"
msgid "Medium" msgid "Medium"
msgstr "" msgstr ""
#: rog-control-center/ui/types/aura_types.slint:116 #: rog-control-center/ui/types/aura_types.slint:119
msgctxt "Aura speed" msgctxt "Aura speed"
msgid "High" msgid "High"
msgstr "" msgstr ""

View File

@@ -17,6 +17,7 @@ pub struct HidRaw {
syspath: PathBuf, syspath: PathBuf,
/// The product ID. The vendor ID is not kept /// The product ID. The vendor ID is not kept
prod_id: String, prod_id: String,
device_bcd: u32,
/// Retaining a handle to the file for the duration of `HidRaw` /// Retaining a handle to the file for the duration of `HidRaw`
file: RefCell<File>, file: RefCell<File>,
} }
@@ -52,6 +53,12 @@ impl HidRaw {
devfs_path: dev_node.to_owned(), devfs_path: dev_node.to_owned(),
prod_id: id_product.to_string(), prod_id: id_product.to_string(),
syspath: endpoint.syspath().into(), syspath: endpoint.syspath().into(),
device_bcd: usb_device
.attribute_value("bcdDevice")
.unwrap_or_default()
.to_string_lossy()
.parse()
.unwrap_or_default(),
}); });
} }
} }
@@ -70,6 +77,12 @@ impl HidRaw {
devfs_path: dev_node.to_owned(), devfs_path: dev_node.to_owned(),
prod_id: id_product.to_string(), prod_id: id_product.to_string(),
syspath: endpoint.syspath().into(), syspath: endpoint.syspath().into(),
device_bcd: endpoint
.attribute_value("bcdDevice")
.unwrap_or_default()
.to_string_lossy()
.parse()
.unwrap_or_default(),
}); });
} }
} }
@@ -94,6 +107,12 @@ impl HidRaw {
devfs_path: dev_node.to_owned(), devfs_path: dev_node.to_owned(),
prod_id: id_product.to_string_lossy().into(), prod_id: id_product.to_string_lossy().into(),
syspath: device.syspath().into(), syspath: device.syspath().into(),
device_bcd: device
.attribute_value("bcdDevice")
.unwrap_or_default()
.to_string_lossy()
.parse()
.unwrap_or_default(),
}); });
} }
} }