mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
@@ -43,15 +43,27 @@ pub enum AnimeActions {
|
||||
pub struct Builtins {
|
||||
#[options(help = "print help message")]
|
||||
pub help: bool,
|
||||
#[options(meta = "", help = " <GlitchConstruction, StaticEmergence>")]
|
||||
#[options(
|
||||
meta = "",
|
||||
help = "Default is used if unspecified, <default:GlitchConstruction, StaticEmergence>"
|
||||
)]
|
||||
pub boot: AnimBooting,
|
||||
#[options(meta = "", help = "<BinaryBannerScroll, RogLogoGlitch>")]
|
||||
#[options(
|
||||
meta = "",
|
||||
help = "Default is used if unspecified, <default:BinaryBannerScroll, RogLogoGlitch>"
|
||||
)]
|
||||
pub awake: AnimAwake,
|
||||
#[options(meta = "", help = "<BannerSwipe, Starfield>")]
|
||||
#[options(
|
||||
meta = "",
|
||||
help = "Default is used if unspecified, <default:BannerSwipe, Starfield>"
|
||||
)]
|
||||
pub sleep: AnimSleeping,
|
||||
#[options(meta = "", help = "<GlitchOut, SeeYa>")]
|
||||
#[options(
|
||||
meta = "",
|
||||
help = "Default is used if unspecified, <default:GlitchOut, SeeYa>"
|
||||
)]
|
||||
pub shutdown: AnimShutdown,
|
||||
#[options(meta = "", help = "set/apply the animations")]
|
||||
#[options(meta = "", help = "set/apply the animations <true/false>")]
|
||||
pub set: Option<bool>,
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ impl Node {
|
||||
match self {
|
||||
Node::Usb(u) => {
|
||||
u.write_bytes(message).ok();
|
||||
dbg!(message);
|
||||
}
|
||||
Node::Hid(h) => {
|
||||
h.write_bytes(message).ok();
|
||||
@@ -65,10 +66,10 @@ impl CtrlAnime {
|
||||
pub fn new(config: AnimeConfig) -> Result<CtrlAnime, RogError> {
|
||||
let hid = HidRaw::new("193b").ok();
|
||||
let usb = USBRaw::new(0x193b).ok();
|
||||
let node = if hid.is_some() {
|
||||
unsafe { Node::Hid(hid.unwrap_unchecked()) }
|
||||
} else if usb.is_some() {
|
||||
let node = if usb.is_some() {
|
||||
unsafe { Node::Usb(usb.unwrap_unchecked()) }
|
||||
} else if hid.is_some() {
|
||||
unsafe { Node::Hid(hid.unwrap_unchecked()) }
|
||||
} else {
|
||||
return Err(RogError::Anime(AnimeError::NoDevice));
|
||||
};
|
||||
|
||||
@@ -96,6 +96,7 @@ impl CtrlAnimeZbus {
|
||||
enabled: bool,
|
||||
) {
|
||||
let mut lock = self.0.lock().await;
|
||||
dbg!("LOOOOOOOOOOCKEDDD");
|
||||
lock.node
|
||||
.write_bytes(&pkt_set_enable_powersave_anim(enabled))
|
||||
.map_err(|err| {
|
||||
|
||||
Reference in New Issue
Block a user