MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
8 #include <AH/Hardware/LEDs/LEDs.hpp>
43 else if (mode == DotBarMode::Bar)
44 this->displayRange(0, value);
46 this->displayDot(value - 1);
69 void dotMode() { setMode(DotBarMode::Dot); }
72 void barMode() { setMode(DotBarMode::Bar); }
75 void toggleMode() { getMode() == DotBarMode::Bar ? dotMode() : barMode(); }
void display(uint8_t value) const
Display the given number of LEDs on the LED bar.
Turn on only the active LED.
void barMode()
Set the mode to bar mode.
#define AH_DIAGNOSTIC_POP()
void setMode(DotBarMode mode)
Set the mode to either dot or bar mode.
void display(float value) const
Display the given fraction of the LED bar.
DotBarMode
An enumeration type to set an LED display to either bar or dot mode.
DotBarDisplayLEDs(const PinList< N > &ledPins)
Constructor from list of pins.
Turn on a range of LEDs up to the active LED.
void toggleMode()
Toggle the dot/bar mode.
DotBarMode getMode() const
Get the dot/bar mode.
void dotMode()
Set the mode to dot mode.
A class for collections of LEDs that can display ranges.
#define AH_DIAGNOSTIC_WERROR()
#define BEGIN_AH_NAMESPACE