mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-01-22 17:33:19 +01:00
Merge branch 'devel' into 'devel'
slashctl: Add "static" LED profile See merge request asus-linux/asusctl!240
This commit is contained in:
@@ -86,6 +86,7 @@ impl FromStr for SlashType {
|
|||||||
#[cfg_attr(feature = "dbus", derive(Type, Value, OwnedValue))]
|
#[cfg_attr(feature = "dbus", derive(Type, Value, OwnedValue))]
|
||||||
#[derive(Debug, Default, PartialEq, Eq, Copy, Clone, Deserialize, Serialize)]
|
#[derive(Debug, Default, PartialEq, Eq, Copy, Clone, Deserialize, Serialize)]
|
||||||
pub enum SlashMode {
|
pub enum SlashMode {
|
||||||
|
Static = 0x06,
|
||||||
Bounce = 0x10,
|
Bounce = 0x10,
|
||||||
Slash = 0x12,
|
Slash = 0x12,
|
||||||
Loading = 0x13,
|
Loading = 0x13,
|
||||||
@@ -109,6 +110,7 @@ impl FromStr for SlashMode {
|
|||||||
|
|
||||||
fn from_str(s: &str) -> Result<Self, SlashError> {
|
fn from_str(s: &str) -> Result<Self, SlashError> {
|
||||||
match s {
|
match s {
|
||||||
|
"Static" => Ok(SlashMode::Static),
|
||||||
"Bounce" => Ok(SlashMode::Bounce),
|
"Bounce" => Ok(SlashMode::Bounce),
|
||||||
"Slash" => Ok(SlashMode::Slash),
|
"Slash" => Ok(SlashMode::Slash),
|
||||||
"Loading" => Ok(SlashMode::Loading),
|
"Loading" => Ok(SlashMode::Loading),
|
||||||
@@ -132,6 +134,7 @@ impl FromStr for SlashMode {
|
|||||||
impl Display for SlashMode {
|
impl Display for SlashMode {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
let str = match &self {
|
let str = match &self {
|
||||||
|
SlashMode::Static => String::from("Static"),
|
||||||
SlashMode::Bounce => String::from("Bounce"),
|
SlashMode::Bounce => String::from("Bounce"),
|
||||||
SlashMode::Slash => String::from("Slash"),
|
SlashMode::Slash => String::from("Slash"),
|
||||||
SlashMode::Loading => String::from("Loading"),
|
SlashMode::Loading => String::from("Loading"),
|
||||||
@@ -153,8 +156,9 @@ impl Display for SlashMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SlashMode {
|
impl SlashMode {
|
||||||
pub fn list() -> [String; 15] {
|
pub fn list() -> [String; 16] {
|
||||||
[
|
[
|
||||||
|
SlashMode::Static.to_string(),
|
||||||
SlashMode::Bounce.to_string(),
|
SlashMode::Bounce.to_string(),
|
||||||
SlashMode::Slash.to_string(),
|
SlashMode::Slash.to_string(),
|
||||||
SlashMode::Loading.to_string(),
|
SlashMode::Loading.to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user