mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Aura: add support for Rear Glow power modes
This commit is contained in:
@@ -20,9 +20,9 @@ pub enum AuraPowerConfig {
|
||||
|
||||
impl AuraPowerConfig {
|
||||
/// Invalid for TUF laptops
|
||||
pub fn to_bytes(control: &Self) -> [u8; 3] {
|
||||
pub fn to_bytes(control: &Self) -> [u8; 4] {
|
||||
match control {
|
||||
AuraPowerConfig::AuraDevTuf(_) => [0, 0, 0],
|
||||
AuraPowerConfig::AuraDevTuf(_) => [0, 0, 0, 0],
|
||||
AuraPowerConfig::AuraDevRog1(c) => {
|
||||
let c: Vec<AuraDevRog1> = c.iter().copied().collect();
|
||||
AuraDevRog1::to_bytes(&c)
|
||||
@@ -156,6 +156,10 @@ impl AuraConfig {
|
||||
AuraDevRog2::AwakeBar,
|
||||
AuraDevRog2::SleepBar,
|
||||
AuraDevRog2::ShutdownBar,
|
||||
AuraDevRog2::BootRearGlow,
|
||||
AuraDevRog2::AwakeRearGlow,
|
||||
AuraDevRog2::SleepRearGlow,
|
||||
AuraDevRog2::ShutdownRearGlow,
|
||||
]))
|
||||
} else if prod_id == AuraDevice::Tuf {
|
||||
AuraPowerConfig::AuraDevTuf(HashSet::from([
|
||||
|
||||
@@ -200,7 +200,7 @@ impl CtrlKbdLed {
|
||||
}
|
||||
} else if let LEDNode::Rog(hid_raw) = &self.led_node {
|
||||
let bytes = AuraPowerConfig::to_bytes(&self.config.enabled);
|
||||
let message = [0x5d, 0xbd, 0x01, bytes[0], bytes[1], bytes[2]];
|
||||
let message = [0x5d, 0xbd, 0x01, bytes[0], bytes[1], bytes[2], bytes[3]];
|
||||
|
||||
hid_raw.write_bytes(&message)?;
|
||||
hid_raw.write_bytes(&LED_SET)?;
|
||||
|
||||
@@ -78,6 +78,10 @@ impl CtrlKbdLedZbus {
|
||||
/// BootBar,
|
||||
/// SleepBar,
|
||||
/// ShutdownBar,
|
||||
/// BootRearBar,
|
||||
/// AwakeRearBar,
|
||||
/// SleepRearBar,
|
||||
/// ShutdownRearBar,
|
||||
/// }
|
||||
/// ```
|
||||
async fn set_leds_power(
|
||||
|
||||
Reference in New Issue
Block a user