Skip to content

Commit

Permalink
updated logic for allowing hats mode switching
Browse files Browse the repository at this point in the history
  • Loading branch information
mha1 committed Aug 4, 2023
1 parent 866119c commit 19e548f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion radio/src/keys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,12 @@ static void transpose_trims(uint32_t *keys)
#else
static uint8_t state = 0;

if(g_eeGeneral.hatsMode == MODE_SWITCHABLE && !getTransposeTrimsForLUA()) {
bool allowModeSwitch =
((g_model.hatsMode == MODE_GLOBAL && g_eeGeneral.hatsMode == MODE_SWITCHABLE) ||
(g_model.hatsMode == MODE_SWITCHABLE)) &&
!getTransposeTrimsForLUA();

if(allowModeSwitch) {
static bool lastExitState = false;
static bool lastEnterState = false;

Expand Down

0 comments on commit 19e548f

Please sign in to comment.