Merge branch '2.3' into 3djc/T-Lite

# Conflicts:
#	companion/src/firmwares/boards.h
#	companion/src/firmwares/opentx/opentxeeprom.h
#	radio/src/gui/common/stdlcd/radio_hardware.cpp
#	radio/src/targets/common/arm/stm32/adc_driver.cpp
#	radio/src/targets/common/arm/stm32/bootloader/CMakeLists.txt
#	radio/src/targets/taranis/board.h
#	radio/src/targets/taranis/hal.h
#	radio/src/targets/taranis/keys_driver.cpp
#	radio/src/targets/taranis/lcd_driver_spi.cpp
This commit is contained in:
Kilrah
2021-01-15 20:17:02 +01:00
160 changed files with 3911 additions and 1408 deletions
+20 -9
View File
@@ -56,8 +56,11 @@ void onSwitchLongEnterPress(const char * result)
int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_flags, IsValueAvailable isValueAvailable, const CheckIncDecStops &stops)
{
int newval = val;
#if defined(ROTARY_ENCODER_NAVIGATION)
if (s_editMode>0 && event==EVT_ROTARY_RIGHT) {
#else
if (s_editMode>0 && (event==EVT_KEY_FIRST(KEY_PLUS) || event==EVT_KEY_REPT(KEY_PLUS))) {
#endif
newval += min<int>(rotencSpeed, i_max-val);
while (isValueAvailable && !isValueAvailable(newval) && newval<=i_max) {
newval++;
@@ -67,7 +70,11 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
AUDIO_KEY_ERROR();
}
}
#if defined(ROTARY_ENCODER_NAVIGATION)
else if (s_editMode>0 && event==EVT_ROTARY_LEFT) {
#else
if (s_editMode>0 && (event==EVT_KEY_FIRST(KEY_MINUS) || event==EVT_KEY_REPT(KEY_MINUS))) {
#endif
newval -= min<int>(rotencSpeed, val-i_min);
while (isValueAvailable && !isValueAvailable(newval) && newval>=i_min) {
newval--;
@@ -217,7 +224,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t
if (menuTab) {
int cc = curr;
switch (event) {
#if defined(NAVIGATION_X7_TX12)
#if defined(KEYS_GPIO_REG_PAGEUP)
case EVT_KEY_FIRST(KEY_PAGEUP):
#else
case EVT_KEY_LONG(KEY_PAGE):
@@ -232,7 +239,7 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t
killEvents(event);
break;
#if defined(NAVIGATION_X7_TX12)
#if defined(KEYS_GPIO_REG_PAGEDN)
case EVT_KEY_FIRST(KEY_PAGEDN):
#else
case EVT_KEY_BREAK(KEY_PAGE):
@@ -310,12 +317,14 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t
}
}
break;
#if defined(ROTARY_ENCODER_NAVIGATION)
case EVT_ROTARY_RIGHT:
case EVT_KEY_FIRST(KEY_RIGHT):
AUDIO_KEY_PRESS();
// no break
case EVT_KEY_REPT(KEY_RIGHT):
#else
case EVT_KEY_FIRST(KEY_DOWN):
case EVT_KEY_REPT(KEY_DOWN):
#endif
if (s_editMode > 0) break; // TODO it was !=
if ((COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) {
if (l_posHorz >= 0) {
@@ -341,12 +350,14 @@ void check(event_t event, uint8_t curr, const MenuHandlerFunc * menuTab, uint8_t
l_posHorz = POS_HORZ_INIT(l_posVert);
break;
#if defined(ROTARY_ENCODER_NAVIGATION)
case EVT_ROTARY_LEFT:
case EVT_KEY_FIRST(KEY_LEFT):
AUDIO_KEY_PRESS();
// no break
case EVT_KEY_REPT(KEY_LEFT):
#else
case EVT_KEY_FIRST(KEY_UP):
case EVT_KEY_REPT(KEY_UP):
#endif
if (s_editMode > 0) break; // TODO it was !=
if ((COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) {
if (l_posHorz >= 0) {