Package com.marslib.hmi
Class LEDIOAddressable
java.lang.Object
com.marslib.hmi.LEDIOAddressable
- All Implemented Interfaces:
LEDIO
Hardware IO implementation for driving WS2812B Addressable LEDs via a PWM port.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.marslib.hmi.LEDIO
LEDIO.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the LEDs to a critical fault warning color (e.g., flashing red).voidSets the LEDs to their default color state (e.g., solid blue).voidSets the LEDs to a load shedding warning color (e.g., solid orange).voidupdate()Periodically updates the underlying LED buffer based on the current state.
-
Constructor Details
-
LEDIOAddressable
public LEDIOAddressable(int pwmPort, int length)
-
-
Method Details
-
setDefaultColors
public void setDefaultColors()Sets the LEDs to their default color state (e.g., solid blue).- Specified by:
setDefaultColorsin interfaceLEDIO
-
setLoadSheddingColors
public void setLoadSheddingColors()Sets the LEDs to a load shedding warning color (e.g., solid orange).- Specified by:
setLoadSheddingColorsin interfaceLEDIO
-
setCriticalFaultFlash
public void setCriticalFaultFlash()Sets the LEDs to a critical fault warning color (e.g., flashing red).- Specified by:
setCriticalFaultFlashin interfaceLEDIO
-
update
public void update()Periodically updates the underlying LED buffer based on the current state.
-