fixed bug where play button was not working after changing modes
This commit is contained in:
@ -293,6 +293,8 @@ void resetClocks() {
|
||||
channelPulseCount[i] = 0;
|
||||
digitalWrite(outsPins[i], LOW); //to avoid stuck leds
|
||||
}
|
||||
pulseCount = 0;
|
||||
tickCount = 0;
|
||||
}
|
||||
|
||||
void saveState() {
|
||||
@ -337,6 +339,10 @@ void checkInputs() {
|
||||
masterClockMode++;
|
||||
} else {
|
||||
masterClockMode = 0;
|
||||
isPlaying = false; // These don't seem to help with play btn not working after switching modes
|
||||
resetClocks(); // so maybe remove them
|
||||
calculateBPMTiming(); //
|
||||
calculateCycles(); //
|
||||
}
|
||||
updateScreen();
|
||||
}
|
||||
@ -391,7 +397,7 @@ void checkInputs() {
|
||||
}
|
||||
|
||||
//play button
|
||||
if (!digitalRead(START_STOP_BTN_PIN) && !playBtnPushed) {
|
||||
if (!digitalRead(START_STOP_BTN_PIN) && !playBtnPushed && masterClockMode == 0) {
|
||||
resetClocks();
|
||||
isPlaying = !isPlaying;
|
||||
playBtnPushed = true;
|
||||
|
||||
Reference in New Issue
Block a user