fix(b&w): Various rotenc. inversion bugs on radio and simu (#4405)
This commit is contained in:
@@ -25,10 +25,10 @@ SimulatedUIWidgetBoxer::SimulatedUIWidgetBoxer(SimulatorInterface *simulator, QW
|
|||||||
act = new RadioUiAction(13, QList<int>() << Qt::Key_Right, SIMU_STR_HLP_KEY_RGT, SIMU_STR_HLP_ACT_TELE);
|
act = new RadioUiAction(13, QList<int>() << Qt::Key_Right, SIMU_STR_HLP_KEY_RGT, SIMU_STR_HLP_ACT_TELE);
|
||||||
addRadioWidget(ui->leftbuttons->addArea(QRect(72, 149, 62, 24), "Boxer/left-tele.png", act));
|
addRadioWidget(ui->leftbuttons->addArea(QRect(72, 149, 62, 24), "Boxer/left-tele.png", act));
|
||||||
|
|
||||||
act = new RadioUiAction(4, QList<int>() << Qt::Key_PageDown, SIMU_STR_HLP_KEY_PGDN, SIMU_STR_HLP_ACT_PGDN);
|
act = new RadioUiAction(5, QList<int>() << Qt::Key_PageDown, SIMU_STR_HLP_KEY_PGDN, SIMU_STR_HLP_ACT_PGDN);
|
||||||
addRadioWidget(ui->leftbuttons->addArea(QRect(72, 79, 62, 24), "Boxer/left-pagedn.png", act));
|
addRadioWidget(ui->leftbuttons->addArea(QRect(72, 79, 62, 24), "Boxer/left-pagedn.png", act));
|
||||||
|
|
||||||
act = new RadioUiAction(5, QList<int>() << Qt::Key_PageUp, SIMU_STR_HLP_KEY_PGUP, SIMU_STR_HLP_ACT_PGUP);
|
act = new RadioUiAction(4, QList<int>() << Qt::Key_PageUp, SIMU_STR_HLP_KEY_PGUP, SIMU_STR_HLP_ACT_PGUP);
|
||||||
addRadioWidget(ui->leftbuttons->addArea(QRect(72, 114, 62, 24), "Boxer/left-pageup.png", act));
|
addRadioWidget(ui->leftbuttons->addArea(QRect(72, 114, 62, 24), "Boxer/left-pageup.png", act));
|
||||||
|
|
||||||
act = new RadioUiAction(1, QList<int>() << Qt::Key_Down << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace, SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_EXIT);
|
act = new RadioUiAction(1, QList<int>() << Qt::Key_Down << Qt::Key_Delete << Qt::Key_Escape << Qt::Key_Backspace, SIMU_STR_HLP_KEYS_EXIT, SIMU_STR_HLP_ACT_EXIT);
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ const char * runPopupMenu(event_t event)
|
|||||||
event_t eventTemp = event;
|
event_t eventTemp = event;
|
||||||
|
|
||||||
#if defined(ROTARY_ENCODER_NAVIGATION) && !defined(COLORLCD)
|
#if defined(ROTARY_ENCODER_NAVIGATION) && !defined(COLORLCD)
|
||||||
if (g_eeGeneral.rotEncMode >= ROTARY_ENCODER_MODE_INVERT_BOTH) {
|
if (g_eeGeneral.rotEncMode == ROTARY_ENCODER_MODE_INVERT_VERT_HORZ_ALT ||
|
||||||
|
g_eeGeneral.rotEncMode == ROTARY_ENCODER_MODE_INVERT_VERT_HORZ_NORM) {
|
||||||
if (eventTemp == EVT_ROTARY_LEFT) {
|
if (eventTemp == EVT_ROTARY_LEFT) {
|
||||||
eventTemp = EVT_ROTARY_RIGHT;
|
eventTemp = EVT_ROTARY_RIGHT;
|
||||||
} else if (eventTemp == EVT_ROTARY_RIGHT) {
|
} else if (eventTemp == EVT_ROTARY_RIGHT) {
|
||||||
|
|||||||
@@ -301,7 +301,8 @@ void OpenTxSimulator::rotaryEncoderEvent(int steps)
|
|||||||
#if defined(ROTARY_ENCODER_NAVIGATION) && !defined(USE_HATS_AS_KEYS)
|
#if defined(ROTARY_ENCODER_NAVIGATION) && !defined(USE_HATS_AS_KEYS)
|
||||||
static uint32_t last_tick = 0;
|
static uint32_t last_tick = 0;
|
||||||
if (steps != 0) {
|
if (steps != 0) {
|
||||||
if (g_eeGeneral.rotEncMode >= ROTARY_ENCODER_MODE_INVERT_BOTH) steps *= -1;
|
if (g_eeGeneral.rotEncMode == ROTARY_ENCODER_MODE_INVERT_BOTH)
|
||||||
|
steps *= -1;
|
||||||
rotencValue += steps * ROTARY_ENCODER_GRANULARITY;
|
rotencValue += steps * ROTARY_ENCODER_GRANULARITY;
|
||||||
// TODO: set rotencDt
|
// TODO: set rotencDt
|
||||||
uint32_t now = RTOS_GET_MS();
|
uint32_t now = RTOS_GET_MS();
|
||||||
|
|||||||
@@ -176,7 +176,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "正常","反向"
|
#define TR_ROTARY_ENC_OPT "正常","反向"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "正常","反向","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "正常","反向","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Invertován"
|
#define TR_ROTARY_ENC_OPT "Normal","Invertován"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Invertován","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Invertován","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -183,7 +183,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Invers"
|
#define TR_ROTARY_ENC_OPT "Normal","Invers"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Invers","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Invers","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -176,7 +176,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inversé"
|
#define TR_ROTARY_ENC_OPT "Normal","Inversé"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inversé","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Inversé","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -184,7 +184,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "רגיל","הפוך"
|
#define TR_ROTARY_ENC_OPT "רגיל","הפוך"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "רגיל","הפוך","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "רגיל","הפוך","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -181,7 +181,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normale","Invertito"
|
#define TR_ROTARY_ENC_OPT "Normale","Invertito"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normale","Invertito","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normale","Invertito","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "標準","リバース"
|
#define TR_ROTARY_ENC_OPT "標準","リバース"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "標準","リバース","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "標準","リバース","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -176,7 +176,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverted","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -183,7 +183,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Invert"
|
#define TR_ROTARY_ENC_OPT "Normal","Invert"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Invert","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Invert","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Норм","Перевер"
|
#define TR_ROTARY_ENC_OPT "Норм","Перевер"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Норм","Перевер","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Норм","Перевер","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverterad"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverterad"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "Normal","Inverterad","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "Normal","Inverterad","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TR_ON_ONE_SWITCHES "PÅ","Ett"
|
#define TR_ON_ONE_SWITCHES "PÅ","Ett"
|
||||||
|
|||||||
@@ -181,7 +181,7 @@
|
|||||||
#if defined(COLORLCD)
|
#if defined(COLORLCD)
|
||||||
#define TR_ROTARY_ENC_OPT "正常","反向"
|
#define TR_ROTARY_ENC_OPT "正常","反向"
|
||||||
#else
|
#else
|
||||||
#define TR_ROTARY_ENC_OPT "正常","反向","V-I H-N","V-I H-A","V-N-E-I"
|
#define TR_ROTARY_ENC_OPT "正常","反向","V-I H-N","V-I H-A","V-N E-I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IMU)
|
#if defined(IMU)
|
||||||
|
|||||||
Reference in New Issue
Block a user