Add visual MIDI activity indicator
Flash LED 0 white for 30ms on any MIDI input. Visible without serial - helps diagnose whether MIDI is arriving when connected to iPad with Loopy Pro.
This commit is contained in:
@@ -10,6 +10,8 @@ public:
|
||||
virtual void set_led_state(uint8_t note, uint8_t channel, uint8_t velocity) = 0;
|
||||
virtual void clear_all() = 0;
|
||||
virtual void set_led_brightness(uint8_t brightness) = 0;
|
||||
virtual void flash_activity() {}
|
||||
virtual void update() {}
|
||||
|
||||
virtual uint8_t note_to_index(uint8_t note) {
|
||||
return note;
|
||||
@@ -31,6 +33,8 @@ private:
|
||||
static const uint8_t NUM_LEDS = 10;
|
||||
LedState led_states[NUM_LEDS];
|
||||
bool initialized;
|
||||
uint32_t activity_off_time = 0;
|
||||
uint8_t saved_r = 0, saved_g = 0, saved_b = 0;
|
||||
|
||||
public:
|
||||
DefaultLedStub();
|
||||
@@ -38,6 +42,8 @@ public:
|
||||
void set_led_state(uint8_t note, uint8_t channel, uint8_t velocity) override;
|
||||
void clear_all() override;
|
||||
void set_led_brightness(uint8_t brightness) override;
|
||||
void flash_activity() override;
|
||||
void update() override;
|
||||
|
||||
void set_mux(PixelStompMux* mux);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user