Tall cursor backdrop

This commit is contained in:
Dejvino
2026-02-19 00:10:10 +01:00
parent 66c20de208
commit de6775a7d7
6 changed files with 26 additions and 28 deletions
+19
View File
@@ -9,6 +9,11 @@
#include "PlaybackThread.h"
#include "SharedState.h"
// Watchdog
volatile unsigned long lastLoop0Time = 0;
volatile unsigned long lastLoop1Time = 0;
volatile bool watchdogActive = false;
// Encoder State
static uint8_t prevNextCode = 0;
static uint16_t store = 0;
@@ -75,9 +80,23 @@ void setup() {
}
void loop1() {
unsigned long now = millis();
lastLoop1Time = now;
if (watchdogActive && (now - lastLoop0Time > 1000)) {
Serial.println("Core 0 Freeze detected");
rp2040.reboot();
}
loopPlayback();
}
void loop() {
unsigned long now = millis();
lastLoop0Time = now;
if (watchdogActive && (now - lastLoop1Time > 1000)) {
Serial.println("Core 1 Freeze detected");
rp2040.reboot();
}
loopUI();
}