Skip to content

Commit

Permalink
Merge pull request #24 from twistedelectrons/saveFix
Browse files Browse the repository at this point in the history
rest quits save, bank change resets countDown
  • Loading branch information
twisted-electrons authored May 9, 2023
2 parents db3d984 + e5546fe commit aa58fb9
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions src/buttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ void buttChanged(Button number, bool value) {

case kButtonSquare:
if (bankCounter) {
if (presetTargetMode) {
presetCounts = 40;
}
bank = 0;
ledSet(16 + bank, 1);
flashCounter2 = 0;
Expand All @@ -400,6 +403,9 @@ void buttChanged(Button number, bool value) {

case kButtonTriangle:
if (bankCounter) {
if (presetTargetMode) {
presetCounts = 40;
}
bank = 1;
ledSet(16 + bank, 1);
flashCounter2 = 0;
Expand All @@ -426,6 +432,9 @@ void buttChanged(Button number, bool value) {

case kButtonSaw:
if (bankCounter) {
if (presetTargetMode) {
presetCounts = 40;
}
bank = 2;
ledSet(16 + bank, 1);
flashCounter2 = 0;
Expand Down Expand Up @@ -469,6 +478,9 @@ void buttChanged(Button number, bool value) {

case kButtonNoise:
if (bankCounter) {
if (presetTargetMode) {
presetCounts = 40;
}
bank = 3;
ledSet(16 + bank, 1);
flashCounter2 = 0;
Expand Down Expand Up @@ -516,6 +528,9 @@ void buttChanged(Button number, bool value) {

case kButtonRetrig:
if (bankCounter) {
if (presetTargetMode) {
presetCounts = 40;
}
bank = 4;
ledSet(16 + bank, 1);
flashCounter2 = 0;
Expand All @@ -537,6 +552,9 @@ void buttChanged(Button number, bool value) {
break; // retrig
case kButtonLoop:
if (bankCounter) {
if (presetTargetMode) {
presetCounts = 40;
}
bank = 5;
ledSet(16 + bank, 1);
flashCounter2 = 0;
Expand Down Expand Up @@ -716,17 +734,22 @@ void buttChanged(Button number, bool value) {
break; // preset down

case kButtonPresetReset:
if (!shuffled) {
if (!resetFunction) {
loadZero();
digit(0, 14);
digit(1, 0);
} else {
panel();
if (presetTargetMode) {
presetTargetMode = false;
} else {
if (!shuffled) {
if (!resetFunction) {
loadZero();
digit(0, 14);
digit(1, 0);
} else {
panel();
}
resetFunction = !resetFunction;
}
resetFunction = !resetFunction;
}
resetHeld = false;

break; // reset

case kButtonArpMode:
Expand Down

0 comments on commit aa58fb9

Please sign in to comment.