Added working implementation of the G14 Slash ledstrip

This commit is contained in:
jochen@g14
2024-03-30 18:41:31 +01:00
parent cdc9ca7b58
commit 8cdc9773c9
20 changed files with 663 additions and 746 deletions

View File

@@ -96,9 +96,7 @@ impl<'a> DbusProxies<'a> {
))
}
pub fn anime(&self) -> &zbus_anime::AnimeProxy<'a> {
&self.anime
}
pub fn anime(&self) -> &zbus_anime::AnimeProxy<'a> { &self.anime }
pub fn slash(&self) -> &zbus_slash::SlashProxy<'a> { &self.slash }
pub fn led(&self) -> &zbus_aura::AuraProxy<'a> {

View File

@@ -1,14 +1,18 @@
use zbus::proxy;
use rog_slash::SlashMode;
#[proxy(
interface = "org.asuslinux.Slash",
default_service = "org.asuslinux.Daemon",
default_path = "/org/asuslinux"
interface = "org.asuslinux.Slash",
default_service = "org.asuslinux.Daemon",
default_path = "/org/asuslinux"
)]
trait Slash {
/// RunMainLoop method
fn run_main_loop(&self, start: bool) -> zbus::Result<()>;
/// EnableDisplay property
#[zbus(property)]
fn enabled(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn set_enabled(&self, value: bool) -> zbus::Result<()>;
/// Brightness property
#[zbus(property)]
fn brightness(&self) -> zbus::Result<u8>;
@@ -21,15 +25,10 @@ trait Slash {
#[zbus(property)]
fn set_interval(&self, value: u8) -> zbus::Result<()>;
/// BuiltinAnimations property
/// Slash modes property
#[zbus(property)]
fn current_mode(&self) -> zbus::Result<u8>;
fn slash_mode(&self) -> zbus::Result<SlashMode>;
#[zbus(property)]
fn set_current_mode(&self, value: u8) -> zbus::Result<()>;
fn set_slash_mode(&self, value: SlashMode) -> zbus::Result<()>;
/// EnableDisplay property
#[zbus(property)]
fn enable_display(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn set_enable_display(&self, value: bool) -> zbus::Result<()>;
}