diff --git a/src/eeprom_rlc.cpp b/src/eeprom_rlc.cpp index 3fb70bc86..6ffebf6e3 100644 --- a/src/eeprom_rlc.cpp +++ b/src/eeprom_rlc.cpp @@ -162,7 +162,11 @@ static void EeFsFlush() uint16_t EeFsGetFree() { +#if defined(CPUARM) int32_t ret = 0; +#else + int16_t ret = 0; +#endif blkid_t i = eeFs.freeList; while (i) { ret += BS-1; diff --git a/src/maths.cpp b/src/maths.cpp index f802841ee..d6bfab42d 100644 --- a/src/maths.cpp +++ b/src/maths.cpp @@ -148,7 +148,7 @@ void varioWakeup() } } - uint16_t tmr10ms = g_tmr10ms; + tmr10ms_t tmr10ms = get_tmr10ms(); if (verticalSpeed < 0 || tmr10ms > s_varioTmr) { uint8_t SoundVarioBeepTime = (1600 - verticalSpeed) / 100; #if defined(PCBSTD) diff --git a/src/menu_model.cpp b/src/menu_model.cpp index 6c2f15949..ff2d9a5e4 100644 --- a/src/menu_model.cpp +++ b/src/menu_model.cpp @@ -2526,6 +2526,12 @@ void menuModelExpoMix(uint8_t expo, uint8_t event) event = 0; } // no break +#if defined(ROTARY_ENCODER_NAVIGATION) + case EVT_ROTARY_LONG: + if (s_copyMode) { + killEvents(event); + } +#endif case EVT_KEY_BREAK(KEY_EXIT): if (s_copyMode) { if (s_copyTgtOfs) { @@ -2608,29 +2614,33 @@ void menuModelExpoMix(uint8_t expo, uint8_t event) return; } break; +#if defined(ROTARY_ENCODER_NAVIGATION) + case EVT_ROTARY_LEFT: + case EVT_ROTARY_RIGHT: +#endif case EVT_KEY_FIRST(KEY_MOVE_UP): case EVT_KEY_REPT(KEY_MOVE_UP): case EVT_KEY_FIRST(KEY_MOVE_DOWN): case EVT_KEY_REPT(KEY_MOVE_DOWN): if (s_copyMode) { uint8_t key = (event & 0x1f); - uint8_t next_ofs = (key == KEY_MOVE_UP ? s_copyTgtOfs - 1 : s_copyTgtOfs + 1); + uint8_t next_ofs = ((IS_ROTARY_UP(event) || key==KEY_MOVE_UP) ? s_copyTgtOfs - 1 : s_copyTgtOfs + 1); if (s_copyTgtOfs==0 && s_copyMode==COPY_MODE) { // insert a mix on the same channel (just above / just below) if (reachExpoMixCountLimit(expo)) break; copyExpoMix(expo, s_currIdx); - if (key==KEY_MOVE_DOWN) s_currIdx++; + if (IS_ROTARY_DOWN(event) || key==KEY_MOVE_DOWN) s_currIdx++; else if (sub-s_pgOfs >= 6) s_pgOfs++; } else if (next_ofs==0 && s_copyMode==COPY_MODE) { // delete the mix deleteExpoMix(expo, s_currIdx); - if (key==KEY_MOVE_UP) s_currIdx--; + if (IS_ROTARY_UP(event) || key==KEY_MOVE_UP) s_currIdx--; } else { // only swap the mix with its neighbor - if (!swapExpoMix(expo, s_currIdx, key==KEY_MOVE_UP)) break; + if (!swapExpoMix(expo, s_currIdx, IS_ROTARY_UP(event) || key==KEY_MOVE_UP)) break; STORE_MODELVARS; }