Update deps

This commit is contained in:
Luke D. Jones
2023-08-14 13:20:40 +12:00
parent 93edd1b632
commit e42fd10404
9 changed files with 141 additions and 132 deletions

View File

@@ -63,7 +63,7 @@ impl LaptopLedData {
// let prod_family = dmi.product_family().expect("Could not get
// product_family");
if let Some(modes) = LedSupportFile::load_from_config() {
if let Some(modes) = LedSupportFile::load_from_supoprt_db() {
if let Some(data) = modes.matcher(&board_name) {
return data;
}
@@ -90,7 +90,12 @@ impl LedSupportFile {
None
}
pub fn load_from_config() -> Option<Self> {
/// Load `LedSupportFile` from the `aura_support.ron` file at
/// `/usr/share/asusd/aura_support.ron` and append with data from
/// `/etc/asusd/asusd_user_ledmodes.ron` if that file is available.
///
/// Returns `None` if neither file exists or does not parse correctly.
pub fn load_from_supoprt_db() -> Option<Self> {
let mut loaded = false;
let mut data = LedSupportFile::default();
// Load user configs first so they are first to be checked

View File

@@ -17,10 +17,11 @@ use crate::LED_MSG_LEN;
#[typeshare]
#[cfg_attr(feature = "dbus", derive(Type), zvariant(signature = "s"))]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)]
pub enum LedBrightness {
Off,
Low,
#[default]
Med,
High,
}