ROGCC: Make zbus notifications fully manage pagestates

This commit is contained in:
Luke D. Jones
2022-11-15 22:26:17 +13:00
parent 762bfea102
commit 73b1a7050a
10 changed files with 115 additions and 174 deletions

View File

@@ -5,7 +5,7 @@ pub const LED_INIT4: &str = "^ASUS Tech.Inc."; // ^ == 0x5e
pub const LED_INIT5: [u8; 6] = [0x5e, 0x05, 0x20, 0x31, 0, 0x08];
use serde_derive::{Deserialize, Serialize};
use std::str::FromStr;
use std::{fmt::Display, str::FromStr};
#[cfg(feature = "dbus")]
use zvariant::Type;
@@ -171,6 +171,12 @@ pub enum AuraModeNum {
Flash = 12,
}
impl Display for AuraModeNum {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", <&str>::from(self))
}
}
impl From<AuraModeNum> for String {
fn from(mode: AuraModeNum) -> Self {
match mode {