1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

Merge pull request #577 from opentx/bsongis/Issue488_change_default_trim_mode_to_fine

Bsongis/issue488 change default trim mode to fine
This commit is contained in:
Andre Bernet 2014-01-23 10:52:26 -08:00
commit 4764cc889c
14 changed files with 41 additions and 38 deletions

View file

@ -844,7 +844,7 @@ class ModelData {
TimerData timers[2]; TimerData timers[2];
bool thrTrim; // Enable Throttle Trim bool thrTrim; // Enable Throttle Trim
bool thrExpo; // Enable Throttle Expo bool thrExpo; // Enable Throttle Expo
unsigned int trimInc; // Trim Increments int trimInc; // Trim Increments
bool disableThrottleWarning; bool disableThrottleWarning;
unsigned int beepANACenter; // 1<<0->A1.. 1<<6->A7 unsigned int beepANACenter; // 1<<0->A1.. 1<<6->A7

View file

@ -386,7 +386,7 @@ t_Er9xModelData::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH; c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo; c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc; c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.funcSw[0].func = FuncInstantTrim; c9x.funcSw[0].func = FuncInstantTrim;
if (trimSw) { if (trimSw) {

View file

@ -531,7 +531,7 @@ t_Ersky9xModelData_v10::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH; c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo; c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc; c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.funcSw[0].func = FuncInstantTrim; c9x.funcSw[0].func = FuncInstantTrim;
if (trimSw) { if (trimSw) {
@ -652,7 +652,7 @@ t_Ersky9xModelData_v11::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH; c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo; c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc; c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.funcSw[0].func = FuncInstantTrim; c9x.funcSw[0].func = FuncInstantTrim;
if (trimSw) { if (trimSw) {

View file

@ -458,7 +458,7 @@ t_Gruvin9xModelData_v102::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo; c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc; c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -529,7 +529,7 @@ t_Gruvin9xModelData_v103::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo; c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc; c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -600,7 +600,7 @@ t_Gruvin9xModelData_v105::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo; c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc; c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -691,7 +691,7 @@ t_Gruvin9xModelData_v106::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo; c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc; c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;

View file

@ -454,7 +454,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -538,7 +538,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
@ -627,7 +627,7 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
@ -717,7 +717,7 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
@ -804,7 +804,7 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;

View file

@ -760,7 +760,7 @@ t_Open9xArmModelData_v208::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
@ -849,7 +849,7 @@ t_Open9xArmModelData_v209::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
@ -939,7 +939,7 @@ t_Open9xArmModelData_v210::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
@ -1023,7 +1023,7 @@ t_Open9xArmModelData_v211::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
@ -1110,7 +1110,7 @@ t_Open9xArmModelData_v212::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;

View file

@ -950,7 +950,7 @@ t_Open9xModelData_v201::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.thrExpo = thrExpo; c9x.thrExpo = thrExpo;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -1024,7 +1024,7 @@ t_Open9xModelData_v202::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter, c9x.beepANACenter = beepANACenter,
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -1100,7 +1100,7 @@ t_Open9xModelData_v203::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -1174,7 +1174,7 @@ t_Open9xModelData_v204::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -1253,7 +1253,7 @@ t_Open9xModelData_v205::operator ModelData ()
} }
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -1339,7 +1339,7 @@ t_Open9xModelData_v208::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -1432,7 +1432,7 @@ t_Open9xModelData_v209::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -1526,7 +1526,7 @@ t_Open9xModelData_v210::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
@ -1614,7 +1614,7 @@ t_Open9xModelData_v211::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim; c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning; c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc; c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;

View file

@ -1850,7 +1850,11 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
else else
internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[0].channelsCount, &channelsConversionTable, "Channels number", ::QObject::tr("OpenTX doesn't allow this number of channels"))); internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[0].channelsCount, &channelsConversionTable, "Channels number", ::QObject::tr("OpenTX doesn't allow this number of channels")));
internalField.Append(new UnsignedField<3>(modelData.trimInc)); if (version >= 216)
internalField.Append(new SignedField<3>(modelData.trimInc));
else
internalField.Append(new ConversionField< SignedField<3> >(modelData.trimInc, +2));
internalField.Append(new BoolField<1>(modelData.disableThrottleWarning)); internalField.Append(new BoolField<1>(modelData.disableThrottleWarning));
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216)) if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216))

View file

@ -472,7 +472,7 @@ void Setup::on_extendedTrims_toggled(bool checked)
void Setup::on_trimIncrement_currentIndexChanged(int index) void Setup::on_trimIncrement_currentIndexChanged(int index)
{ {
model.trimInc = index; model.trimInc = index-2;
emit modified(); emit modified();
} }
@ -531,7 +531,7 @@ void Setup::update()
ui->throttleWarning->setChecked(model.disableThrottleWarning); ui->throttleWarning->setChecked(model.disableThrottleWarning);
//trim inc, thro trim, thro expo, instatrim //trim inc, thro trim, thro expo, instatrim
ui->trimIncrement->setCurrentIndex(model.trimInc); ui->trimIncrement->setCurrentIndex(model.trimInc+2);
ui->throttleTrim->setChecked(model.thrTrim); ui->throttleTrim->setChecked(model.thrTrim);
ui->extendedLimits->setChecked(model.extendedLimits); ui->extendedLimits->setChecked(model.extendedLimits);
ui->extendedTrims->setChecked(model.extendedTrims); ui->extendedTrims->setChecked(model.extendedTrims);

