1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 06:15:10 +03:00

Issue #488. Firmware part done

This commit is contained in:
Bertrand Songis 2014-01-22 17:31:21 +01:00
parent f83446cea1
commit fc716b3a2a
5 changed files with 7 additions and 7 deletions

View file

@ -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;

View file

@ -1106,7 +1106,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:

View file

@ -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)

View file

@ -2293,12 +2293,12 @@ 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;
int8_t s = g_model.trimInc + 2; // TODO check flash usage, below we do arithmetics again ...
#else
uint8_t checkTrim(uint8_t event)
{
int8_t k = EVT_KEY_MASK(event) - TRM_BASE;
int8_t s = g_model.trimInc;
int8_t s = g_model.trimInc + 2; // TODO check flash usage, below we do arithmetics again ...
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

View file

@ -71,8 +71,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"