Merge branch '2.3' into 2.4
# Conflicts: # radio/src/fonts/480x272/font_dblsize.png # radio/src/fonts/480x272/font_xxlsize.png # radio/src/gui/128x64/model_setup.cpp # radio/src/gui/128x64/radio_setup.cpp # radio/src/gui/480x272/model_receiver_options.cpp # radio/src/gui/480x272/model_setup.cpp # radio/src/gui/480x272/radio_calibration.cpp # radio/src/gui/480x272/radio_hardware.cpp # radio/src/gui/common/stdlcd/draw_functions.cpp # radio/src/gui/gui_common.cpp # radio/src/keys.h # radio/src/lua/interface.cpp # radio/src/pulses/afhds3.h # radio/src/rtos.h # radio/src/switches.cpp # radio/src/targets/common/arm/stm32/aux_serial_driver.cpp # radio/src/targets/horus/CMakeLists.txt # radio/src/targets/horus/lcd_driver.cpp # radio/src/targets/horus/startup_stm32f42_43xxx.s # radio/src/targets/taranis/CMakeLists.txt # radio/src/telemetry/crossfire.h # radio/src/telemetry/multi.cpp # radio/src/translations.cpp # radio/src/translations/it.h.txt # radio/src/translations/untranslated.h # radio/util/font2png.py # tools/commit-tests.sh
This commit is contained in:
@@ -82,7 +82,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
|
||||
}
|
||||
#endif
|
||||
|
||||
if (event==EVT_KEY_FIRST(KEY_RIGHT) || event==EVT_KEY_REPT(KEY_RIGHT) || (s_editMode>0 && (IS_ROTARY_RIGHT(event) || event==EVT_KEY_FIRST(KEY_UP) || event==EVT_KEY_REPT(KEY_UP)))) {
|
||||
if ((s_editMode>0 && (IS_ROTARY_RIGHT(event) || event==EVT_KEY_FIRST(KEY_UP) || event==EVT_KEY_REPT(KEY_UP)))) {
|
||||
do {
|
||||
if (IS_KEY_REPT(event) && (i_flags & INCDEC_REP10)) {
|
||||
newval += min(10, i_max-val);
|
||||
@@ -98,7 +98,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
|
||||
AUDIO_KEY_ERROR();
|
||||
}
|
||||
}
|
||||
else if (event==EVT_KEY_FIRST(KEY_LEFT) || event==EVT_KEY_REPT(KEY_LEFT) || (s_editMode>0 && (IS_ROTARY_LEFT(event) || event==EVT_KEY_FIRST(KEY_DOWN) || event==EVT_KEY_REPT(KEY_DOWN)))) {
|
||||
else if ((s_editMode>0 && (IS_ROTARY_LEFT(event) || event==EVT_KEY_FIRST(KEY_DOWN) || event==EVT_KEY_REPT(KEY_DOWN)))) {
|
||||
do {
|
||||
if (IS_KEY_REPT(event) && (i_flags & INCDEC_REP10)) {
|
||||
newval -= min(10, val-i_min);
|
||||
@@ -136,7 +136,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
|
||||
#if defined(AUTOSWITCH)
|
||||
else {
|
||||
uint8_t swtch = abs(getMovedSwitch());
|
||||
if (swtch) {
|
||||
if (swtch && !IS_SWITCH_MULTIPOS(swtch)) {
|
||||
newval = switchToMix(swtch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
|
||||
#if defined(AUTOSWITCH)
|
||||
else {
|
||||
unsigned int swtch = abs(getMovedSwitch());
|
||||
if (swtch) {
|
||||
if (swtch && !IS_SWITCH_MULTIPOS(swtch)) {
|
||||
newval = switchToMix(swtch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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--;
|
||||
@@ -99,7 +106,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
|
||||
#if defined(AUTOSWITCH)
|
||||
else {
|
||||
unsigned int swtch = abs(getMovedSwitch());
|
||||
if (swtch) {
|
||||
if (swtch && !IS_SWITCH_MULTIPOS(swtch)) {
|
||||
newval = switchToMix(swtch);
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
@@ -173,7 +173,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
|
||||
#if defined(AUTOSWITCH)
|
||||
else {
|
||||
unsigned int swtch = abs(getMovedSwitch());
|
||||
if (swtch) {
|
||||
if (swtch && !IS_SWITCH_MULTIPOS(swtch)) {
|
||||
newval = switchToMix(swtch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,15 +29,6 @@ horzpos_t menuHorizontalPosition;
|
||||
|
||||
int8_t checkIncDec_Ret;
|
||||
|
||||
#if defined(RADIO_T12)
|
||||
#define DBLKEYS_PRESSED_RGT_LFT(in) ((in & (KEYS_GPIO_PIN_RIGHT + KEYS_GPIO_PIN_LEFT)) == (KEYS_GPIO_PIN_RIGHT + KEYS_GPIO_PIN_LEFT))
|
||||
// set to 0
|
||||
#define DBLKEYS_PRESSED_UP_DWN(in) ((in & (KEYS_GPIO_PIN_UP + KEYS_GPIO_PIN_DOWN)) == (KEYS_GPIO_PIN_UP + KEYS_GPIO_PIN_DOWN))
|
||||
// set to max
|
||||
#define DBLKEYS_PRESSED_RGT_UP(in) ((in & (KEYS_GPIO_PIN_RIGHT + KEYS_GPIO_PIN_UP)) == (KEYS_GPIO_PIN_RIGHT + KEYS_GPIO_PIN_UP))
|
||||
// set to min
|
||||
#define DBLKEYS_PRESSED_LFT_DWN(in) ((in & (KEYS_GPIO_PIN_LEFT + KEYS_GPIO_PIN_DOWN)) == (KEYS_GPIO_PIN_LEFT + KEYS_GPIO_PIN_DOWN))
|
||||
#else
|
||||
// invert the value
|
||||
#define DBLKEYS_PRESSED_RGT_LFT(in) ((in & ((1<<KEY_SHIFT) + (1<<KEY_UP))) == ((1<<KEY_SHIFT) + (1<<KEY_UP)))
|
||||
// set to 0
|
||||
@@ -46,7 +37,6 @@ int8_t checkIncDec_Ret;
|
||||
#define DBLKEYS_PRESSED_RGT_UP(in) ((in & ((1<<KEY_SHIFT) + (1<<KEY_RIGHT))) == ((1<<KEY_SHIFT) + (1<<KEY_RIGHT)))
|
||||
// set to min
|
||||
#define DBLKEYS_PRESSED_LFT_DWN(in) ((in & ((1<<KEY_SHIFT) + (1<<KEY_LEFT))) == ((1<<KEY_SHIFT) + (1<<KEY_LEFT)))
|
||||
#endif
|
||||
|
||||
INIT_STOPS(stops100, 3, -100, 0, 100)
|
||||
INIT_STOPS(stops1000, 3, -1000, 0, 1000)
|
||||
@@ -166,7 +156,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
|
||||
#if defined(AUTOSWITCH)
|
||||
else {
|
||||
uint8_t swtch = abs(getMovedSwitch());
|
||||
if (swtch) {
|
||||
if (swtch && !IS_SWITCH_MULTIPOS(swtch)) {
|
||||
newval = switchToMix(swtch);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user