Enum rev_11_1105_rs::Pattern[][src]

pub enum Pattern {
    Rainbow,
    RainbowParty,
    RainbowOcean,
    RainbowLava,
    RainbowForest,
    RainbowGlitter,
    Confetti,
    RedShot,
    BlueShot,
    WhiteShot,
    SinelonRainbow,
    SinelonParty,
    SinelonOcean,
    SinelonLava,
    SinelonForest,
    BpmRainbow,
    BpmOcean,
    BpmLava,
    BpmForest,
    FireMedium,
    FireLarge,
    TwinklesRainbow,
    TwinklesParty,
    TwinklesOcean,
    TwinklesLava,
    TwinklesForest,
    WavesRainbow,
    WavesParty,
    WavesOcean,
    WavesLava,
    WavesForest,
    LarsonRed,
    LarsonGray,
    ChaseRed,
    ChaseBlue,
    ChaseGray,
    HeartbeatRed,
    HeartbeatBlue,
    HeartbeatWhite,
    HeartbeatGray,
    BreathRed,
    BreathBlue,
    BreathGray,
    StrobeBlue,
    StrobeGold,
    StrobeWhite,
    Color1BlendToBlack,
    Color1Larson,
    Color1Chase,
    Color1HeartbeatSlow,
    Color1HeartbeatMedium,
    Color1HeartbeatFast,
    Color1BreathSlow,
    Color1BreathFast,
    Color1Shot,
    Color1Strobe,
    Color2BlendToBlack,
    Color2Larson,
    Color2Chase,
    Color2HeartbeatSlow,
    Color2HeartbeatMedium,
    Color2HeartbeatFast,
    Color2BreathSlow,
    Color2BreathFast,
    Color2Shot,
    Color2Strobe,
    Sparkle1On2,
    Sparkle2On1,
    Gradient1And2,
    Bpm1And2,
    EndBlend1And2,
    EndBlend,
    Color1And2NoBlend,
    Twinkle1And2,
    Waves1And2,
    Sinelon1And2,
    HotPink,
    DarkRed,
    Red,
    RedOrange,
    Orange,
    Gold,
    Yellow,
    LawnGreen,
    Lime,
    DarkGreen,
    Green,
    BlueGreen,
    Aqua,
    SkyBlue,
    DarkBlue,
    Blue,
    BlueViolet,
    Violet,
    White,
    Gray,
    DarkGray,
    Black,
}

Expression of each valid driver colour mode as a value from 0..200.

Values are expressed in this range so they can be converted back to their float form when used (since enums can not store f32 types in a useful way)

These values are not intended to be passes directly to a PWM output, but to be converted to the correct duty cycle format before use

These values are transcribed from the user manual

Variants

Rainbow
RainbowParty
RainbowOcean
RainbowLava
RainbowForest
RainbowGlitter
Confetti
RedShot
BlueShot
WhiteShot
SinelonRainbow
SinelonParty
SinelonOcean
SinelonLava
SinelonForest
BpmRainbow
BpmOcean
BpmLava
BpmForest
FireMedium
FireLarge
TwinklesRainbow
TwinklesParty
TwinklesOcean
TwinklesLava
TwinklesForest
WavesRainbow
WavesParty
WavesOcean
WavesLava
WavesForest
LarsonRed
LarsonGray
ChaseRed
ChaseBlue
ChaseGray
HeartbeatRed
HeartbeatBlue
HeartbeatWhite
HeartbeatGray
BreathRed
BreathBlue
BreathGray
StrobeBlue
StrobeGold
StrobeWhite
Color1BlendToBlack
Color1Larson
Color1Chase
Color1HeartbeatSlow
Color1HeartbeatMedium
Color1HeartbeatFast
Color1BreathSlow
Color1BreathFast
Color1Shot
Color1Strobe
Color2BlendToBlack
Color2Larson
Color2Chase
Color2HeartbeatSlow
Color2HeartbeatMedium
Color2HeartbeatFast
Color2BreathSlow
Color2BreathFast
Color2Shot
Color2Strobe
Sparkle1On2
Sparkle2On1
Gradient1And2
Bpm1And2
EndBlend1And2
EndBlend
Color1And2NoBlend
Twinkle1And2
Waves1And2
Sinelon1And2
HotPink
DarkRed
Red
RedOrange
Orange
Gold
Yellow
LawnGreen
Lime
DarkGreen
Green
BlueGreen
Aqua
SkyBlue
DarkBlue
Blue
BlueViolet
Violet
White
Gray
DarkGray
Black

Implementations

impl Pattern[src]

pub fn as_percentage(&self) -> f32[src]

Get the pattern duty cycle as a percentage value from -1.0 to 1.0

pub fn as_abs_percentage(&self) -> f32[src]

Get the pattern duty cycle as a percentage value from 0.0 to 1.0

pub fn as_duty<T: Num + NumCast + PartialOrd + Copy>(&self, max_duty: T) -> T[src]

Get the pattern duty cycle as a value from 0 to max_duty.

The max_duty should be the output of embedded_hal::PwmPin::get_max_duty()

Trait Implementations

impl Clone for Pattern[src]

impl Copy for Pattern[src]

impl Debug for Pattern[src]

Auto Trait Implementations

impl RefUnwindSafe for Pattern

impl Send for Pattern

impl Sync for Pattern

impl Unpin for Pattern

impl UnwindSafe for Pattern

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.