feat: Option for inverting rotary encoder direction (#1690)
* feat: Add option for rotary encoder direction Based heavily on opentx/opentx#8852 by @3djc * companion ui elements * Cleanup * Hook up UI, reading setting from yaml * Teach simulator about rotEncDirection * Simu and radio default scroll direction correction Otherwise the "default" would be the opposite to how it has always been * Remove what will be a confict with fix in #1586 * Wasn't using rotEncDirection consistently * Zorro RE dir is opp to TX16, TX12, TPro, X9D+2019
This commit is contained in:
@@ -95,6 +95,7 @@ enum MenuRadioSetupItems {
|
||||
ITEM_RADIO_SETUP_SWITCHES_DELAY,
|
||||
ITEM_RADIO_SETUP_USB_MODE,
|
||||
ITEM_RADIO_SETUP_RX_CHANNEL_ORD,
|
||||
CASE_ROTARY_ENCODER(ITEM_RADIO_SETUP_ROTARY_INVERSE)
|
||||
ITEM_RADIO_SETUP_STICK_MODE_LABELS,
|
||||
ITEM_RADIO_SETUP_STICK_MODE,
|
||||
ITEM_RADIO_SETUP_MAX
|
||||
@@ -174,6 +175,7 @@ void menuRadioSetup(event_t event)
|
||||
0, // switches delay
|
||||
0, // USB mode
|
||||
0, // RX channels order
|
||||
CASE_ROTARY_ENCODER(0) // Invert rotary encoder
|
||||
LABEL(TX_MODE),
|
||||
0, // sticks mode
|
||||
1 /*to force edit mode*/
|
||||
@@ -588,6 +590,12 @@ void menuRadioSetup(event_t event)
|
||||
}
|
||||
break;
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
case ITEM_RADIO_SETUP_ROTARY_INVERSE:
|
||||
g_eeGeneral.rotEncDirection = editCheckBox(g_eeGeneral.rotEncDirection, RADIO_SETUP_2ND_COLUMN, y, STR_INVERT_ROTARY, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_RADIO_SETUP_STICK_MODE:
|
||||
lcdDrawChar(2*FW, y, '1'+reusableBuffer.generalSettings.stickMode, attr);
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
|
||||
Reference in New Issue
Block a user