Remove all LED pulsing - returning to stable baseline

Pulsing code was causing crashes (FastLED.show() RMT conflict with USB).
Removed:
- update() is now empty no-op (was calling mux_ptr->show() every 33ms)
- Removed set_bpm(), beat_interval_ms, bpm serial command
Kept:
- Per-pad LED colors with dim off state (working fine)
- All button/MIDI/expression pedal functionality
This commit is contained in:
ash
2026-07-02 07:53:30 +00:00
parent 483fd1d000
commit 76a584a5ef
3 changed files with 0 additions and 44 deletions
-31
View File
@@ -299,36 +299,5 @@ void DefaultLedStub::flash_activity() {
// LED feedback is handled directly by set_led_state().
}
void DefaultLedStub::set_bpm(uint16_t bpm) {
if (bpm == 0) bpm = 120;
beat_interval_ms = 60000 / bpm;
Serial.printf("[LED] Pulse BPM set to %d (%dms)\n", bpm, beat_interval_ms);
}
void DefaultLedStub::update() {
if (!initialized || !mux_ptr) return;
uint32_t now = millis();
static uint32_t last_pulse_update = 0;
if (now - last_pulse_update < 33) return;
last_pulse_update = now;
float phase = (now % beat_interval_ms) / (float)beat_interval_ms;
// Instant-on at beat, quick fade to 0 by phase 0.25
float pulse = 1.0f - phase * 4.0f;
if (pulse < 0.0f) pulse = 0.0f;
// Active LEDs keep their last set_led_state() color — don't override.
// Pixel 6 pulses only when not active (visual metronome for timing).
if (!led_states[6].active) {
float brightness = 0.3f + 0.7f * pulse;
uint32_t base = pad_base_colors[6];
uint8_t r = (uint8_t)(((base >> 16) & 0xFF) * brightness);
uint8_t g = (uint8_t)(((base >> 8) & 0xFF) * brightness);
uint8_t b = (uint8_t)((base & 0xFF) * brightness);
mux_ptr->set_led_color(6, r, g, b);
mux_ptr->show();
}
}