11template <u
int16_t NumLEDs>
42template <u
int8_t NumLEDs>
91 this->
dirty |= newdirty;
112 this->
dirty |= newdirty;
133template <u
int8_t BankSize, u
int8_t NumLEDs>
160 :
Parent(config, track, channelCN, decayTime),
184 bool newdirty = Parent::handleUpdateImpl(match);
187 this->
dirty |= newdirty;
208 this->
dirty |= newdirty;
213 Parent::onBankSettingChange();
#define BEGIN_CS_NAMESPACE
void display(uint16_t value) const
Display the given number of LEDs on the LED bar.
DotBarDisplayLEDs(const PinList< N > &ledPins)
Constructor from list of pins.
void begin() const
Initialize (set LED pins as outputs).
A MIDI input element that represents a Mackie Control Universal VU meter and displays its value using...
void update() override
Decay the VU meter.
void onBankSettingChange() override
A function to be executed each time the bank setting changes.
VULEDs(BankConfig< BankSize > config, const PinList< NumLEDs > &leds, uint8_t track, MIDIChannelCable channelCN, unsigned int decayTime=VUDecay::Default)
VULEDs(BankConfig< BankSize > config, const PinList< NumLEDs > &leds, uint8_t track, unsigned int decayTime=VUDecay::Default)
void begin() override
Initialize the input element.
void handleUpdate(typename Matcher::Result match) override
typename Parent::Matcher Matcher
void reset() override
Reset all values to zero.
A MIDI input element that represents a Mackie Control Universal VU meter.
uint8_t getValue() override
Get the most recent VU position that was received for the active bank.
Small helper to display the VU meters on an LED bar display.
static constexpr uint8_t FLOOR_CORRECTION
void displayVU(uint16_t value)
VULEDsDriver(const PinList< NumLEDs > &leds)
Constructor.
A MIDI input element that represents a Mackie Control Universal VU meter and displays its value using...
VULEDs(const PinList< NumLEDs > &leds, uint8_t track, MIDIChannelCable channelCN, unsigned int decayTime=VUDecay::Default)
void update() override
Decay the VU meter.
VULEDs(const PinList< NumLEDs > &leds, uint8_t track, unsigned int decayTime=VUDecay::Default)
void begin() override
Initialize the input element.
void handleUpdate(typename Matcher::Result match) override
typename Parent::Matcher Matcher
void reset() override
Reset all values to zero.
A MIDI input element that represents a Mackie Control Universal VU meter.
uint8_t getValue() override
Get the most recent VU position that was received.
bool handleUpdateImpl(typename Matcher::Result match)
VU(uint8_t track, MIDIChannelCable channelCN, unsigned int decayTime=VUDecay::Default)
Constructor.
void reset() override
Reset all values to zero.
A class for saving a MIDI channel and cable number.
A namespace for MIDI elements that can be added to a Bank, to change their address or channel.
constexpr unsigned int Default
Decay one segment/block every 150 ms if no new values are received.
An array wrapper for easy copying, comparing, and iterating.
T * begin()
Get a pointer to the first element.