mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Fix default colour to be red
This commit is contained in:
@@ -16,13 +16,18 @@ pub const COMET: u8 = 0x0b;
|
|||||||
pub const FLASH: u8 = 0x0c;
|
pub const FLASH: u8 = 0x0c;
|
||||||
pub const MULTISTATIC: u8 = 0x0d;
|
pub const MULTISTATIC: u8 = 0x0d;
|
||||||
|
|
||||||
#[derive(Clone, Default, Deserialize, Serialize)]
|
#[derive(Clone, Deserialize, Serialize)]
|
||||||
pub struct Colour(pub u8, pub u8, pub u8);
|
pub struct Colour(pub u8, pub u8, pub u8);
|
||||||
impl From<cli_options::Colour> for Colour {
|
impl From<cli_options::Colour> for Colour {
|
||||||
fn from(c: cli_options::Colour) -> Self {
|
fn from(c: cli_options::Colour) -> Self {
|
||||||
Colour(c.0, c.1, c.2)
|
Colour(c.0, c.1, c.2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl Default for Colour {
|
||||||
|
fn default() -> Self {
|
||||||
|
Colour(255, 255, 255)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Deserialize, Serialize)]
|
#[derive(Copy, Clone, Deserialize, Serialize)]
|
||||||
pub enum Speed {
|
pub enum Speed {
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ impl LaptopBase {
|
|||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
config.read();
|
||||||
if let Some(data) = config.get_led_mode_data(self.supported_modes[idx_next]) {
|
if let Some(data) = config.get_led_mode_data(self.supported_modes[idx_next]) {
|
||||||
aura_command.send(data.clone()).await.unwrap_or_else(|_| {});
|
aura_command.send(data.clone()).await.unwrap_or_else(|_| {});
|
||||||
}
|
}
|
||||||
@@ -162,6 +163,7 @@ impl LaptopBase {
|
|||||||
} else {
|
} else {
|
||||||
self.supported_modes.len() - 1
|
self.supported_modes.len() - 1
|
||||||
};
|
};
|
||||||
|
config.read();
|
||||||
if let Some(data) = config.get_led_mode_data(self.supported_modes[idx_next]) {
|
if let Some(data) = config.get_led_mode_data(self.supported_modes[idx_next]) {
|
||||||
aura_command.send(data.clone()).await.unwrap_or_else(|_| {});
|
aura_command.send(data.clone()).await.unwrap_or_else(|_| {});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user