Skip to content

Commit

Permalink
Fixes bugs with strum mode combined with macro and pots.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quixotic7 committed Feb 20, 2024
1 parent 4b8659a commit 83e0e19
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions OMX-27-firmware/src/modes/omx_mode_chords.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,7 @@ void OmxModeChords::onPotChanged(int potIndex, int prevValue, int newValue, int
macroConsumesPots = activeMacro->consumesPots();
}

// Note, these get sent even if macro mode is not active
if (macroConsumesPots)
if (macroActive_ && macroConsumesPots)
{
activeMacro->onPotChanged(potIndex, prevValue, newValue, analogDelta);
omxDisp.setDirty();
Expand Down Expand Up @@ -1434,7 +1433,6 @@ void OmxModeChords::onKeyUpdate(OMXKeypadEvent e)
// }
else if (mode_ == CHRDMODE_MANSTRUM) // Manual Strum
{
// Enter chord edit mode
selectedChord_ = thisKey - 11;
heldChord_ = thisKey - 11;
lastKeyWasKeyboard_ = false;
Expand Down Expand Up @@ -2933,10 +2931,10 @@ void OmxModeChords::onDisplayUpdate()
{
omxDisp.dispGenericModeLabel("Copy to", params->getNumPages(), params->getSelPage());
}
// if (chordEditMode_ == false && (mode_ == CHRDMODE_PLAY || mode_ == CHRDMODE_EDIT || mode_ == CHRDMODE_MANSTRUM) && funcKeyMode_ == FUNCKEYMODE_F2) // Play mode copy
// {
// omxDisp.dispGenericModeLabel("Copy to", params->getNumPages(), params->getSelPage());
// }
if (chordEditMode_ == false && (mode_ == CHRDMODE_PLAY || mode_ == CHRDMODE_EDIT || mode_ == CHRDMODE_MANSTRUM) && funcKeyMode_ == FUNCKEYMODE_F2) // Play mode copy
{
omxDisp.dispGenericModeLabel("Copy to", params->getNumPages(), params->getSelPage());
}
// else if (chordEditMode_ == false && (mode_ == CHRDMODE_PRESET) && funcKeyMode_ == FUNCKEYMODE_F1) // Preset move load
// {
// omxDisp.dispGenericModeLabel("Load from", params->getNumPages(), params->getSelPage());
Expand All @@ -2945,10 +2943,10 @@ void OmxModeChords::onDisplayUpdate()
// {
// omxDisp.dispGenericModeLabel("Save to", params->getNumPages(), params->getSelPage());
// }
// else if (chordEditMode_ == false && mode_ == CHRDMODE_MANSTRUM)
// {
// omxDisp.dispGenericModeLabel("Enc Strum", params->getNumPages(), 0);
// }
else if (chordEditMode_ == false && mode_ == CHRDMODE_MANSTRUM)
{
omxDisp.dispGenericModeLabel("Enc Strum", params->getNumPages(), 0);
}
else if (params->getSelPage() == CHRDPAGE_NOTES)
{
if (chordNotes_[selectedChord_].active || chordEditNotes_.active)
Expand Down

0 comments on commit 83e0e19

Please sign in to comment.