Package ca.team4308.absolutelib.leds
Class Patterns
java.lang.Object
ca.team4308.absolutelib.leds.Patterns
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final doublestatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LEDPatternaltF4()Creates the default ALT-F4 pattern with standard speed.static LEDPatternaltF4Pattern(double expandSpeed) Creates the ALT-F4 pattern This is really oringal guysstatic LEDPatternchasingDot(Color color) Creates a chasing dot pattern.static LEDPatterncreateBlinkingPattern(Color color, double periodSeconds) Creates a blinking patternstatic LEDPatterncreateBreathingPattern(Color baseColor, double periodSeconds) Creates a breathing pattern that fades between colorsstatic LEDPatterncreateProgressPattern(Color color, double progress) Creates a progress bar patternstatic LEDPatterncreateRainbowPattern(int saturation, int value, double speedMPS, double spacing) Creates a rainbow pattern with customizable parametersstatic LEDPatterncreateSolidPattern(Color color) Creates a solid color patternstatic LEDPatternCreates a default scrolling idle pattern using alliance colors.static LEDPatternerror()Creates an error pattern.static LEDPatterngetAllianceBreathing(Color color, double periodSeconds) Creates a breathing alliance-colored patternstatic LEDPatterngetAlliancePattern(Color color) Creates an alliance-colored pattern (red or blue based on driver station)static LEDPatternidle()Creates a standard idle pattern.static LEDPatternCreates a rainbow chase pattern.static LEDPatternscrollingIdle(Color baseColor, int scrollSpeed) Creates a scrolling idle pattern that transitions from base color to white.static LEDPatternsuccess()Creates a success pattern.static LEDPatternwarning()Creates a warning pattern.
-
Field Details
-
DEFAULT_PATTERN_LENGTH
public static final int DEFAULT_PATTERN_LENGTH- See Also:
-
DEFAULT_SCROLL_SPEED
public static final int DEFAULT_SCROLL_SPEED- See Also:
-
DEFAULT_BREATHE_PERIOD
public static final double DEFAULT_BREATHE_PERIOD- See Also:
-
DEFAULT_BLINK_PERIOD
public static final double DEFAULT_BLINK_PERIOD- See Also:
-
-
Constructor Details
-
Patterns
public Patterns()
-
-
Method Details
-
idle
Creates a standard idle pattern. Gentle breathing effect with the default idle color.- Returns:
- LEDPattern for idle state
-
warning
Creates a warning pattern. Fast blinking with warning color.- Returns:
- LEDPattern for warning state
-
error
Creates an error pattern. Rapid blinking with error color.- Returns:
- LEDPattern for error state
-
success
Creates a success pattern. Solid success color with optional pulse.- Returns:
- LEDPattern for success state
-
rainbowChase
Creates a rainbow chase pattern. Scrolling rainbow effect with customizable speed.- Returns:
- LEDPattern with rainbow chase effect
-
getAlliancePattern
Creates an alliance-colored pattern (red or blue based on driver station) -
getAllianceBreathing
Creates a breathing alliance-colored pattern -
createRainbowPattern
public static LEDPattern createRainbowPattern(int saturation, int value, double speedMPS, double spacing) Creates a rainbow pattern with customizable parameters -
createBreathingPattern
Creates a breathing pattern that fades between colors -
createBlinkingPattern
Creates a blinking pattern -
createSolidPattern
Creates a solid color pattern -
createProgressPattern
Creates a progress bar pattern -
chasingDot
Creates a chasing dot pattern. Single color dot moving along the strip.- Parameters:
color- The color of the moving dot- Returns:
- LEDPattern with chasing dot effect
-
scrollingIdle
Creates a scrolling idle pattern that transitions from base color to white.- Parameters:
baseColor- The base color to fade fromscrollSpeed- The speed of scrolling- Returns:
- LEDPattern for scrolling idle state
-
defaultScrollingIdle
Creates a default scrolling idle pattern using alliance colors.- Returns:
- LEDPattern for alliance-colored scrolling idle state
-
altF4Pattern
Creates the ALT-F4 pattern This is really oringal guys- Parameters:
expandSpeed- Speed of dot expansion (pixels per second)- Returns:
- LEDPattern for the ALT-F4 effect
-
altF4
Creates the default ALT-F4 pattern with standard speed.- Returns:
- LEDPattern for the ALT-F4 effect
-