Fix compilation: remove unused flash_sysex/flash_all/flash_one methods and member vars
This commit is contained in:
@@ -35,8 +35,6 @@ private:
|
|||||||
bool initialized;
|
bool initialized;
|
||||||
uint32_t activity_off_time = 0;
|
uint32_t activity_off_time = 0;
|
||||||
uint8_t saved_r = 0, saved_g = 0, saved_b = 0;
|
uint8_t saved_r = 0, saved_g = 0, saved_b = 0;
|
||||||
uint8_t sysex_saved_r[10] = {0}, sysex_saved_g[10] = {0}, sysex_saved_b[10] = {0};
|
|
||||||
bool sysex_flash_active = false;
|
|
||||||
uint32_t heartbeat_time = 0;
|
uint32_t heartbeat_time = 0;
|
||||||
uint8_t heartbeat_phase = 0;
|
uint8_t heartbeat_phase = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -283,34 +283,6 @@ void DefaultLedStub::flash_activity() {
|
|||||||
activity_off_time = now + 50;
|
activity_off_time = now + 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultLedStub::flash_sysex() {
|
|
||||||
if (!initialized || !mux_ptr) return;
|
|
||||||
|
|
||||||
uint32_t now = millis();
|
|
||||||
|
|
||||||
// Save all LED states
|
|
||||||
for (int i = 0; i < NUM_LEDS; i++) {
|
|
||||||
if (led_states[i].active) {
|
|
||||||
uint32_t color = launchpad_palette[led_states[i].velocity];
|
|
||||||
sysex_saved_r[i] = (color >> 16) & 0xFF;
|
|
||||||
sysex_saved_g[i] = (color >> 8) & 0xFF;
|
|
||||||
sysex_saved_b[i] = color & 0xFF;
|
|
||||||
} else {
|
|
||||||
sysex_saved_r[i] = 0;
|
|
||||||
sysex_saved_g[i] = 0;
|
|
||||||
sysex_saved_b[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flash ALL LEDs white
|
|
||||||
for (int i = 0; i < NUM_LEDS; i++) {
|
|
||||||
mux_ptr->set_led_color(i, 255, 255, 255);
|
|
||||||
}
|
|
||||||
mux_ptr->show();
|
|
||||||
activity_off_time = now + 200;
|
|
||||||
sysex_flash_active = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DefaultLedStub::update() {
|
void DefaultLedStub::update() {
|
||||||
if (!initialized || !mux_ptr) return;
|
if (!initialized || !mux_ptr) return;
|
||||||
|
|
||||||
@@ -345,50 +317,3 @@ void DefaultLedStub::update() {
|
|||||||
if (heartbeat_phase > 200) heartbeat_phase = 0;
|
if (heartbeat_phase > 200) heartbeat_phase = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultLedStub::flash_all(uint8_t r, uint8_t g, uint8_t b, uint16_t duration) {
|
|
||||||
if (!initialized || !mux_ptr) return;
|
|
||||||
|
|
||||||
// Save all LED states
|
|
||||||
for (int i = 0; i < NUM_LEDS; i++) {
|
|
||||||
if (led_states[i].active) {
|
|
||||||
uint32_t color = launchpad_palette[led_states[i].velocity];
|
|
||||||
sysex_saved_r[i] = (color >> 16) & 0xFF;
|
|
||||||
sysex_saved_g[i] = (color >> 8) & 0xFF;
|
|
||||||
sysex_saved_b[i] = color & 0xFF;
|
|
||||||
} else {
|
|
||||||
sysex_saved_r[i] = 0;
|
|
||||||
sysex_saved_g[i] = 0;
|
|
||||||
sysex_saved_b[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < NUM_LEDS; i++) {
|
|
||||||
mux_ptr->set_led_color(i, r, g, b);
|
|
||||||
}
|
|
||||||
mux_ptr->show();
|
|
||||||
activity_off_time = millis() + duration;
|
|
||||||
sysex_flash_active = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DefaultLedStub::flash_one(uint8_t index, uint8_t r, uint8_t g, uint8_t b, uint16_t duration) {
|
|
||||||
if (!initialized || !mux_ptr) return;
|
|
||||||
if (index >= NUM_LEDS) return;
|
|
||||||
|
|
||||||
// Save only this LED's state
|
|
||||||
if (led_states[index].active) {
|
|
||||||
uint32_t color = launchpad_palette[led_states[index].velocity];
|
|
||||||
saved_r = (color >> 16) & 0xFF;
|
|
||||||
saved_g = (color >> 8) & 0xFF;
|
|
||||||
saved_b = color & 0xFF;
|
|
||||||
} else {
|
|
||||||
saved_r = 0;
|
|
||||||
saved_g = 0;
|
|
||||||
saved_b = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
mux_ptr->set_led_color(index, r, g, b);
|
|
||||||
mux_ptr->show();
|
|
||||||
activity_off_time = millis() + duration;
|
|
||||||
sysex_flash_active = false;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user