Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
Public Member Functions | List of all members
modules::leds::LEDs Class Reference

The main LEDs API takes care of the whole set of LEDs. More...

#include <leds.h>

Public Member Functions

void Step ()
 step LED automaton
 
constexpr uint8_t LedPairsCount () const
 
void SetMode (uint8_t slot, Color color, Mode mode)
 
void SetMode (uint8_t index, Mode mode)
 
leds::Mode Mode (uint8_t slot, Color color)
 
leds::Mode Mode (uint8_t index)
 
bool LedOn (uint8_t index) const
 
bool LedOn (uint8_t slot, Color color) const
 
void SetPairButOffOthers (uint8_t activeSlot, modules::leds::Mode greenMode, modules::leds::Mode redMode)
 Sets active slot LEDs to some mode and turns off all the others.
 
void SetAllOff ()
 Turn off all LEDs.
 

Detailed Description

The main LEDs API takes care of the whole set of LEDs.

Member Function Documentation

◆ LedOn() [1/2]

bool modules::leds::LEDs::LedOn ( uint8_t  index) const
inline
Returns
true if a LED is shining
Parameters
index- raw index of the LED in the internal leds array

◆ LedOn() [2/2]

bool modules::leds::LEDs::LedOn ( uint8_t  slot,
Color  color 
) const
inline
Returns
true if a LED is shining
Parameters
slotindex of filament slot (index of the LED pair)
colorgreen or red LED

◆ LedPairsCount()

constexpr uint8_t modules::leds::LEDs::LedPairsCount ( ) const
inlineconstexpr
Returns
the number of LED pairs

◆ Mode() [1/2]

leds::Mode modules::leds::LEDs::Mode ( uint8_t  index)
inline
Returns
the currently active mode of a LED
Parameters
index- raw index of the LED in the internal leds array

◆ Mode() [2/2]

leds::Mode modules::leds::LEDs::Mode ( uint8_t  slot,
Color  color 
)
inline
Returns
the currently active mode of a LED in a pair
Parameters
slotindex of filament slot (index of the LED pair)
colorgreen or red LED

◆ SetMode() [1/2]

void modules::leds::LEDs::SetMode ( uint8_t  index,
Mode  mode 
)
inline

Sets the mode of a LED in a pair

Parameters
index- raw index of the LED in the internal leds array
modeto set

◆ SetMode() [2/2]

void modules::leds::LEDs::SetMode ( uint8_t  slot,
Color  color,
Mode  mode 
)
inline

Sets the mode of a LED in a pair

Parameters
slotindex of filament slot (index of the LED pair)
colorgreen or red LED
modeto set

The documentation for this class was generated from the following files: