Skip to content

Commit 5e2f6c0

Browse files
committed
LEDOutput add display() method to be consistent with UNO
1 parent 1b5d163 commit 5e2f6c0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/AudioLibs/LEDOutput.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ class LEDOutput {
113113
if (cfg.update_callback != nullptr && count++ % cfg.update_frequency == 0) {
114114
// use custom update logic defined in config
115115
cfg.update_callback(&cfg, this);
116+
} else {
117+
display();
116118
}
117119
}
118120

@@ -183,6 +185,11 @@ class LEDOutput {
183185
return max;
184186
}
185187

188+
/// Update the led_matrix (calling FastLED.show();
189+
void display() {
190+
FastLED.show();
191+
}
192+
186193
/// Provides acces to the FFTDisplay object
187194
FFTDisplay &fftDisplay() { return *p_fft; }
188195

src/AudioLibs/LEDOutputUnoR4.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ class LEDOutputUnoR4 {
7878
if (cfg.update_callback != nullptr && count++ % cfg.update_frequency == 0) {
7979
// use custom update logic defined in config
8080
cfg.update_callback(&cfg, this);
81+
} else {
82+
display();
8183
}
8284
}
8385

0 commit comments

Comments
 (0)