Fix default colour to be red

This commit is contained in:
Luke
2020-07-02 09:01:46 +12:00
parent 9f8834fc4f
commit e562428dbf
2 changed files with 8 additions and 1 deletions

View File

@@ -16,13 +16,18 @@ pub const COMET: u8 = 0x0b;
pub const FLASH: u8 = 0x0c;
pub const MULTISTATIC: u8 = 0x0d;
#[derive(Clone, Default, Deserialize, Serialize)]
#[derive(Clone, Deserialize, Serialize)]
pub struct Colour(pub u8, pub u8, pub u8);
impl From<cli_options::Colour> for Colour {
fn from(c: cli_options::Colour) -> Self {
Colour(c.0, c.1, c.2)
}
}
impl Default for Colour {
fn default() -> Self {
Colour(255, 255, 255)
}
}
#[derive(Copy, Clone, Deserialize, Serialize)]
pub enum Speed {

View File

@@ -148,6 +148,7 @@ impl LaptopBase {
} else {
0
};
config.read();
if let Some(data) = config.get_led_mode_data(self.supported_modes[idx_next]) {
aura_command.send(data.clone()).await.unwrap_or_else(|_| {});
}
@@ -162,6 +163,7 @@ impl LaptopBase {
} else {
self.supported_modes.len() - 1
};
config.read();
if let Some(data) = config.get_led_mode_data(self.supported_modes[idx_next]) {
aura_command.send(data.clone()).await.unwrap_or_else(|_| {});
}