PlayLEDPatternCommand
public struct PlayLEDPatternCommand : CommandRequest
                Command to request the Gear to play an LED pattern.
Note that not all Gear components have LEDs, you can inspect Component.capabilities.
See also
Commands
- 
                  
                  
Errors thrown by
See morePlayLEDPatternCommand.Declaration
Swift
public enum Error : Swift.Errorextension PlayLEDPatternCommand.Error: CustomStringConvertible - 
                  
                  
Available LED patterns.
See moreDeclaration
Swift
public enum LEDPatternType : CustomStringConvertible - 
                  
                  
Options for modifying LED Commands.
See moreDeclaration
Swift
public enum LEDPatternPlayType : CustomStringConvertible - 
                  
                  
PlayLEDPatternCommand response value is an empty Void to indicate success.
Declaration
Swift
public typealias Response = Void - 
                  
                  
Initializes a
PlayLEDPatterncommand with a custom pattern.If the combined duration of Frames is less than
durationMs, the pattern will be repeated untildurationMshas elapsed.Declaration
Swift
public init( frames: [Frame], durationMs: Int, component: Component, patternType: LEDPatternType = .custom, isResumable: Bool = false, playPauseToggle: LEDPatternPlayType = .play, haltAll: Bool = false ) throwsParameters
framesThe sequence of
Frames that make a pattern.durationMsThe length of time to repeat the frames for.
componentThe component that the pattern will be played on.
patternTypeThe pattern of the LED to play.
isResumableIf
truethe Led Pattern will resume, if it is interrupted by anotherPlayLEDPatternCommandplayPauseToggleEnables tag to make a decision whether to start the new pattern or stop an ongoing pattern.
haltAllIf
trueany Led Pattern that is playing will be stopped.Throwsif the component does not have an LED.
 - 
                  
                  
Initializes a
PlayLEDPatterncommand with a predefined pattern.Declaration
Swift
public init( color: Color, durationMs: Int, component: Component, patternType: LEDPatternType = .solid, isResumable: Bool = false, playPauseToggle: LEDPatternPlayType = .play, haltAll: Bool = false ) throwsParameters
colorThe color to use for the pattern.
durationMsThe length of time to repeat the pattern for.
componentThe component that the pattern will be played on.
patternTypeThe pattern of the LED to play.
isResumableIf
truethe Led Pattern will resume, if it is interrupted by anotherPlayLEDPatternCommandplayPauseToggleEnables tag to make a decision whether to start the new pattern or stop an ongoing pattern.
haltAllIf
trueany Led Pattern that is playing will be stopped.Throwsif the component does not have an LED.
 - 
                  
                  
RGB representation of target color.
See moreDeclaration
Swift
public struct Color - 
                  
                  
Color and time duration for frame.
See moreDeclaration
Swift
public struct Frame 
            View on GitHub
          
      PlayLEDPatternCommand Structure Reference