pub enum LedPattern {
AllOff,
GreenSolid,
GreenSlowPulse,
GreenFastBlink,
YellowSolid,
YellowBlink,
AlternateBoth,
}Expand description
Visual LED pattern associated with each state.
The firmware’s animation task reads this from the current state and toggles the LEDs accordingly. Patterns are expressed in human terms (solid, pulse, alternate) rather than as raw on/off booleans so the animation task can vary its cadence without the state machine knowing.
Variants§
AllOff
Both LEDs off.
GreenSolid
Green LED solid on.
GreenSlowPulse
Green LED pulsing slowly (about 1 Hz, smooth).
GreenFastBlink
Green LED fast-blinking (about 5 Hz).
YellowSolid
Yellow LED solid on.
YellowBlink
Yellow LED blinking (about 2 Hz).
AlternateBoth
Green and yellow alternate (about 5 Hz).
Trait Implementations§
Source§impl Clone for LedPattern
impl Clone for LedPattern
Source§fn clone(&self) -> LedPattern
fn clone(&self) -> LedPattern
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LedPattern
impl Debug for LedPattern
Source§impl PartialEq for LedPattern
impl PartialEq for LedPattern
impl Copy for LedPattern
impl Eq for LedPattern
impl StructuralPartialEq for LedPattern
Auto Trait Implementations§
impl Freeze for LedPattern
impl RefUnwindSafe for LedPattern
impl Send for LedPattern
impl Sync for LedPattern
impl Unpin for LedPattern
impl UnsafeUnpin for LedPattern
impl UnwindSafe for LedPattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more