View file

@ -224,7 +224,7 @@ void ConvertModel_215_to_216(ModelData &model)
} }
g_model.protocol = oldModel.protocol; g_model.protocol = oldModel.protocol;
g_model.thrTrim = oldModel.thrTrim; g_model.thrTrim = oldModel.thrTrim;
g_model.trimInc = oldModel.trimInc; g_model.trimInc = oldModel.trimInc - 2;
g_model.disableThrottleWarning = oldModel.disableThrottleWarning; g_model.disableThrottleWarning = oldModel.disableThrottleWarning;
g_model.extendedLimits = oldModel.extendedLimits; g_model.extendedLimits = oldModel.extendedLimits;
g_model.extendedTrims = oldModel.extendedTrims; g_model.extendedTrims = oldModel.extendedTrims;

View file

@ -1111,7 +1111,7 @@ void menuModelSetup(uint8_t event)
break; break;
case ITEM_MODEL_TRIM_INC: case ITEM_MODEL_TRIM_INC:
g_model.trimInc = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, STR_TRIMINC, STR_VTRIMINC, g_model.trimInc, 0, 4, attr, event); g_model.trimInc = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, STR_TRIMINC, STR_VTRIMINC, g_model.trimInc, -2, 2, attr, event);
break; break;
case ITEM_MODEL_THROTTLE_REVERSED: case ITEM_MODEL_THROTTLE_REVERSED:

View file

@ -1424,7 +1424,7 @@ PACK(typedef struct t_ModelData {
uint8_t thrTrim:1; // Enable Throttle Trim uint8_t thrTrim:1; // Enable Throttle Trim
AVR_FIELD(int8_t ppmNCH:4) AVR_FIELD(int8_t ppmNCH:4)
ARM_FIELD(int8_t spare2:4) ARM_FIELD(int8_t spare2:4)
uint8_t trimInc:3; // Trim Increments int8_t trimInc:3; // Trim Increments
uint8_t disableThrottleWarning:1; uint8_t disableThrottleWarning:1;
ARM_FIELD(uint8_t displayText:1) ARM_FIELD(uint8_t displayText:1)
AVR_FIELD(uint8_t pulsePol:1) AVR_FIELD(uint8_t pulsePol:1)

View file

@ -2300,12 +2300,10 @@ void checkTrims()
uint8_t event = getEvent(true); uint8_t event = getEvent(true);
if (event && !IS_KEY_BREAK(event)) { if (event && !IS_KEY_BREAK(event)) {
int8_t k = EVT_KEY_MASK(event) - TRM_BASE; int8_t k = EVT_KEY_MASK(event) - TRM_BASE;
int8_t s = g_model.trimInc;
#else #else
uint8_t checkTrim(uint8_t event) uint8_t checkTrim(uint8_t event)
{ {
int8_t k = EVT_KEY_MASK(event) - TRM_BASE; int8_t k = EVT_KEY_MASK(event) - TRM_BASE;
int8_t s = g_model.trimInc;
if (k>=0 && k<8 && !IS_KEY_BREAK(event)) { if (k>=0 && k<8 && !IS_KEY_BREAK(event)) {
#endif #endif
// LH_DWN LH_UP LV_DWN LV_UP RV_DWN RV_UP RH_DWN RH_UP // LH_DWN LH_UP LV_DWN LV_UP RV_DWN RV_UP RH_DWN RH_UP
@ -2336,7 +2334,8 @@ uint8_t checkTrim(uint8_t event)
before = getRawTrimValue(phase, idx); before = getRawTrimValue(phase, idx);
thro = (idx==THR_STICK && g_model.thrTrim); thro = (idx==THR_STICK && g_model.thrTrim);
#endif #endif
int8_t v = (s==0) ? min(32, abs(before)/4+1) : 1 << (s-1); // 1=>1 2=>2 3=>4 4=>8 int8_t trimInc = g_model.trimInc + 1;
int8_t v = (trimInc==-1) ? min(32, abs(before)/4+1) : (1 << trimInc);
if (thro) v = 4; // if throttle trim and trim trottle then step=4 if (thro) v = 4; // if throttle trim and trim trottle then step=4
int16_t after = (k&1) ? before + v : before - v; // positive = k&1 int16_t after = (k&1) ? before + v : before - v; // positive = k&1
#if defined(CPUARM) #if defined(CPUARM)

View file

@ -78,7 +78,7 @@
#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0") #define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0")
#define LEN_VTRIMINC TR("\006", "\013") #define LEN_VTRIMINC TR("\006", "\013")
#define TR_VTRIMINC TR("Expo ""ExFine""Fine ""Medium""Coarse","Exponential""Extra Fine ""Fine ""Medium ""Coarse ") #define TR_VTRIMINC TR("Expo\0 ""ExFine""Fine\0 ""Medium""Coarse", "Exponential""Extra Fine\0""Fine\0 ""Medium\0 ""Coarse\0 ")
#define LEN_VBEEPCOUNTDOWN "\006" #define LEN_VBEEPCOUNTDOWN "\006"
#define TR_VBEEPCOUNTDOWN "SilentBeeps\0Voice\0" #define TR_VBEEPCOUNTDOWN "SilentBeeps\0Voice\0"