Code cleanup

This commit is contained in:
Christoffer Martinsson 2025-03-04 19:34:19 +01:00
parent 41f084b156
commit cac6a7e18d

View File

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