ROGCC: Attempt to add LED brightness

This commit is contained in:
Luke D. Jones
2022-07-25 21:21:32 +12:00
parent 409528b286
commit 71ec13fa9f
3 changed files with 49 additions and 2 deletions

View File

@@ -156,6 +156,8 @@ pub struct AuraState {
pub current_mode: AuraModeNum,
pub modes: BTreeMap<AuraModeNum, AuraEffect>,
pub enabled: AuraPowerDev,
/// Brightness from 0-3
pub bright: i16,
}
impl AuraState {
@@ -178,6 +180,11 @@ impl AuraState {
BTreeMap::new()
},
enabled: dbus.proxies().led().leds_enabled().unwrap(),
bright: if !supported.keyboard_led.brightness_set {
dbus.proxies().led().led_brightness().unwrap()
} else {
2
},
}
}
}