mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Many cleanup and fix
This commit is contained in:
@@ -594,7 +594,7 @@
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "GL553VE",
|
||||
device_name: "GL553V",
|
||||
product_id: "",
|
||||
layout_name: "g533q",
|
||||
basic_modes: [Static, Breathe, Strobe],
|
||||
@@ -829,7 +829,7 @@
|
||||
),
|
||||
(
|
||||
device_name: "GZ301Z",
|
||||
product_id: "1a30",
|
||||
product_id: "",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_zones: [],
|
||||
@@ -845,6 +845,15 @@
|
||||
advanced_type: None,
|
||||
power_zones: [None],
|
||||
),
|
||||
(
|
||||
device_name: "GZ301Z",
|
||||
product_id: "1a30",
|
||||
layout_name: "ga401q",
|
||||
basic_modes: [Static, Breathe, Pulse],
|
||||
basic_zones: [],
|
||||
advanced_type: None,
|
||||
power_zones: [Keyboard],
|
||||
),
|
||||
(
|
||||
device_name: "RC71L",
|
||||
product_id: "",
|
||||
|
||||
@@ -91,6 +91,7 @@ impl LedSupportFile {
|
||||
if !config.product_id.is_empty() {
|
||||
info!("Checking product ID");
|
||||
if config.product_id == product_id {
|
||||
info!("Matched to {}", config.product_id);
|
||||
return Some(config.clone());
|
||||
} else {
|
||||
continue;
|
||||
@@ -192,6 +193,7 @@ mod tests {
|
||||
|
||||
// Ensure the data is sorted
|
||||
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.device_name.cmp(&b.device_name));
|
||||
if tmp != tmp_sort {
|
||||
let sorted =
|
||||
|
||||
@@ -276,7 +276,6 @@ impl From<OldAuraPower> for u32 {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::aura_detection::LedSupportData;
|
||||
use crate::keyboard::{AuraPowerState, LaptopAuraPower};
|
||||
use crate::{AuraDeviceType, PowerZones};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user