Clean up: small diagnostic fixes (red flash alert, USB mounted status)
This commit is contained in:
+15
-1
@@ -42,10 +42,24 @@ void midi_task(void* parameter) {
|
|||||||
mux.show();
|
mux.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If no clock ever arrives, flash pixel 6 red periodically so user knows
|
||||||
|
static uint32_t last_noclk_flash = 0;
|
||||||
|
if (tick == 0 && now - last_noclk_flash > 3000) {
|
||||||
|
last_noclk_flash = now;
|
||||||
|
mux.set_led_color(6, 255, 0, 0);
|
||||||
|
mux.show();
|
||||||
|
delay(150);
|
||||||
|
mux.set_led_color(6, 20, 20, 20);
|
||||||
|
mux.show();
|
||||||
|
Serial.println("[CLK] !! NO MIDI CLOCK RECEIVED - check Loopy Pro sync settings !!");
|
||||||
|
}
|
||||||
|
|
||||||
static uint32_t last_diag = 0;
|
static uint32_t last_diag = 0;
|
||||||
if (now - last_diag > 2000) {
|
if (now - last_diag > 2000) {
|
||||||
last_diag = now;
|
last_diag = now;
|
||||||
Serial.printf("[CLK] ticks=%lu beat=%lu\n", (unsigned long)tick, (unsigned long)last_beat);
|
Serial.printf("[CLK] ticks=%lu beat=%lu mounted=%s\n",
|
||||||
|
(unsigned long)tick, (unsigned long)last_beat,
|
||||||
|
TinyUSBDevice.mounted() ? "YES" : "NO");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flash_start > 0) {
|
if (flash_start > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user