anime: initial system config work

This commit is contained in:
Luke D Jones
2021-04-12 12:51:34 +12:00
parent 64d99a3e05
commit 8a6d364304
32 changed files with 624 additions and 226 deletions

View File

@@ -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,

View File

@@ -23,4 +23,4 @@ impl fmt::Display for Error {
}
}
impl error::Error for Error {}
impl error::Error for Error {}

View File

@@ -13,4 +13,4 @@ pub mod usb;
pub mod error;
pub const LED_MSG_LEN: usize = 17;
pub const LED_MSG_LEN: usize = 17;

View File

@@ -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] {

View File

@@ -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

View File

@@ -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,
]
}
}