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:
@@ -224,7 +224,7 @@ void ConvertModel_215_to_216(ModelData &model)
|
||||
}
|
||||
g_model.protocol = oldModel.protocol;
|
||||
g_model.thrTrim = oldModel.thrTrim;
|
||||
g_model.trimInc = oldModel.trimInc;
|
||||
g_model.trimInc = oldModel.trimInc - 2;
|
||||
g_model.disableThrottleWarning = oldModel.disableThrottleWarning;
|
||||
g_model.extendedLimits = oldModel.extendedLimits;
|
||||
g_model.extendedTrims = oldModel.extendedTrims;
|
||||
|
||||
@@ -1111,7 +1111,7 @@ void menuModelSetup(uint8_t event)
|
||||
break;
|
||||
|
||||
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;
|
||||
|
||||
case ITEM_MODEL_THROTTLE_REVERSED:
|
||||
|
||||
@@ -1424,7 +1424,7 @@ PACK(typedef struct t_ModelData {
|
||||
uint8_t thrTrim:1; // Enable Throttle Trim
|
||||
AVR_FIELD(int8_t ppmNCH:4)
|
||||
ARM_FIELD(int8_t spare2:4)
|
||||
uint8_t trimInc:3; // Trim Increments
|
||||
int8_t trimInc:3; // Trim Increments
|
||||
uint8_t disableThrottleWarning:1;
|
||||
ARM_FIELD(uint8_t displayText:1)
|
||||
AVR_FIELD(uint8_t pulsePol:1)
|
||||
|
||||
@@ -2300,12 +2300,10 @@ void checkTrims()
|
||||
uint8_t event = getEvent(true);
|
||||
if (event && !IS_KEY_BREAK(event)) {
|
||||
int8_t k = EVT_KEY_MASK(event) - TRM_BASE;
|
||||
int8_t s = g_model.trimInc;
|
||||
#else
|
||||
uint8_t checkTrim(uint8_t event)
|
||||
{
|
||||
int8_t k = EVT_KEY_MASK(event) - TRM_BASE;
|
||||
int8_t s = g_model.trimInc;
|
||||
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
|
||||
@@ -2336,7 +2334,8 @@ uint8_t checkTrim(uint8_t event)
|
||||
before = getRawTrimValue(phase, idx);
|
||||
thro = (idx==THR_STICK && g_model.thrTrim);
|
||||
#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
|
||||
int16_t after = (k&1) ? before + v : before - v; // positive = k&1
|
||||
#if defined(CPUARM)
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
#define LEN_COUNTRYCODES TR("\002", "\007")
|
||||
#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0")
|
||||
|
||||
#define LEN_VTRIMINC TR("\006","\013")
|
||||
#define TR_VTRIMINC TR("Expo ""ExFine""Fine ""Medium""Coarse","Exponential""Extra Fine ""Fine ""Medium ""Coarse ")
|
||||
#define LEN_VTRIMINC TR("\006", "\013")
|
||||
#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 TR_VBEEPCOUNTDOWN "SilentBeeps\0Voice\0"
|
||||
|
||||
Reference in New Issue
Block a user