Throttle trim - Fixes 5635 (#7677)

Add throttle trim switch
This commit is contained in:
DanielGeA
2020-10-04 09:46:47 +02:00
committed by GitHub
parent 5ec01f90cf
commit 78ccc22eac
24 changed files with 503 additions and 255 deletions
+17 -2
View File
@@ -605,8 +605,9 @@ PACK(struct ModelData {
NOBACKUP(RssiAlarmData rssiAlarms);
NOBACKUP(uint8_t spare1:6);
NOBACKUP(uint8_t potsWarnMode:2);
uint8_t spare1:3;
uint8_t thrTrimSw:3;
uint8_t potsWarnMode:2;
ModuleData moduleData[NUM_MODULES];
int16_t failsafeChannels[MAX_OUTPUT_CHANNELS];
@@ -625,6 +626,20 @@ PACK(struct ModelData {
CUSTOM_SCREENS_DATA
char modelRegistrationID[PXX2_LEN_REGISTRATION_ID];
uint8_t getThrottleStickTrimSource() const
{
// The order here is TERA, so that 0 (default) means Throttle
switch (thrTrimSw) {
case 0:
return MIXSRC_TrimThr;
case 2:
return MIXSRC_TrimRud;
default:
return thrTrimSw + MIXSRC_FIRST_TRIM;
}
}
});
/*