Fix deadlock in loading + configurable steps count
This commit is contained in:
+9
-1
@@ -58,15 +58,19 @@ void setup() {
|
||||
// 5. Init Sequence
|
||||
randomSeed(micros());
|
||||
|
||||
Serial.println(F("Loading sequence."));
|
||||
EEPROM.begin(512);
|
||||
if (!loadSequence()) {
|
||||
generateRandomScale();
|
||||
Serial.println(F("Starting fresh instead."));
|
||||
numSteps = NUM_STEPS;
|
||||
|
||||
for(int i=0; i<NUM_TRACKS; i++) {
|
||||
midiChannels[i] = i + 1;
|
||||
melodySeeds[i] = random(10000);
|
||||
currentStrategyIndices[i] = 0;
|
||||
trackMute[i] = false;
|
||||
}
|
||||
generateRandomScale();
|
||||
generateTheme(1);
|
||||
}
|
||||
isPlaying = false; // Don't start playing on boot
|
||||
@@ -80,6 +84,10 @@ void setup() {
|
||||
}
|
||||
|
||||
void loop1() {
|
||||
if (!watchdogActive) {
|
||||
delay(100);
|
||||
return;
|
||||
}
|
||||
unsigned long now = millis();
|
||||
lastLoop1Time = now;
|
||||
if (watchdogActive && (now - lastLoop0Time > 1000)) {
|
||||
|
||||
Reference in New Issue
Block a user