Code cleanup
This commit is contained in:
parent
41f084b156
commit
cac6a7e18d
@ -624,18 +624,17 @@ fn main() -> ! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update status LED colour based on function layer and capslock
|
/// Update status LED colour
|
||||||
///
|
///
|
||||||
/// USB mode = green
|
/// Waiting for USB enumerate = flashing green
|
||||||
/// Activity = flashing blue
|
/// USB mode (Normal mode) = green
|
||||||
/// Error = steady red (ERROR)
|
/// Throttle hold mode = orange
|
||||||
|
/// Calibrating = flashing blue
|
||||||
///
|
///
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
/// * `status_led` - Reference to status LED
|
/// * `status_led` - Reference to status LED
|
||||||
/// * `activity` - Reference to bool that indicates if there is activity
|
|
||||||
/// * `usb_active` - Reference to bool that indicates if USB is active
|
/// * `usb_active` - Reference to bool that indicates if USB is active
|
||||||
/// * `axis_idle` - Reference to bool that indicates if all axis are in idle position
|
/// * `throttle_hold_enable` - Reference to bool that indicates if left y axis is hold (trimmed)
|
||||||
/// * `safety_check` - Reference to bool that indicates if safety check has passed
|
|
||||||
fn update_status_led<P, SM, I>(
|
fn update_status_led<P, SM, I>(
|
||||||
status_led: &mut Ws2812StatusLed<P, SM, I>,
|
status_led: &mut Ws2812StatusLed<P, SM, I>,
|
||||||
usb_active: &bool,
|
usb_active: &bool,
|
||||||
@ -648,7 +647,7 @@ fn update_status_led<P, SM, I>(
|
|||||||
SM: StateMachineIndex,
|
SM: StateMachineIndex,
|
||||||
{
|
{
|
||||||
if *calibration_active {
|
if *calibration_active {
|
||||||
status_led.update(StatusMode::Warning);
|
status_led.update(StatusMode::ActivityFlash);
|
||||||
} else if !*usb_active {
|
} else if !*usb_active {
|
||||||
status_led.update(StatusMode::NormalFlash);
|
status_led.update(StatusMode::NormalFlash);
|
||||||
} else if *usb_active && *throttle_hold_enable {
|
} else if *usb_active && *throttle_hold_enable {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user