Skip to content

Commit

Permalink
Might fix T4 pots in Grids
Browse files Browse the repository at this point in the history
  • Loading branch information
Quixotic7 committed Mar 25, 2024
1 parent f08189b commit a9dd0fe
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OMX-27-firmware/OMX-27-firmware.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// OMX-27 MIDI KEYBOARD / SEQUENCER

// v1.13.4
// v1.13.5
// Last update: Feb 2024
//
// Original concept and initial code by Steven Noreyko
Expand Down
4 changes: 2 additions & 2 deletions OMX-27-firmware/src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
// #include <cstdarg>

/* * firmware metadata */
// OMX_VERSION = 1.13.4
// OMX_VERSION = 1.13.5
const int MAJOR_VERSION = 1;
const int MINOR_VERSION = 13;
const int POINT_VERSION = 4;
const int POINT_VERSION = 5;

// 1.13.2 - Adds CV Trigger modes for legato and regtrig
// 1.13.3 - Bugfix for CV Trigger modes
Expand Down
18 changes: 18 additions & 0 deletions OMX-27-firmware/src/modes/omx_mode_grids.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "../hardware/omx_leds.h"
// #include "../modes/sequencer.h"
#include "../midi/noteoffs.h"
#include "../consts/consts.h"

using namespace grids;

Expand Down Expand Up @@ -90,6 +91,22 @@ void OmxModeGrids::onPotChanged(int potIndex, int prevValue, int newValue, int a
// if (analogDelta < 3)
// return;

#if T4
// prevents values from being modified until pot is modified
if (potPostLoadThresh[potIndex])
{
int delta = newValue - prevValue;

if (delta >= 1)
{
potPostLoadThresh[potIndex] = false;
}
else
{
return;
}
}
#else
// prevents values from being modified until pot is modified
if (potPostLoadThresh[potIndex])
{
Expand All @@ -102,6 +119,7 @@ void OmxModeGrids::onPotChanged(int potIndex, int prevValue, int newValue, int a
potPostLoadThresh[potIndex] = false;
}
}
#endif

if (potIndex < 4)
{
Expand Down

0 comments on commit a9dd0fe

Please sign in to comment.