Tall cursor backdrop
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user