mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
anime: initial system config work
This commit is contained in:
@@ -9,7 +9,7 @@ use std::str::FromStr;
|
||||
#[cfg(feature = "dbus")]
|
||||
use zvariant_derive::Type;
|
||||
|
||||
use crate::{LED_MSG_LEN, error::Error};
|
||||
use crate::{error::Error, LED_MSG_LEN};
|
||||
|
||||
#[cfg_attr(feature = "dbus", derive(Type))]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Deserialize, Serialize)]
|
||||
@@ -121,9 +121,7 @@ impl FromStr for Direction {
|
||||
|
||||
/// Enum of modes that convert to the actual number required by a USB HID packet
|
||||
#[cfg_attr(feature = "dbus", derive(Type))]
|
||||
#[derive(
|
||||
Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Copy, Deserialize, Serialize,
|
||||
)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Copy, Deserialize, Serialize)]
|
||||
pub enum AuraModeNum {
|
||||
Static = 0,
|
||||
Breathe = 1,
|
||||
|
||||
@@ -23,4 +23,4 @@ impl fmt::Display for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl error::Error for Error {}
|
||||
impl error::Error for Error {}
|
||||
|
||||
@@ -13,4 +13,4 @@ pub mod usb;
|
||||
|
||||
pub mod error;
|
||||
|
||||
pub const LED_MSG_LEN: usize = 17;
|
||||
pub const LED_MSG_LEN: usize = 17;
|
||||
|
||||
@@ -33,7 +33,7 @@ impl KeyColourArray {
|
||||
KeyColourArray(set)
|
||||
}
|
||||
|
||||
/// Initialise and clear the keyboard for custom effects, this must be done for
|
||||
/// Initialise and clear the keyboard for custom effects, this must be done for
|
||||
/// every time mode switches from builtin to custom
|
||||
#[inline]
|
||||
pub const fn get_init_msg() -> [u8; 64] {
|
||||
|
||||
@@ -11,7 +11,7 @@ use crate::error::Error;
|
||||
/// used in a array allowing the user to cycle through a series of actions.
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum ActionData {
|
||||
Static
|
||||
Static,
|
||||
}
|
||||
|
||||
/// An optimised precomputed set of actions that the user can cycle through
|
||||
|
||||
@@ -13,4 +13,4 @@ pub const fn aura_brightness_bytes(brightness: u8) -> [u8; 17] {
|
||||
[
|
||||
0x5A, 0xBA, 0xC5, 0xC4, brightness, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user