diff --git a/companion/src/firmwares/er9x/er9xeeprom.cpp b/companion/src/firmwares/er9x/er9xeeprom.cpp index 18eadd7f5..41fa1d36c 100644 --- a/companion/src/firmwares/er9x/er9xeeprom.cpp +++ b/companion/src/firmwares/er9x/er9xeeprom.cpp @@ -385,9 +385,9 @@ t_Er9xModelData::operator ModelData () c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.extendedLimits = extendedLimits; - c9x.swashRingData.invertELE = swashInvertELE; - c9x.swashRingData.invertAIL = swashInvertAIL; - c9x.swashRingData.invertCOL = swashInvertCOL; + c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100; + c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100; + c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100; c9x.swashRingData.type = swashType; c9x.swashRingData.collectiveSource = er9xToSource(swashCollectiveSource); c9x.swashRingData.value = swashRingValue; diff --git a/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp b/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp index 7096a1ded..d13addaf3 100644 --- a/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp +++ b/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp @@ -517,9 +517,9 @@ t_Ersky9xModelData_v10::operator ModelData () c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.extendedLimits = extendedLimits; - c9x.swashRingData.invertELE = swashInvertELE; - c9x.swashRingData.invertAIL = swashInvertAIL; - c9x.swashRingData.invertCOL = swashInvertCOL; + c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100; + c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100; + c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100; c9x.swashRingData.type = swashType; c9x.swashRingData.collectiveSource = ersky9xToSource_v10(swashCollectiveSource); c9x.swashRingData.value = swashRingValue; @@ -632,9 +632,9 @@ t_Ersky9xModelData_v11::operator ModelData () c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.extendedLimits = extendedLimits; - c9x.swashRingData.invertELE = swashInvertELE; - c9x.swashRingData.invertAIL = swashInvertAIL; - c9x.swashRingData.invertCOL = swashInvertCOL; + c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100; + c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100; + c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100; c9x.swashRingData.type = swashType; c9x.swashRingData.collectiveSource = ersky9xToSource_v11(swashCollectiveSource); c9x.swashRingData.value = swashRingValue; diff --git a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp index 7beb76611..e477de7ef 100644 --- a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp +++ b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp @@ -338,9 +338,9 @@ t_Gruvin9xSwashRingData::t_Gruvin9xSwashRingData() t_Gruvin9xSwashRingData::operator SwashRingData () { SwashRingData c9x; - c9x.invertELE = invertELE; - c9x.invertAIL = invertAIL; - c9x.invertCOL = invertCOL; + c9x.elevatorWeight = invertELE ? -100 : 100; + c9x.aileronWeight = invertAIL ? -100 : 100; + c9x.collectiveWeight = invertCOL ? -100 : 100; c9x.type = type; c9x.collectiveSource = gruvin9xToSource(collectiveSource); c9x.value = value; diff --git a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp index 245b071c6..44de1ce22 100644 --- a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp @@ -410,9 +410,9 @@ t_Open9xGruvin9xCustomFunctionData_v210::operator CustomFunctionData () t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData () { SwashRingData c9x; - c9x.invertELE = invertELE; - c9x.invertAIL = invertAIL; - c9x.invertCOL = invertCOL; + c9x.elevatorWeight = invertELE ? -100 : 100; + c9x.aileronWeight = invertAIL ? -100 : 100; + c9x.collectiveWeight = invertCOL ? -100 : 100; c9x.type = type; c9x.collectiveSource = open9xV4207ToSource(collectiveSource); c9x.value = value; @@ -422,9 +422,9 @@ t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData () t_Open9xGruvin9xSwashRingData_v209::operator SwashRingData () { SwashRingData c9x; - c9x.invertELE = invertELE; - c9x.invertAIL = invertAIL; - c9x.invertCOL = invertCOL; + c9x.elevatorWeight = invertELE ? -100 : 100; + c9x.aileronWeight = invertAIL ? -100 : 100; + c9x.collectiveWeight = invertCOL ? -100 : 100; c9x.type = type; c9x.collectiveSource = open9xV4209ToSource(collectiveSource); c9x.value = value; diff --git a/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp b/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp index 1b8a0ae0a..938b205c3 100644 --- a/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp @@ -640,9 +640,9 @@ t_Open9xArmCustomFunctionData_v211::operator CustomFunctionData () t_Open9xArmSwashRingData_v208::operator SwashRingData () { SwashRingData c9x; - c9x.invertELE = invertELE; - c9x.invertAIL = invertAIL; - c9x.invertCOL = invertCOL; + c9x.elevatorWeight = invertELE ? -100 : 100; + c9x.aileronWeight = invertAIL ? -100 : 100; + c9x.collectiveWeight = invertCOL ? -100 : 100; c9x.type = type; c9x.collectiveSource = open9xArm208ToSource(collectiveSource); c9x.value = value; @@ -652,9 +652,9 @@ t_Open9xArmSwashRingData_v208::operator SwashRingData () t_Open9xArmSwashRingData_v209::operator SwashRingData () { SwashRingData c9x; - c9x.invertELE = invertELE; - c9x.invertAIL = invertAIL; - c9x.invertCOL = invertCOL; + c9x.elevatorWeight = invertELE ? -100 : 100; + c9x.aileronWeight = invertAIL ? -100 : 100; + c9x.collectiveWeight = invertCOL ? -100 : 100; c9x.type = type; c9x.collectiveSource = open9xArm209ToSource(collectiveSource); c9x.value = value; @@ -664,9 +664,9 @@ t_Open9xArmSwashRingData_v209::operator SwashRingData () t_Open9xArmSwashRingData_v210::operator SwashRingData () { SwashRingData c9x; - c9x.invertELE = invertELE; - c9x.invertAIL = invertAIL; - c9x.invertCOL = invertCOL; + c9x.elevatorWeight = invertELE ? -100 : 100; + c9x.aileronWeight = invertAIL ? -100 : 100; + c9x.collectiveWeight = invertCOL ? -100 : 100; c9x.type = type; c9x.collectiveSource = open9xArm210ToSource(collectiveSource); c9x.value = value; diff --git a/companion/src/firmwares/opentx/open9xStockeeprom.cpp b/companion/src/firmwares/opentx/open9xStockeeprom.cpp index f42817d29..880ce420f 100644 --- a/companion/src/firmwares/opentx/open9xStockeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xStockeeprom.cpp @@ -665,9 +665,9 @@ t_Open9xCustomFunctionData_v210::operator CustomFunctionData () t_Open9xSwashRingData_v208::operator SwashRingData () { SwashRingData c9x; - c9x.invertELE = invertELE; - c9x.invertAIL = invertAIL; - c9x.invertCOL = invertCOL; + c9x.elevatorWeight = invertELE ? -100 : 100; + c9x.aileronWeight = invertAIL ? -100 : 100; + c9x.collectiveWeight = invertCOL ? -100 : 100; c9x.type = type; c9x.collectiveSource = open9x208ToSource(collectiveSource); c9x.value = value; @@ -677,9 +677,9 @@ t_Open9xSwashRingData_v208::operator SwashRingData () t_Open9xSwashRingData_v209::operator SwashRingData () { SwashRingData c9x; - c9x.invertELE = invertELE; - c9x.invertAIL = invertAIL; - c9x.invertCOL = invertCOL; + c9x.elevatorWeight = invertELE ? -100 : 100; + c9x.aileronWeight = invertAIL ? -100 : 100; + c9x.collectiveWeight = invertCOL ? -100 : 100; c9x.type = type; c9x.collectiveSource = open9xStock209ToSource(collectiveSource); c9x.value = value; diff --git a/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp index 629de0ee2..244a01e98 100644 --- a/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp +++ b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp @@ -50,6 +50,7 @@ #define FRSKY_STICKS #define OVERRIDE_CHANNEL_FUNCTION #define TIMERS 2 +#define THRTRACE #define FLAVOUR "gruvin9x" #define EEPROM_VARIANT 3 diff --git a/companion/src/firmwares/opentx/opentxM128simulator.cpp b/companion/src/firmwares/opentx/opentxM128simulator.cpp index e02acb022..5fe968394 100644 --- a/companion/src/firmwares/opentx/opentxM128simulator.cpp +++ b/companion/src/firmwares/opentx/opentxM128simulator.cpp @@ -51,6 +51,7 @@ #define OVERRIDE_CHANNEL_FUNCTION #define TIMERS 2 #define GAUGES +#define THRTRACE #define FLAVOUR "9x128" #define EEPROM_VARIANT SIMU_M128_VARIANTS diff --git a/companion/src/firmwares/opentx/opentxM64simulator.cpp b/companion/src/firmwares/opentx/opentxM64simulator.cpp index 7c5e62492..312303f17 100644 --- a/companion/src/firmwares/opentx/opentxM64simulator.cpp +++ b/companion/src/firmwares/opentx/opentxM64simulator.cpp @@ -55,6 +55,7 @@ #define GAUGES #define TIMERS 2 #define NUM_POTS 3 +#define THRTRACE #define FLAVOUR "9x" #define EEPROM_VARIANT SIMU_STOCK_VARIANTS diff --git a/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp b/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp index ecf04a744..53f8f2c78 100644 --- a/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp +++ b/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp @@ -57,6 +57,7 @@ #define OVERRIDE_CHANNEL_FUNCTION #define NUM_POTS 3 #define TIMERS 2 +#define THRTRACE #define EEPROM_VARIANT 3 #define FLAVOUR "sky9x" diff --git a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp index 331225fa4..9f7065c19 100644 --- a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp +++ b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp @@ -58,6 +58,7 @@ #define REVPLUS #define OVERRIDE_CHANNEL_FUNCTION #define TIMERS 3 +#define THRTRACE #define EEPROM_VARIANT 3 #define FLAVOUR "taranis-plus" diff --git a/companion/src/firmwares/opentx/opentxTaranisX9ESimulator.cpp b/companion/src/firmwares/opentx/opentxTaranisX9ESimulator.cpp index 5b3991bb0..775dcfb49 100755 --- a/companion/src/firmwares/opentx/opentxTaranisX9ESimulator.cpp +++ b/companion/src/firmwares/opentx/opentxTaranisX9ESimulator.cpp @@ -59,6 +59,7 @@ #define REV9E #define OVERRIDE_CHANNEL_FUNCTION #define TIMERS 3 +#define THRTRACE #define EEPROM_VARIANT 3 #define FLAVOUR "taranis-x9e" diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index e2685a69a..40a429a43 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -725,18 +725,33 @@ class HeliField: public StructField { public: HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant) { - Append(new BoolField<1>(heli.invertELE)); - Append(new BoolField<1>(heli.invertAIL)); - Append(new BoolField<1>(heli.invertCOL)); - Append(new UnsignedField<5>(heli.type)); - Append(new SourceField<8>(heli.collectiveSource, board, version, variant)); if (IS_TARANIS(board) && version >= 217) { + Append(new UnsignedField<8>(heli.type)); + Append(new UnsignedField<8>(heli.value)); + Append(new SourceField<8>(heli.collectiveSource, board, version, variant)); Append(new SourceField<8>(heli.aileronSource, board, version, variant)); Append(new SourceField<8>(heli.elevatorSource, board, version, variant)); + Append(new SignedField<8>(heli.collectiveWeight)); + Append(new SignedField<8>(heli.aileronWeight)); + Append(new SignedField<8>(heli.elevatorWeight)); + } + else { + Append(new BoolField<1>(invertELE)); + Append(new BoolField<1>(invertAIL)); + Append(new BoolField<1>(invertCOL)); + Append(new UnsignedField<5>(heli.type)); + Append(new SourceField<8>(heli.collectiveSource, board, version, variant)); + //, FLAG_NOSWITCHES)); Fix shift in collective + Append(new UnsignedField<8>(heli.value)); } - //, FLAG_NOSWITCHES)); Fix shift in collective - Append(new UnsignedField<8>(heli.value)); } + + // TODO before + after + + protected: + bool invertELE; + bool invertAIL; + bool invertCOL; }; class FlightModeField: public TransformedField { diff --git a/radio/src/gui/Taranis/gui.h b/radio/src/gui/Taranis/gui.h index 48d357e78..a27e7a1ad 100755 --- a/radio/src/gui/Taranis/gui.h +++ b/radio/src/gui/Taranis/gui.h @@ -39,8 +39,7 @@ #define DEFAULT_SCROLLBAR_X (LCD_W-1) #define NUM_BODY_LINES (LCD_LINES-1) -#define MENU_TITLE_HEIGHT FH -#define MENU_NAVIG_HEIGHT 0 +#define MENU_HEADER_HEIGHT FH struct MenuItem { const char *name;