#include <MIDI_Inputs/LEDs/MCU/VULEDs.hpp>
Small helper to display the VU meters on an LED bar display.
Definition at line 12 of file VULEDs.hpp.
Public Member Functions | |
VULEDsDriver (const PinList< NumLEDs > &leds) | |
Constructor. | |
void | displayVU (uint16_t value) |
void | display (uint16_t value) const |
Display the given number of LEDs on the LED bar. | |
void | display (float value) const |
Display the given fraction of the LED bar. | |
DotBarMode | getMode () const |
Get the dot/bar mode. | |
void | setMode (DotBarMode mode) |
Set the mode to either dot or bar mode. | |
void | dotMode () |
Set the mode to dot mode. | |
void | barMode () |
Set the mode to bar mode. | |
void | toggleMode () |
Toggle the dot/bar mode. | |
void | begin () const |
Initialize (set LED pins as outputs). | |
void | displayRange (uint16_t startOn, uint16_t startOff) const |
Turn on a range of the LEDs. | |
void | set (uint16_t index) const |
Turn on the given LED. | |
void | clear (uint16_t index) const |
Turn off the given LED. | |
void | clear () const |
Turn off all LEDs. | |
void | displayDot (uint16_t led) const |
Turn on a single LED, and turn off all others. | |
Private Attributes | |
DotBarMode | mode |
const PinList< N > | ledPins |
Static Private Attributes | |
static constexpr uint8_t | FLOOR_CORRECTION = 5 |
|
inline |
Constructor.
Definition at line 15 of file VULEDs.hpp.
|
inline |
value | [0, 12] |
Definition at line 20 of file VULEDs.hpp.
|
inlineinherited |
Display the given number of LEDs on the LED bar.
value | The number of the LED to activate. |
Definition at line 37 of file DotBarDisplayLEDs.hpp.
|
inlineinherited |
Display the given fraction of the LED bar.
value | The fraction of the LED bar to display. |
Definition at line 52 of file DotBarDisplayLEDs.hpp.
|
inlineinherited |
Get the dot/bar mode.
Definition at line 55 of file DotBarDisplayLEDs.hpp.
|
inlineinherited |
Set the mode to either dot or bar mode.
mode | The mode. |
Definition at line 63 of file DotBarDisplayLEDs.hpp.
|
inlineinherited |
Set the mode to dot mode.
Definition at line 66 of file DotBarDisplayLEDs.hpp.
|
inlineinherited |
Set the mode to bar mode.
Definition at line 69 of file DotBarDisplayLEDs.hpp.
|
inlineinherited |
Toggle the dot/bar mode.
Definition at line 72 of file DotBarDisplayLEDs.hpp.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
staticconstexprprivate |
Definition at line 27 of file VULEDs.hpp.
|
privateinherited |
Definition at line 75 of file DotBarDisplayLEDs.hpp.
|
privateinherited |