mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Update config & dbus parts, cleanup deps, device power states
- Add extra config options and dbus methods - Add power state signals for anime and led - Refactor to use channels for dbus signal handler send/recv - Split out profiles independant parts to a rog-profiles crate - Cleanup dependencies - Fix some dbus Supported issues
This commit is contained in:
@@ -3,9 +3,6 @@ use png_pong::decode::Error as PngError;
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
|
||||
#[cfg(feature = "dbus")]
|
||||
use zbus::fdo;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum AnimeError {
|
||||
NoFrames,
|
||||
@@ -15,8 +12,6 @@ pub enum AnimeError {
|
||||
Format,
|
||||
/// The input was incorrect size, expected size is `IncorrectSize(width, height)`
|
||||
IncorrectSize(u32, u32),
|
||||
#[cfg(feature = "dbus")]
|
||||
Zbus(fdo::Error),
|
||||
}
|
||||
|
||||
impl fmt::Display for AnimeError {
|
||||
@@ -33,8 +28,6 @@ impl fmt::Display for AnimeError {
|
||||
"The input image size is incorrect, expected {}x{}",
|
||||
width, height
|
||||
),
|
||||
#[cfg(feature = "dbus")]
|
||||
AnimeError::Zbus(e) => write!(f, "ZBUS error: {}", e),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,11 +54,3 @@ impl From<DecodingError> for AnimeError {
|
||||
AnimeError::Gif(err)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "dbus")]
|
||||
impl From<AnimeError> for fdo::Error {
|
||||
#[inline]
|
||||
fn from(err: AnimeError) -> Self {
|
||||
fdo::Error::Failed(format!("{}", err))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user