mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 22:35:12 +03:00
Always map xlite primary trims to Aileron/Elev (#5852)
This commit is contained in:
parent
b386dd23fb
commit
69bf7b3cd3
3 changed files with 9 additions and 3 deletions
|
@ -1316,7 +1316,7 @@ uint8_t checkTrim(event_t event)
|
|||
if (k>=0 && k<8 && !IS_KEY_BREAK(event)) {
|
||||
#endif
|
||||
// LH_DWN LH_UP LV_DWN LV_UP RV_DWN RV_UP RH_DWN RH_UP
|
||||
uint8_t idx = CONVERT_MODE((uint8_t)k/2);
|
||||
uint8_t idx = CONVERT_MODE_TRIMS((uint8_t)k/2);
|
||||
uint8_t phase;
|
||||
int before;
|
||||
bool thro;
|
||||
|
|
|
@ -529,6 +529,12 @@ extern const pm_uint8_t modn12x3[];
|
|||
#define AIL_STICK 3
|
||||
#define CONVERT_MODE(x) (((x)<=AIL_STICK) ? pgm_read_byte(modn12x3 + 4*g_eeGeneral.stickMode + (x)) : (x) )
|
||||
|
||||
#if defined(PCBXLITE)
|
||||
#define CONVERT_MODE_TRIMS(x) (((x) == RUD_STICK) ? AIL_STICK : ((x) == AIL_STICK) ? RUD_STICK : (x))
|
||||
#else
|
||||
#define CONVERT_MODE_TRIMS(x) CONVERT_MODE(x)
|
||||
#endif
|
||||
|
||||
extern uint8_t channel_order(uint8_t x);
|
||||
|
||||
#define THRCHK_DEADBAND 16
|
||||
|
|
|
@ -495,7 +495,7 @@ bool getSwitch(swsrc_t swtch)
|
|||
#endif
|
||||
else if (cs_idx <= SWSRC_LAST_TRIM) {
|
||||
uint8_t idx = cs_idx - SWSRC_FIRST_TRIM;
|
||||
idx = (CONVERT_MODE(idx/2) << 1) + (idx & 1);
|
||||
idx = (CONVERT_MODE_TRIMS(idx/2) << 1) + (idx & 1);
|
||||
result = trimDown(idx);
|
||||
}
|
||||
#if ROTARY_ENCODERS > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue