diff --git a/src/layout.rs b/src/layout.rs index fc86693..88a1f80 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -25,6 +25,10 @@ const FN_M: Action = LayerMomentary(1); const LED_M: Action = LayerMomentary(2); const BT_T: Action = LayerToggle(3); const __: Action = Transparent; +const LedNT: Action = LedNextTheme; +const LedNB: Action = LedNextBrightness; +const LedNAS: Action = LedNextAnimationSpeed; + pub const BASE: Layout = layout![ Escape N1 N2 N3 N4 N5 N6 N7 N8 N9 N0 Minus Equal BSpace @@ -35,15 +39,15 @@ pub const BASE: Layout = layout![ ]; pub const FN: Layout = layout![ - Grave F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 __ - __ __ Up __ __ __ __ __ Up Scrolllock Pause Home End PScreen - __ Left Down Right __ __ __ Left Down Right PgUp PgDown No __ - __ __ __ __ __ __ __ __ __ Insert Delete No No __ - __ __ __ No No __ No No No No __ __ __ __ + Grave F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 __ + __ __ Up __ LedOn LedNAS LedNB LedNT Up Scrolllock Pause Home End PScreen + __ Left Down Right __ __ __ Left Down Right PgUp PgDown No __ + __ __ __ __ __ __ __ __ __ Insert Delete No No __ + __ __ __ No No __ No No No No __ __ __ __ ]; pub const LED: Layout = layout![ - LedOff LedOn LedNextTheme LedNextAnimationSpeed LedNextBrightness __ __ __ __ __ __ __ __ __ + LedOff LedOn LedNT LedNAS LedNB __ __ __ __ __ __ __ __ __ __ LedTheme(0) LedTheme(1) LedTheme(2) LedTheme(14) LedTheme(17) LedTheme(18) __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ No __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ @@ -55,5 +59,5 @@ pub const BT: Layout = layout![ BtBroadcast BtSaveHost(0) BtSaveHost(1) BtSaveHost(2) BtSaveHost(3) __ __ __ __ __ __ __ __ __ BtCompatibilityMode(true) BtDeleteHost(0) BtDeleteHost(1) BtDeleteHost(2) BtDeleteHost(3) __ __ __ __ __ __ __ No __ BtCompatibilityMode(false) __ __ __ __ __ __ __ __ __ __ __ __ __ - LedNextTheme BtHostListQuery __ No No __ No No No No __ __ __ __ + LedNT BtHostListQuery __ No No __ No No No No __ __ __ __ ]; diff --git a/src/led.rs b/src/led.rs index a6d248c..f924cf3 100644 --- a/src/led.rs +++ b/src/led.rs @@ -43,11 +43,11 @@ impl<'a> Led<'a> { } pub fn next_brightness(&mut self) -> nb::Result<(), !> { - self.serial.send(MsgType::Led, LedOp::ConfigCmd as u8, &[0, 1, 0]) + self.serial.send(MsgType::Led, LedOp::ConfigCmd as u8, &[0, 0, 1]) } pub fn next_animation_speed(&mut self) -> nb::Result<(), !> { - self.serial.send(MsgType::Led, LedOp::ConfigCmd as u8, &[0, 0, 1]) + self.serial.send(MsgType::Led, LedOp::ConfigCmd as u8, &[0, 1, 0]) } pub fn set_theme(&mut self, theme: u8) -> nb::Result<(), !> {