Merge pull request #2057 from opentx/bsongis/issue_2032_CCPM_on_taranis

Fixes #2032
This commit is contained in:
Bertrand Songis
2015-02-15 13:04:02 +01:00
40 changed files with 479 additions and 262 deletions
+5 -3
View File
@@ -684,11 +684,13 @@ class FlightModeData {
class SwashRingData { // Swash Ring data class SwashRingData { // Swash Ring data
public: public:
SwashRingData() { clear(); } SwashRingData() { clear(); }
bool invertELE; int elevatorWeight;
bool invertAIL; int aileronWeight;
bool invertCOL; int collectiveWeight;
unsigned int type; unsigned int type;
RawSource collectiveSource; RawSource collectiveSource;
RawSource aileronSource;
RawSource elevatorSource;
unsigned int value; unsigned int value;
void clear() { memset(this, 0, sizeof(SwashRingData)); } void clear() { memset(this, 0, sizeof(SwashRingData)); }
}; };
+3 -3
View File
@@ -385,9 +385,9 @@ t_Er9xModelData::operator ModelData ()
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits; c9x.extendedLimits = extendedLimits;
c9x.swashRingData.invertELE = swashInvertELE; c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.invertAIL = swashInvertAIL; c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
c9x.swashRingData.invertCOL = swashInvertCOL; c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100;
c9x.swashRingData.type = swashType; c9x.swashRingData.type = swashType;
c9x.swashRingData.collectiveSource = er9xToSource(swashCollectiveSource); c9x.swashRingData.collectiveSource = er9xToSource(swashCollectiveSource);
c9x.swashRingData.value = swashRingValue; c9x.swashRingData.value = swashRingValue;
@@ -517,9 +517,9 @@ t_Ersky9xModelData_v10::operator ModelData ()
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits; c9x.extendedLimits = extendedLimits;
c9x.swashRingData.invertELE = swashInvertELE; c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.invertAIL = swashInvertAIL; c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
c9x.swashRingData.invertCOL = swashInvertCOL; c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100;
c9x.swashRingData.type = swashType; c9x.swashRingData.type = swashType;
c9x.swashRingData.collectiveSource = ersky9xToSource_v10(swashCollectiveSource); c9x.swashRingData.collectiveSource = ersky9xToSource_v10(swashCollectiveSource);
c9x.swashRingData.value = swashRingValue; c9x.swashRingData.value = swashRingValue;
@@ -632,9 +632,9 @@ t_Ersky9xModelData_v11::operator ModelData ()
c9x.beepANACenter = beepANACenter; c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppmPulsePol = pulsePol; c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits; c9x.extendedLimits = extendedLimits;
c9x.swashRingData.invertELE = swashInvertELE; c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.invertAIL = swashInvertAIL; c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
c9x.swashRingData.invertCOL = swashInvertCOL; c9x.swashRingData.collectiveWeight = swashInvertCOL ? -100 : 100;
c9x.swashRingData.type = swashType; c9x.swashRingData.type = swashType;
c9x.swashRingData.collectiveSource = ersky9xToSource_v11(swashCollectiveSource); c9x.swashRingData.collectiveSource = ersky9xToSource_v11(swashCollectiveSource);
c9x.swashRingData.value = swashRingValue; c9x.swashRingData.value = swashRingValue;
@@ -338,9 +338,9 @@ t_Gruvin9xSwashRingData::t_Gruvin9xSwashRingData()
t_Gruvin9xSwashRingData::operator SwashRingData () t_Gruvin9xSwashRingData::operator SwashRingData ()
{ {
SwashRingData c9x; SwashRingData c9x;
c9x.invertELE = invertELE; c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.invertAIL = invertAIL; c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.invertCOL = invertCOL; c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type; c9x.type = type;
c9x.collectiveSource = gruvin9xToSource(collectiveSource); c9x.collectiveSource = gruvin9xToSource(collectiveSource);
c9x.value = value; c9x.value = value;
@@ -410,9 +410,9 @@ t_Open9xGruvin9xCustomFunctionData_v210::operator CustomFunctionData ()
t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData () t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData ()
{ {
SwashRingData c9x; SwashRingData c9x;
c9x.invertELE = invertELE; c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.invertAIL = invertAIL; c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.invertCOL = invertCOL; c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type; c9x.type = type;
c9x.collectiveSource = open9xV4207ToSource(collectiveSource); c9x.collectiveSource = open9xV4207ToSource(collectiveSource);
c9x.value = value; c9x.value = value;
@@ -422,9 +422,9 @@ t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData ()
t_Open9xGruvin9xSwashRingData_v209::operator SwashRingData () t_Open9xGruvin9xSwashRingData_v209::operator SwashRingData ()
{ {
SwashRingData c9x; SwashRingData c9x;
c9x.invertELE = invertELE; c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.invertAIL = invertAIL; c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.invertCOL = invertCOL; c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type; c9x.type = type;
c9x.collectiveSource = open9xV4209ToSource(collectiveSource); c9x.collectiveSource = open9xV4209ToSource(collectiveSource);
c9x.value = value; c9x.value = value;
@@ -640,9 +640,9 @@ t_Open9xArmCustomFunctionData_v211::operator CustomFunctionData ()
t_Open9xArmSwashRingData_v208::operator SwashRingData () t_Open9xArmSwashRingData_v208::operator SwashRingData ()
{ {
SwashRingData c9x; SwashRingData c9x;
c9x.invertELE = invertELE; c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.invertAIL = invertAIL; c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.invertCOL = invertCOL; c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type; c9x.type = type;
c9x.collectiveSource = open9xArm208ToSource(collectiveSource); c9x.collectiveSource = open9xArm208ToSource(collectiveSource);
c9x.value = value; c9x.value = value;
@@ -652,9 +652,9 @@ t_Open9xArmSwashRingData_v208::operator SwashRingData ()
t_Open9xArmSwashRingData_v209::operator SwashRingData () t_Open9xArmSwashRingData_v209::operator SwashRingData ()
{ {
SwashRingData c9x; SwashRingData c9x;
c9x.invertELE = invertELE; c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.invertAIL = invertAIL; c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.invertCOL = invertCOL; c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type; c9x.type = type;
c9x.collectiveSource = open9xArm209ToSource(collectiveSource); c9x.collectiveSource = open9xArm209ToSource(collectiveSource);
c9x.value = value; c9x.value = value;
@@ -664,9 +664,9 @@ t_Open9xArmSwashRingData_v209::operator SwashRingData ()
t_Open9xArmSwashRingData_v210::operator SwashRingData () t_Open9xArmSwashRingData_v210::operator SwashRingData ()
{ {
SwashRingData c9x; SwashRingData c9x;
c9x.invertELE = invertELE; c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.invertAIL = invertAIL; c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.invertCOL = invertCOL; c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type; c9x.type = type;
c9x.collectiveSource = open9xArm210ToSource(collectiveSource); c9x.collectiveSource = open9xArm210ToSource(collectiveSource);
c9x.value = value; c9x.value = value;
@@ -665,9 +665,9 @@ t_Open9xCustomFunctionData_v210::operator CustomFunctionData ()
t_Open9xSwashRingData_v208::operator SwashRingData () t_Open9xSwashRingData_v208::operator SwashRingData ()
{ {
SwashRingData c9x; SwashRingData c9x;
c9x.invertELE = invertELE; c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.invertAIL = invertAIL; c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.invertCOL = invertCOL; c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type; c9x.type = type;
c9x.collectiveSource = open9x208ToSource(collectiveSource); c9x.collectiveSource = open9x208ToSource(collectiveSource);
c9x.value = value; c9x.value = value;
@@ -677,9 +677,9 @@ t_Open9xSwashRingData_v208::operator SwashRingData ()
t_Open9xSwashRingData_v209::operator SwashRingData () t_Open9xSwashRingData_v209::operator SwashRingData ()
{ {
SwashRingData c9x; SwashRingData c9x;
c9x.invertELE = invertELE; c9x.elevatorWeight = invertELE ? -100 : 100;
c9x.invertAIL = invertAIL; c9x.aileronWeight = invertAIL ? -100 : 100;
c9x.invertCOL = invertCOL; c9x.collectiveWeight = invertCOL ? -100 : 100;
c9x.type = type; c9x.type = type;
c9x.collectiveSource = open9xStock209ToSource(collectiveSource); c9x.collectiveSource = open9xStock209ToSource(collectiveSource);
c9x.value = value; c9x.value = value;
@@ -50,6 +50,7 @@
#define FRSKY_STICKS #define FRSKY_STICKS
#define OVERRIDE_CHANNEL_FUNCTION #define OVERRIDE_CHANNEL_FUNCTION
#define TIMERS 2 #define TIMERS 2
#define THRTRACE
#define FLAVOUR "gruvin9x" #define FLAVOUR "gruvin9x"
#define EEPROM_VARIANT 3 #define EEPROM_VARIANT 3
@@ -51,6 +51,7 @@
#define OVERRIDE_CHANNEL_FUNCTION #define OVERRIDE_CHANNEL_FUNCTION
#define TIMERS 2 #define TIMERS 2
#define GAUGES #define GAUGES
#define THRTRACE
#define FLAVOUR "9x128" #define FLAVOUR "9x128"
#define EEPROM_VARIANT SIMU_M128_VARIANTS #define EEPROM_VARIANT SIMU_M128_VARIANTS
@@ -55,6 +55,7 @@
#define GAUGES #define GAUGES
#define TIMERS 2 #define TIMERS 2
#define NUM_POTS 3 #define NUM_POTS 3
#define THRTRACE
#define FLAVOUR "9x" #define FLAVOUR "9x"
#define EEPROM_VARIANT SIMU_STOCK_VARIANTS #define EEPROM_VARIANT SIMU_STOCK_VARIANTS
@@ -57,6 +57,7 @@
#define OVERRIDE_CHANNEL_FUNCTION #define OVERRIDE_CHANNEL_FUNCTION
#define NUM_POTS 3 #define NUM_POTS 3
#define TIMERS 2 #define TIMERS 2
#define THRTRACE
#define EEPROM_VARIANT 3 #define EEPROM_VARIANT 3
#define FLAVOUR "sky9x" #define FLAVOUR "sky9x"
@@ -58,6 +58,7 @@
#define REVPLUS #define REVPLUS
#define OVERRIDE_CHANNEL_FUNCTION #define OVERRIDE_CHANNEL_FUNCTION
#define TIMERS 3 #define TIMERS 3
#define THRTRACE
#define EEPROM_VARIANT 3 #define EEPROM_VARIANT 3
#define FLAVOUR "taranis-plus" #define FLAVOUR "taranis-plus"
@@ -59,6 +59,7 @@
#define REV9E #define REV9E
#define OVERRIDE_CHANNEL_FUNCTION #define OVERRIDE_CHANNEL_FUNCTION
#define TIMERS 3 #define TIMERS 3
#define THRTRACE
#define EEPROM_VARIANT 3 #define EEPROM_VARIANT 3
#define FLAVOUR "taranis-x9e" #define FLAVOUR "taranis-x9e"
@@ -725,14 +725,33 @@ class HeliField: public StructField {
public: public:
HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant) HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant)
{ {
Append(new BoolField<1>(heli.invertELE)); if (IS_TARANIS(board) && version >= 217) {
Append(new BoolField<1>(heli.invertAIL)); Append(new UnsignedField<8>(heli.type));
Append(new BoolField<1>(heli.invertCOL)); Append(new UnsignedField<8>(heli.value));
Append(new UnsignedField<5>(heli.type)); Append(new SourceField<8>(heli.collectiveSource, board, version, variant));
Append(new SourceField<8>(heli.collectiveSource, board, version, variant)); Append(new SourceField<8>(heli.aileronSource, board, version, variant));
//, FLAG_NOSWITCHES)); Fix shift in collective Append(new SourceField<8>(heli.elevatorSource, board, version, variant));
Append(new UnsignedField<8>(heli.value)); 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));
}
} }
// TODO before + after
protected:
bool invertELE;
bool invertAIL;
bool invertCOL;
}; };
class FlightModeField: public TransformedField { class FlightModeField: public TransformedField {
+56 -18
View File
@@ -8,12 +8,32 @@ HeliPanel::HeliPanel(QWidget *parent, ModelData & model, GeneralSettings & gener
{ {
ui->setupUi(this); ui->setupUi(this);
connect(ui->swashTypeCB, SIGNAL(currentIndexChanged(int)), this, SLOT(edited())); connect(ui->swashType, SIGNAL(currentIndexChanged(int)), this, SLOT(edited()));
connect(ui->swashCollectiveCB, SIGNAL(currentIndexChanged(int)), this, SLOT(edited())); connect(ui->swashRingVal, SIGNAL(editingFinished()), this, SLOT(edited()));
connect(ui->swashRingValSB, SIGNAL(editingFinished()), this, SLOT(edited())); connect(ui->swashCollectiveSource, SIGNAL(currentIndexChanged(int)), this, SLOT(edited()));
connect(ui->swashInvertELE, SIGNAL(stateChanged(int)), this, SLOT(edited())); if (firmware->getCapability(VirtualInputs)) {
connect(ui->swashInvertAIL, SIGNAL(stateChanged(int)), this, SLOT(edited())); connect(ui->swashAileronSource, SIGNAL(currentIndexChanged(int)), this, SLOT(edited()));
connect(ui->swashInvertCOL, SIGNAL(stateChanged(int)), this, SLOT(edited())); connect(ui->swashElevatorSource, SIGNAL(currentIndexChanged(int)), this, SLOT(edited()));
connect(ui->swashAileronWeight, SIGNAL(editingFinished()), this, SLOT(edited()));
connect(ui->swashElevatorWeight, SIGNAL(editingFinished()), this, SLOT(edited()));
connect(ui->swashCollectiveWeight, SIGNAL(editingFinished()), this, SLOT(edited()));
ui->invertLabel->hide();
ui->swashElevatorInvert->hide();
ui->swashAileronInvert->hide();
ui->swashCollectiveInvert->hide();
}
else {
connect(ui->swashElevatorInvert, SIGNAL(stateChanged(int)), this, SLOT(edited()));
connect(ui->swashAileronInvert, SIGNAL(stateChanged(int)), this, SLOT(edited()));
connect(ui->swashCollectiveInvert, SIGNAL(stateChanged(int)), this, SLOT(edited()));
ui->aileronLabel->hide();
ui->elevatorLabel->hide();
ui->swashAileronSource->hide();
ui->swashElevatorSource->hide();
ui->swashAileronWeight->hide();
ui->swashElevatorWeight->hide();
ui->swashCollectiveWeight->hide();
}
disableMouseScrolling(); disableMouseScrolling();
} }
@@ -27,12 +47,21 @@ void HeliPanel::update()
{ {
lock = true; lock = true;
ui->swashTypeCB->setCurrentIndex(model->swashRingData.type); ui->swashType->setCurrentIndex(model->swashRingData.type);
populateSourceCB(ui->swashCollectiveCB, model->swashRingData.collectiveSource, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS); populateSourceCB(ui->swashCollectiveSource, model->swashRingData.collectiveSource, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
ui->swashRingValSB->setValue(model->swashRingData.value); ui->swashRingVal->setValue(model->swashRingData.value);
ui->swashInvertELE->setChecked(model->swashRingData.invertELE); if (firmware->getCapability(VirtualInputs)) {
ui->swashInvertAIL->setChecked(model->swashRingData.invertAIL); populateSourceCB(ui->swashElevatorSource, model->swashRingData.elevatorSource, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
ui->swashInvertCOL->setChecked(model->swashRingData.invertCOL); populateSourceCB(ui->swashAileronSource, model->swashRingData.aileronSource, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
ui->swashElevatorWeight->setValue(model->swashRingData.elevatorWeight);
ui->swashAileronWeight->setValue(model->swashRingData.aileronWeight);
ui->swashCollectiveWeight->setValue(model->swashRingData.collectiveWeight);
}
else {
ui->swashElevatorInvert->setChecked(model->swashRingData.elevatorWeight < 0);
ui->swashAileronInvert->setChecked(model->swashRingData.aileronWeight < 0);
ui->swashCollectiveInvert->setChecked(model->swashRingData.collectiveWeight < 0);
}
lock = false; lock = false;
} }
@@ -40,12 +69,21 @@ void HeliPanel::update()
void HeliPanel::edited() void HeliPanel::edited()
{ {
if (!lock) { if (!lock) {
model->swashRingData.type = ui->swashTypeCB->currentIndex(); model->swashRingData.type = ui->swashType->currentIndex();
model->swashRingData.collectiveSource = ui->swashCollectiveCB->itemData(ui->swashCollectiveCB->currentIndex()).toInt(); model->swashRingData.collectiveSource = ui->swashCollectiveSource->itemData(ui->swashCollectiveSource->currentIndex()).toInt();
model->swashRingData.value = ui->swashRingValSB->value(); model->swashRingData.value = ui->swashRingVal->value();
model->swashRingData.invertELE = ui->swashInvertELE->isChecked(); if (firmware->getCapability(VirtualInputs)) {
model->swashRingData.invertAIL = ui->swashInvertAIL->isChecked(); model->swashRingData.elevatorSource = ui->swashElevatorSource->itemData(ui->swashElevatorSource->currentIndex()).toInt();
model->swashRingData.invertCOL = ui->swashInvertCOL->isChecked(); model->swashRingData.aileronSource = ui->swashAileronSource->itemData(ui->swashAileronSource->currentIndex()).toInt();
model->swashRingData.elevatorWeight = ui->swashElevatorWeight->value();
model->swashRingData.aileronWeight = ui->swashAileronWeight->value();
model->swashRingData.collectiveWeight = ui->swashCollectiveWeight->value();
}
else {
model->swashRingData.elevatorWeight = (ui->swashElevatorInvert->isChecked() ? -100 : 100);
model->swashRingData.aileronWeight = (ui->swashAileronInvert->isChecked() ? -100 : 100);
model->swashRingData.collectiveWeight = (ui->swashCollectiveInvert->isChecked() ? -100 : 100);
}
emit modified(); emit modified();
} }
} }
+141 -43
View File
@@ -17,40 +17,15 @@
<property name="horizontalSpacing"> <property name="horizontalSpacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="3" column="1">
<layout class="QGridLayout" name="gridLayout_21">
<item row="0" column="0">
<widget class="QCheckBox" name="swashInvertELE">
<property name="text">
<string>Invert Elevator</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="swashInvertAIL">
<property name="text">
<string>Invert Aileron</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="swashInvertCOL">
<property name="text">
<string>Invert Collective</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="label_108"> <widget class="QLabel" name="collectiveLabel">
<property name="text"> <property name="text">
<string>Invert</string> <string>Collective</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="swashTypeCB"> <widget class="QComboBox" name="swashType">
<item> <item>
<property name="text"> <property name="text">
<string>Off</string> <string>Off</string>
@@ -78,25 +53,69 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="3" column="1">
<widget class="QLabel" name="label_106"> <layout class="QHBoxLayout" name="collectiveLayout">
<property name="text"> <property name="topMargin">
<string>Collective</string> <number>0</number>
</property> </property>
</widget> <item>
<widget class="QComboBox" name="swashCollectiveSource"/>
</item>
<item>
<widget class="QSpinBox" name="swashCollectiveWeight">
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item> </item>
<item row="1" column="1"> <item row="6" column="1">
<widget class="QComboBox" name="swashCollectiveCB"/> <layout class="QGridLayout" name="gridLayout_21">
<item row="0" column="0">
<widget class="QCheckBox" name="swashElevatorInvert">
<property name="text">
<string>Invert Elevator</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="swashAileronInvert">
<property name="text">
<string>Invert Aileron</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="swashCollectiveInvert">
<property name="text">
<string>Invert Collective</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item row="0" column="0"> <item row="4" column="0">
<widget class="QLabel" name="label_103"> <widget class="QLabel" name="elevatorLabel">
<property name="text"> <property name="text">
<string>Swash Type</string> <string>Elevator</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="swashRingValSB"> <widget class="QSpinBox" name="swashRingVal">
<property name="suffix"> <property name="suffix">
<string/> <string/>
</property> </property>
@@ -114,14 +133,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="6" column="0">
<widget class="QLabel" name="label_107"> <widget class="QLabel" name="invertLabel">
<property name="text"> <property name="text">
<string>Swash Ring</string> <string>Invert</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="7" column="1">
<spacer name="verticalSpacer_21"> <spacer name="verticalSpacer_21">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@@ -134,6 +153,85 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="label_107">
<property name="text">
<string>Swash Ring</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_103">
<property name="text">
<string>Swash Type</string>
</property>
</widget>
</item>
<item row="4" column="1">
<layout class="QHBoxLayout" name="elevatorLayout">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="swashElevatorSource"/>
</item>
<item>
<widget class="QSpinBox" name="swashElevatorWeight">
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QLabel" name="aileronLabel">
<property name="text">
<string>Aileron</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="aileronLayout">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="swashAileronSource"/>
</item>
<item>
<widget class="QSpinBox" name="swashAileronWeight">
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>
+1 -1
View File
@@ -826,7 +826,7 @@ ifeq ($(PCB), TARANIS)
PPM_LIMITS_SYMETRICAL = YES PPM_LIMITS_SYMETRICAL = YES
PPM_CENTER_ADJUSTABLE = YES PPM_CENTER_ADJUSTABLE = YES
DSM2 = PPM DSM2 = PPM
CPPDEFS += -DPCBTARANIS -DCPUARM -DCPUSTM32 -DVIRTUALINPUTS -DXCURVES -DEEPROM_VARIANT=0 -DAUDIO -DPXX CPPDEFS += -DPCBTARANIS -DCPUARM -DCPUSTM32 -DVIRTUALINPUTS -DLUAINPUTS -DXCURVES -DEEPROM_VARIANT=0 -DAUDIO -DPXX
INCDIRS += targets/taranis CoOS/kernel CoOS/portable INCDIRS += targets/taranis CoOS/kernel CoOS/portable
EXTRAINCDIRS += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/include EXTRAINCDIRS += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/include
EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc EXTRAINCDIRS += targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc targets/taranis/STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_Device_Library/Core/inc
-5
View File
@@ -208,11 +208,6 @@ bool isSwitchAvailableInTimers(int swtch)
return isSwitchAvailable(swtch, TimersContext); return isSwitchAvailable(swtch, TimersContext);
} }
bool isThrottleSourceAvailable(int source)
{
return true;
}
bool isLogicalSwitchFunctionAvailable(int function) bool isLogicalSwitchFunctionAvailable(int function)
{ {
return function != LS_FUNC_RANGE; return function != LS_FUNC_RANGE;
+1 -1
View File
@@ -61,7 +61,7 @@ void menuModelHeli(uint8_t event)
break; break;
case ITEM_HELI_COLLECTIVE: case ITEM_HELI_COLLECTIVE:
g_model.swashR.collectiveSource = selectMenuItem(HELI_PARAM_OFS, y, STR_COLLECTIVE, NULL, g_model.swashR.collectiveSource, 0, MIXSRC_LAST_CH, attr, event); g_model.swashR.collectiveSource = selectMenuItem(HELI_PARAM_OFS, y, STR_COLLECTIVE_SOURCE, NULL, g_model.swashR.collectiveSource, 0, MIXSRC_LAST_CH, attr, event);
putsMixerSource(HELI_PARAM_OFS, y, g_model.swashR.collectiveSource, attr); putsMixerSource(HELI_PARAM_OFS, y, g_model.swashR.collectiveSource, attr);
break; break;
+8 -8
View File
@@ -282,7 +282,7 @@ bool swapExpoMix(uint8_t expo, uint8_t &idx, uint8_t up)
enum ExposFields { enum ExposFields {
CASE_CPUARM(EXPO_FIELD_NAME) CASE_CPUARM(EXPO_FIELD_NAME)
EXPO_FIELD_WEIGHT, EXPO_FIELD_WEIGHT,
CASE_9X(EXPO_FIELD_EXPO) EXPO_FIELD_EXPO,
CASE_CURVES(EXPO_FIELD_CURVE) CASE_CURVES(EXPO_FIELD_CURVE)
CASE_FLIGHT_MODES(EXPO_FIELD_FLIGHT_MODES) CASE_FLIGHT_MODES(EXPO_FIELD_FLIGHT_MODES)
EXPO_FIELD_SWITCH, EXPO_FIELD_SWITCH,
@@ -311,7 +311,7 @@ void menuModelExpoOne(uint8_t event)
{ {
#if defined(CPUARM) #if defined(CPUARM)
case EXPO_FIELD_NAME: case EXPO_FIELD_NAME:
editSingleName(EXPO_ONE_2ND_COLUMN-IF_9X(sizeof(ed->name)*FW), y, STR_EXPONAME, ed->name, sizeof(ed->name), event, attr); editSingleName(EXPO_ONE_2ND_COLUMN-sizeof(ed->name)*FW, y, STR_EXPONAME, ed->name, sizeof(ed->name), event, attr);
break; break;
#endif #endif
@@ -353,16 +353,16 @@ void menuModelExpoOne(uint8_t event)
#if defined(FLIGHT_MODES) #if defined(FLIGHT_MODES)
case EXPO_FIELD_FLIGHT_MODES: case EXPO_FIELD_FLIGHT_MODES:
ed->flightModes = editFlightModes(EXPO_ONE_2ND_COLUMN-IF_9X(EXPO_ONE_FM_WIDTH), y, event, ed->flightModes, attr); ed->flightModes = editFlightModes(EXPO_ONE_2ND_COLUMN-EXPO_ONE_FM_WIDTH, y, event, ed->flightModes, attr);
break; break;
#endif #endif
case EXPO_FIELD_SWITCH: case EXPO_FIELD_SWITCH:
ed->swtch = switchMenuItem(EXPO_ONE_2ND_COLUMN-IF_9X(3*FW), y, ed->swtch, attr, event); ed->swtch = switchMenuItem(EXPO_ONE_2ND_COLUMN-3*FW, y, ed->swtch, attr, event);
break; break;
case EXPO_FIELD_SIDE: case EXPO_FIELD_SIDE:
ed->mode = 4 - selectMenuItem(EXPO_ONE_2ND_COLUMN-IF_9X(3*FW), y, STR_SIDE, STR_VSIDE, 4-ed->mode, 1, 3, attr, event); ed->mode = 4 - selectMenuItem(EXPO_ONE_2ND_COLUMN-3*FW, y, STR_SIDE, STR_VSIDE, 4-ed->mode, 1, 3, attr, event);
break; break;
} }
y += FH; y += FH;
@@ -474,11 +474,11 @@ void menuModelMixOne(uint8_t event)
#else #else
if (m_posVert == MIX_FIELD_TRIM && md2->srcRaw > NUM_STICKS) if (m_posVert == MIX_FIELD_TRIM && md2->srcRaw > NUM_STICKS)
#endif #endif
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, CASE_9X(0) CASE_CURVES(0) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/}) SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, 0, CASE_CURVES(0) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/})
else else
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, CASE_9X(1) CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/}); SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, 1, CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
#else #else
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, CASE_9X(1) CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/}); SUBMENU_NOTITLE(MIX_FIELD_COUNT, {CASE_CPUARM(0) 0, 0, 0, 1, CASE_CURVES(1) CASE_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
#endif #endif
#if MENU_COLUMNS > 1 #if MENU_COLUMNS > 1
+1 -1
View File
@@ -351,7 +351,7 @@ void menuModelSetup(uint8_t event)
case ITEM_MODEL_THROTTLE_TRACE: case ITEM_MODEL_THROTTLE_TRACE:
{ {
lcd_putsLeft(y, STR_TTRACE); lcd_putsLeft(y, STR_TTRACE);
if (attr) CHECK_INCDEC_MODELVAR_ZERO_CHECK(event, g_model.thrTraceSrc, NUM_POTS+NUM_CHNOUT, isThrottleSourceAvailable); if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.thrTraceSrc, NUM_POTS+NUM_CHNOUT);
uint8_t idx = g_model.thrTraceSrc + MIXSRC_Thr; uint8_t idx = g_model.thrTraceSrc + MIXSRC_Thr;
if (idx > MIXSRC_Thr) if (idx > MIXSRC_Thr)
idx += 1; idx += 1;
+1 -2
View File
@@ -39,8 +39,7 @@
#define DEFAULT_SCROLLBAR_X (LCD_W-1) #define DEFAULT_SCROLLBAR_X (LCD_W-1)
#define NUM_BODY_LINES (LCD_LINES-1) #define NUM_BODY_LINES (LCD_LINES-1)
#define MENU_TITLE_HEIGHT FH #define MENU_HEADER_HEIGHT FH
#define MENU_NAVIG_HEIGHT 0
struct MenuItem { struct MenuItem {
const char *name; const char *name;
+50 -25
View File
@@ -37,52 +37,77 @@
enum menuModelHeliItems { enum menuModelHeliItems {
ITEM_HELI_SWASHTYPE, ITEM_HELI_SWASHTYPE,
ITEM_HELI_COLLECTIVE,
ITEM_HELI_SWASHRING, ITEM_HELI_SWASHRING,
ITEM_HELI_ELEDIRECTION, ITEM_HELI_ELE,
ITEM_HELI_AILDIRECTION, ITEM_HELI_ELE_WEIGHT,
ITEM_HELI_COLDIRECTION ITEM_HELI_AIL,
ITEM_HELI_AIL_WEIGHT,
ITEM_HELI_COL,
ITEM_HELI_COL_WEIGHT,
ITEM_HELI_MAX
}; };
#define HELI_PARAM_OFS (23*FW) #define MODEL_HELI_2ND_COLUMN (LCD_W-17*FW-MENUS_SCROLLBAR_WIDTH)
void menuModelHeli(uint8_t event) void menuModelHeli(uint8_t event)
{ {
SIMPLE_MENU(STR_MENUHELISETUP, menuTabModel, e_Heli, 7); SIMPLE_MENU(STR_MENUHELISETUP, menuTabModel, e_Heli, ITEM_HELI_MAX);
uint8_t sub = m_posVert - 1; int sub = m_posVert;
for (uint8_t i=0; i<6; i++) { for (unsigned int i=0; i<NUM_BODY_LINES; i++) {
coord_t y = MENU_TITLE_HEIGHT + 1 + i*FH; coord_t y = MENU_HEADER_HEIGHT + 1 + i*FH;
uint8_t attr = (sub == i ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0); int k = i+s_pgOfs;
switch(i) { LcdFlags blink = ((s_editMode>0) ? BLINK|INVERS : INVERS);
LcdFlags attr = (sub == k ? blink : 0);
switch(k) {
case ITEM_HELI_SWASHTYPE: case ITEM_HELI_SWASHTYPE:
g_model.swashR.type = selectMenuItem(HELI_PARAM_OFS, y, STR_SWASHTYPE, STR_VSWASHTYPE, g_model.swashR.type, 0, SWASH_TYPE_MAX, attr, event); g_model.swashR.type = selectMenuItem(MODEL_HELI_2ND_COLUMN, y, STR_SWASHTYPE, STR_VSWASHTYPE, g_model.swashR.type, 0, SWASH_TYPE_MAX, attr, event);
break;
case ITEM_HELI_COLLECTIVE:
lcd_putsLeft(y, STR_COLLECTIVE);
if (attr) CHECK_INCDEC_MODELSOURCE(event, g_model.swashR.collectiveSource, 0, MIXSRC_LAST_CH);
putsMixerSource(HELI_PARAM_OFS, y, g_model.swashR.collectiveSource, attr);
break; break;
case ITEM_HELI_SWASHRING: case ITEM_HELI_SWASHRING:
lcd_putsLeft(y, STR_SWASHRING); lcd_putsLeft(y, STR_SWASHRING);
lcd_outdezAtt(HELI_PARAM_OFS, y, g_model.swashR.value, LEFT|attr); lcd_outdezAtt(MODEL_HELI_2ND_COLUMN, y, g_model.swashR.value, LEFT|attr);
if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.swashR.value, 100); if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.swashR.value, 100);
break; break;
case ITEM_HELI_ELEDIRECTION: case ITEM_HELI_ELE:
g_model.swashR.invertELE = selectMenuItem(HELI_PARAM_OFS, y, STR_ELEDIRECTION, STR_MMMINV, g_model.swashR.invertELE, 0, 1, attr, event); lcd_putsLeft(y, "Elevator" /*STR_ELEVATOR_SOURCE*/);
putsMixerSource(MODEL_HELI_2ND_COLUMN, y, g_model.swashR.elevatorSource, attr);
if (attr) CHECK_INCDEC_MODELSOURCE(event, g_model.swashR.elevatorSource, 0, MIXSRC_LAST_CH);
break; break;
case ITEM_HELI_AILDIRECTION: case ITEM_HELI_ELE_WEIGHT:
g_model.swashR.invertAIL = selectMenuItem(HELI_PARAM_OFS, y, STR_AILDIRECTION, STR_MMMINV, g_model.swashR.invertAIL, 0, 1, attr, event); lcd_puts(INDENT_WIDTH, y, STR_WEIGHT);
lcd_outdezAtt(MODEL_HELI_2ND_COLUMN, y, g_model.swashR.elevatorWeight, LEFT|attr);
if (attr) CHECK_INCDEC_MODELVAR(event, g_model.swashR.elevatorWeight, -100, 100);
break; break;
case ITEM_HELI_COLDIRECTION: case ITEM_HELI_AIL:
g_model.swashR.invertCOL = selectMenuItem(HELI_PARAM_OFS, y, STR_COLDIRECTION, STR_MMMINV, g_model.swashR.invertCOL, 0, 1, attr, event); lcd_putsLeft(y, "Aileron" /*STR_ELEVATOR_SOURCE*/);
putsMixerSource(MODEL_HELI_2ND_COLUMN, y, g_model.swashR.aileronSource, attr);
if (attr) CHECK_INCDEC_MODELSOURCE(event, g_model.swashR.aileronSource, 0, MIXSRC_LAST_CH);
break; break;
case ITEM_HELI_AIL_WEIGHT:
lcd_puts(INDENT_WIDTH, y, STR_WEIGHT);
lcd_outdezAtt(MODEL_HELI_2ND_COLUMN, y, g_model.swashR.aileronWeight, LEFT|attr);
if (attr) CHECK_INCDEC_MODELVAR(event, g_model.swashR.aileronWeight, -100, 100);
break;
case ITEM_HELI_COL:
lcd_putsLeft(y, "Collective" /*STR_ELEVATOR_SOURCE*/);
putsMixerSource(MODEL_HELI_2ND_COLUMN, y, g_model.swashR.collectiveSource, attr);
if (attr) CHECK_INCDEC_MODELSOURCE(event, g_model.swashR.collectiveSource, 0, MIXSRC_LAST_CH);
break;
case ITEM_HELI_COL_WEIGHT:
lcd_puts(INDENT_WIDTH, y, STR_WEIGHT);
lcd_outdezAtt(MODEL_HELI_2ND_COLUMN, y, g_model.swashR.collectiveWeight, LEFT|attr);
if (attr) CHECK_INCDEC_MODELVAR(event, g_model.swashR.collectiveWeight, -100, 100);
break;
} }
} }
} }
@@ -335,7 +335,7 @@ void menuModelExpoOne(uint8_t event)
break; break;
case EXPO_FIELD_NAME: case EXPO_FIELD_NAME:
editSingleName(EXPO_ONE_2ND_COLUMN-IF_9X(sizeof(ed->name)*FW), y, STR_EXPONAME, ed->name, sizeof(ed->name), event, attr); editSingleName(EXPO_ONE_2ND_COLUMN, y, STR_EXPONAME, ed->name, sizeof(ed->name), event, attr);
break; break;
case EXPO_FIELD_SOURCE: case EXPO_FIELD_SOURCE:
@@ -369,16 +369,16 @@ void menuModelExpoOne(uint8_t event)
#if defined(FLIGHT_MODES) #if defined(FLIGHT_MODES)
case EXPO_FIELD_FLIGHT_MODES: case EXPO_FIELD_FLIGHT_MODES:
ed->flightModes = editFlightModes(EXPO_ONE_2ND_COLUMN-IF_9X(EXPO_ONE_FM_WIDTH), y, event, ed->flightModes, attr); ed->flightModes = editFlightModes(EXPO_ONE_2ND_COLUMN, y, event, ed->flightModes, attr);
break; break;
#endif #endif
case EXPO_FIELD_SWITCH: case EXPO_FIELD_SWITCH:
ed->swtch = switchMenuItem(EXPO_ONE_2ND_COLUMN-IF_9X(3*FW), y, ed->swtch, attr, event); ed->swtch = switchMenuItem(EXPO_ONE_2ND_COLUMN, y, ed->swtch, attr, event);
break; break;
case EXPO_FIELD_SIDE: case EXPO_FIELD_SIDE:
ed->mode = 4 - selectMenuItem(EXPO_ONE_2ND_COLUMN-IF_9X(3*FW), y, STR_SIDE, STR_VSIDE, 4-ed->mode, 1, 3, attr, event); ed->mode = 4 - selectMenuItem(EXPO_ONE_2ND_COLUMN, y, STR_SIDE, STR_VSIDE, 4-ed->mode, 1, 3, attr, event);
break; break;
case EXPO_FIELD_TRIM: case EXPO_FIELD_TRIM:
+2 -2
View File
@@ -43,13 +43,13 @@ enum menuModelSetupItems {
ITEM_MODEL_BITMAP, ITEM_MODEL_BITMAP,
ITEM_MODEL_TIMER1, ITEM_MODEL_TIMER1,
ITEM_MODEL_TIMER1_NAME, ITEM_MODEL_TIMER1_NAME,
CASE_PERSISTENT_TIMERS(ITEM_MODEL_TIMER1_PERSISTENT) ITEM_MODEL_TIMER1_PERSISTENT,
ITEM_MODEL_TIMER1_MINUTE_BEEP, ITEM_MODEL_TIMER1_MINUTE_BEEP,
ITEM_MODEL_TIMER1_COUNTDOWN_BEEP, ITEM_MODEL_TIMER1_COUNTDOWN_BEEP,
#if TIMERS > 1 #if TIMERS > 1
ITEM_MODEL_TIMER2, ITEM_MODEL_TIMER2,
ITEM_MODEL_TIMER2_NAME, ITEM_MODEL_TIMER2_NAME,
CASE_PERSISTENT_TIMERS(ITEM_MODEL_TIMER2_PERSISTENT) ITEM_MODEL_TIMER2_PERSISTENT,
ITEM_MODEL_TIMER2_MINUTE_BEEP, ITEM_MODEL_TIMER2_MINUTE_BEEP,
ITEM_MODEL_TIMER2_COUNTDOWN_BEEP, ITEM_MODEL_TIMER2_COUNTDOWN_BEEP,
#endif #endif
+1 -1
View File
@@ -446,7 +446,7 @@ bool isMenuAvailable(int index)
} }
} }
#define GRAPHICAL_MENUS 1 #define GRAPHICAL_MENUS 0
#if GRAPHICAL_MENUS == 1 #if GRAPHICAL_MENUS == 1
#define DECLARE_MAIN_MENU() static int currentMenuIndex = -1 #define DECLARE_MAIN_MENU() static int currentMenuIndex = -1
+77 -81
View File
@@ -37,7 +37,7 @@
#include "opentx.h" #include "opentx.h"
#include "timers.h" #include "timers.h"
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
int8_t virtualInputsTrims[NUM_INPUTS]; int8_t virtualInputsTrims[NUM_INPUTS];
#else #else
int16_t rawAnas[NUM_INPUTS] = {0}; int16_t rawAnas[NUM_INPUTS] = {0};
@@ -63,20 +63,11 @@ int16_t ex_chans[NUM_CHNOUT] = {0}; // Outputs (before LIMITS) of the last perMa
#if defined(HELI) #if defined(HELI)
int16_t cyc_anas[3] = {0}; int16_t cyc_anas[3] = {0};
#if defined(PCBTARANIS)
int16_t heliAnas[4] = {0};
int8_t heliTrims[4] = {0};
#endif
#endif #endif
void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS) void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
{ {
#if defined(PCBTARANIS) #if !defined(VIRTUALINPUTS)
#if defined(HELI)
int16_t heliAnasCopy[4];
memcpy(heliAnasCopy, heliAnas, sizeof(heliAnasCopy));
#endif
#else
int16_t anas2[NUM_INPUTS]; // values before expo, to ensure same expo base when multiple expo lines are used int16_t anas2[NUM_INPUTS]; // values before expo, to ensure same expo base when multiple expo lines are used
memcpy(anas2, anas, sizeof(anas2)); memcpy(anas2, anas, sizeof(anas2));
#endif #endif
@@ -94,16 +85,11 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
if (ed->flightModes & (1<<mixerCurrentFlightMode)) if (ed->flightModes & (1<<mixerCurrentFlightMode))
continue; continue;
if (getSwitch(ed->swtch)) { if (getSwitch(ed->swtch)) {
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
int v; int v;
if (ed->srcRaw == ovwrIdx) if (ed->srcRaw == ovwrIdx) {
v = ovwrValue; v = ovwrValue;
#if defined(HELI) }
else if (ed->srcRaw == MIXSRC_Ele)
v = heliAnasCopy[ELE_STICK];
else if (ed->srcRaw == MIXSRC_Ail)
v = heliAnasCopy[AIL_STICK];
#endif
else { else {
v = getValue(ed->srcRaw); v = getValue(ed->srcRaw);
if (ed->srcRaw >= MIXSRC_FIRST_TELEM && ed->scale > 0) { if (ed->srcRaw >= MIXSRC_FIRST_TELEM && ed->scale > 0) {
@@ -121,7 +107,7 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
cur_chn = ed->chn; cur_chn = ed->chn;
//========== CURVE================= //========== CURVE=================
#if defined(PCBTARANIS) #if defined(XCURVES)
if (ed->curve.value) { if (ed->curve.value) {
v = applyCurve(v, ed->curve); v = applyCurve(v, ed->curve);
} }
@@ -140,7 +126,7 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
weight = calc100to256(weight); weight = calc100to256(weight);
v = ((int32_t)v * weight) >> 8; v = ((int32_t)v * weight) >> 8;
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
//========== OFFSET =============== //========== OFFSET ===============
int16_t offset = GET_GVAR(ed->offset, -100, 100, mixerCurrentFlightMode); int16_t offset = GET_GVAR(ed->offset, -100, 100, mixerCurrentFlightMode);
if (offset) v += calc100toRESX(offset); if (offset) v += calc100toRESX(offset);
@@ -152,17 +138,6 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
virtualInputsTrims[cur_chn] = ed->srcRaw - MIXSRC_Rud; virtualInputsTrims[cur_chn] = ed->srcRaw - MIXSRC_Rud;
else else
virtualInputsTrims[cur_chn] = -1; virtualInputsTrims[cur_chn] = -1;
#if defined(HELI)
if (ed->srcRaw == MIXSRC_Ele) {
heliAnas[ELE_STICK] = v;
heliTrims[ELE_STICK] = virtualInputsTrims[cur_chn];
}
else if (ed->srcRaw == MIXSRC_Ail) {
heliAnas[AIL_STICK] = v;
heliTrims[AIL_STICK] = virtualInputsTrims[cur_chn];
}
#endif
#endif #endif
anas[cur_chn] = v; anas[cur_chn] = v;
@@ -268,13 +243,13 @@ getvalue_t getValue(mixsrc_t i)
{ {
if (i==MIXSRC_NONE) return 0; if (i==MIXSRC_NONE) return 0;
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
else if (i <= MIXSRC_LAST_INPUT) { else if (i <= MIXSRC_LAST_INPUT) {
return anas[i-MIXSRC_FIRST_INPUT]; return anas[i-MIXSRC_FIRST_INPUT];
} }
#endif #endif
#if defined(PCBTARANIS) #if defined(LUAINPUTS)
else if (i<MIXSRC_LAST_LUA) { else if (i<MIXSRC_LAST_LUA) {
#if defined(LUA_MODEL_SCRIPTS) #if defined(LUA_MODEL_SCRIPTS)
div_t qr = div(i-MIXSRC_FIRST_LUA, MAX_SCRIPT_OUTPUTS); div_t qr = div(i-MIXSRC_FIRST_LUA, MAX_SCRIPT_OUTPUTS);
@@ -426,7 +401,13 @@ void evalInputs(uint8_t mode)
#if defined(HELI) #if defined(HELI)
uint16_t d = 0; uint16_t d = 0;
if (g_model.swashR.value) { if (g_model.swashR.value) {
#if defined(VIRTUALINPUTS)
int ele = (int16_t)anaIn(ELE_STICK);
int ail = (int16_t)anaIn(AIL_STICK);
uint32_t v = (ele*ele) + (ail*ail);
#else
uint32_t v = (int32_t(calibratedStick[ELE_STICK])*calibratedStick[ELE_STICK] + int32_t(calibratedStick[AIL_STICK])*calibratedStick[AIL_STICK]); uint32_t v = (int32_t(calibratedStick[ELE_STICK])*calibratedStick[ELE_STICK] + int32_t(calibratedStick[AIL_STICK])*calibratedStick[AIL_STICK]);
#endif
uint32_t q = calc100toRESX(g_model.swashR.value); uint32_t q = calc100toRESX(g_model.swashR.value);
q *= q; q *= q;
if (v > q) { if (v > q) {
@@ -512,9 +493,9 @@ void evalInputs(uint8_t mode)
} }
if (ch < NUM_STICKS) { //only do this for sticks if (ch < NUM_STICKS) { //only do this for sticks
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
if (mode & e_perout_mode_nosticks) { if (mode & e_perout_mode_nosticks) {
v = calibratedStick[ch] = 0; v = 0;
} }
#endif #endif
@@ -536,9 +517,6 @@ void evalInputs(uint8_t mode)
v = vStud; v = vStud;
break; break;
} }
#if defined(PCBTARANIS)
calibratedStick[ch] = v;
#endif
} }
} }
@@ -546,12 +524,11 @@ void evalInputs(uint8_t mode)
if (d && (ch==ELE_STICK || ch==AIL_STICK)) { if (d && (ch==ELE_STICK || ch==AIL_STICK)) {
v = (int32_t(v) * calc100toRESX(g_model.swashR.value)) / int32_t(d); v = (int32_t(v) * calc100toRESX(g_model.swashR.value)) / int32_t(d);
} }
#if defined(PCBTARANIS)
heliAnas[ch] = v;
#endif
#endif #endif
#if !defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
calibratedStick[ch] = v;
#else
rawAnas[ch] = v; rawAnas[ch] = v;
anas[ch] = v; // set values for mixer anas[ch] = v; // set values for mixer
#endif #endif
@@ -567,18 +544,38 @@ void evalInputs(uint8_t mode)
if (mode == e_perout_mode_normal) { if (mode == e_perout_mode_normal) {
#if !defined(CPUARM) #if !defined(CPUARM)
anaCenter &= g_model.beepANACenter; anaCenter &= g_model.beepANACenter;
if(((bpanaCenter ^ anaCenter) & anaCenter)) AUDIO_POT_MIDDLE(); if (((bpanaCenter ^ anaCenter) & anaCenter)) AUDIO_POT_MIDDLE();
#endif #endif
bpanaCenter = anaCenter; bpanaCenter = anaCenter;
} }
} }
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
#define HELI_ANAS_ARRAY(x) heliAnas[x] int getStickTrimValue(int stick)
#define HELI_TRIMS_ARRAY(x) ((heliTrims[x]>=0) ? trims[heliTrims[x]] : 0) {
#else int trim = trims[stick];
#define HELI_ANAS_ARRAY(x) anas[x] if (stick == THR_STICK) {
#define HELI_TRIMS_ARRAY(x) trims[x] if (g_model.thrTrim) {
int trimMin = g_model.extendedTrims ? 2*TRIM_EXTENDED_MIN : 2*TRIM_MIN;
int v = calibratedStick[THR_STICK];
trim = (((g_model.throttleReversed)?(trim+trimMin):(trim-v)) * (RESX-v)) >> (RESX_SHIFT+1);
}
if (g_model.throttleReversed) {
trim = -trim;
}
}
return trim;
}
int getSourceTrimValue(int source)
{
if (source >= MIXSRC_Rud && source <= MIXSRC_Ail)
return getStickTrimValue(source - MIXSRC_Rud);
else if (source >= MIXSRC_FIRST_INPUT && source <= MIXSRC_LAST_INPUT)
return getStickTrimValue(virtualInputsTrims[source - MIXSRC_FIRST_INPUT]);
else
return 0;
}
#endif #endif
uint8_t mixerCurrentFlightMode; uint8_t mixerCurrentFlightMode;
@@ -593,15 +590,22 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
#endif #endif
#if defined(HELI) #if defined(HELI)
#if defined(VIRTUALINPUTS)
int heliEleValue = getValue(g_model.swashR.elevatorSource);
int heliAilValue = getValue(g_model.swashR.aileronSource);
#else
int16_t heliEleValue = anas[ELE_STICK];
int16_t heliAilValue = anas[AIL_STICK];
#endif
if (g_model.swashR.value) { if (g_model.swashR.value) {
uint32_t v = ((int32_t)HELI_ANAS_ARRAY(ELE_STICK)*HELI_ANAS_ARRAY(ELE_STICK) + (int32_t)HELI_ANAS_ARRAY(AIL_STICK)*HELI_ANAS_ARRAY(AIL_STICK)); uint32_t v = ((int32_t)heliEleValue*heliEleValue + (int32_t)heliAilValue*heliAilValue);
uint32_t q = calc100toRESX(g_model.swashR.value); uint32_t q = calc100toRESX(g_model.swashR.value);
q *= q; q *= q;
if (v>q) { if (v>q) {
uint16_t d = isqrt32(v); uint16_t d = isqrt32(v);
int16_t tmp = calc100toRESX(g_model.swashR.value); int16_t tmp = calc100toRESX(g_model.swashR.value);
HELI_ANAS_ARRAY(ELE_STICK) = (int32_t) HELI_ANAS_ARRAY(ELE_STICK)*tmp/d; heliEleValue = (int32_t) heliEleValue*tmp/d;
HELI_ANAS_ARRAY(AIL_STICK) = (int32_t) HELI_ANAS_ARRAY(AIL_STICK)*tmp/d; heliAilValue = (int32_t) heliAilValue*tmp/d;
} }
} }
@@ -609,15 +613,26 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
#define REZ_SWASH_Y(x) ((x)) // 1024 => 1024 #define REZ_SWASH_Y(x) ((x)) // 1024 => 1024
if (g_model.swashR.type) { if (g_model.swashR.type) {
getvalue_t vp = HELI_ANAS_ARRAY(ELE_STICK) + HELI_TRIMS_ARRAY(ELE_STICK); #if defined(VIRTUALINPUTS)
getvalue_t vr = HELI_ANAS_ARRAY(AIL_STICK) + HELI_TRIMS_ARRAY(AIL_STICK); getvalue_t vp = heliEleValue + getSourceTrimValue(g_model.swashR.elevatorSource);
getvalue_t vr = heliAilValue + getSourceTrimValue(g_model.swashR.aileronSource);
#else
getvalue_t vp = heliEleValue + trims[ELE_STICK];
getvalue_t vr = heliAilValue + trims[AIL_STICK];
#endif
getvalue_t vc = 0; getvalue_t vc = 0;
if (g_model.swashR.collectiveSource) if (g_model.swashR.collectiveSource)
vc = getValue(g_model.swashR.collectiveSource); vc = getValue(g_model.swashR.collectiveSource);
#if defined(VIRTUALINPUTS)
vp = (vp * g_model.swashR.elevatorWeight) / 100;
vr = (vr * g_model.swashR.aileronWeight) / 100;
vc = (vc * g_model.swashR.collectiveWeight) / 100;
#else
if (g_model.swashR.invertELE) vp = -vp; if (g_model.swashR.invertELE) vp = -vp;
if (g_model.swashR.invertAIL) vr = -vr; if (g_model.swashR.invertAIL) vr = -vr;
if (g_model.swashR.invertCOL) vc = -vc; if (g_model.swashR.invertCOL) vc = -vc;
#endif
switch (g_model.swashR.type) { switch (g_model.swashR.type) {
case SWASH_TYPE_120: case SWASH_TYPE_120:
@@ -696,7 +711,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
MIXER_LINE_DISABLE(); MIXER_LINE_DISABLE();
} }
#if defined(PCBTARANIS) && defined(LUA_MODEL_SCRIPTS) #if defined(LUA_MODEL_SCRIPTS)
// disable mixer if Lua script is used as source and script was killed // disable mixer if Lua script is used as source and script was killed
if (mixEnabled && md->srcRaw >= MIXSRC_FIRST_LUA && md->srcRaw <= MIXSRC_LAST_LUA) { if (mixEnabled && md->srcRaw >= MIXSRC_FIRST_LUA && md->srcRaw <= MIXSRC_LAST_LUA) {
div_t qr = div(md->srcRaw-MIXSRC_FIRST_LUA, MAX_SCRIPT_OUTPUTS); div_t qr = div(md->srcRaw-MIXSRC_FIRST_LUA, MAX_SCRIPT_OUTPUTS);
@@ -709,7 +724,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
//========== VALUE =============== //========== VALUE ===============
getvalue_t v = 0; getvalue_t v = 0;
if (mode > e_perout_mode_inactive_flight_mode) { if (mode > e_perout_mode_inactive_flight_mode) {
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
if (!mixEnabled) { if (!mixEnabled) {
continue; continue;
} }
@@ -726,7 +741,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
#endif #endif
} }
else { else {
#if !defined(PCBTARANIS) #if !defined(VIRTUALINPUTS)
if (stickIndex < NUM_STICKS) { if (stickIndex < NUM_STICKS) {
v = md->noExpo ? rawAnas[stickIndex] : anas[stickIndex]; v = md->noExpo ? rawAnas[stickIndex] : anas[stickIndex];
} }
@@ -795,28 +810,9 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
//========== TRIMS ================ //========== TRIMS ================
if (!(mode & e_perout_mode_notrims)) { if (!(mode & e_perout_mode_notrims)) {
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
if (md->carryTrim == 0) { if (md->carryTrim == 0) {
int8_t mix_trim; v += getSourceTrimValue(md->srcRaw);
if (stickIndex < NUM_STICKS)
mix_trim = stickIndex;
else if (md->srcRaw <= MIXSRC_LAST_INPUT)
mix_trim = virtualInputsTrims[md->srcRaw-1];
else
mix_trim = -1;
if (mix_trim >= 0) {
int32_t trim = trims[mix_trim];
if (mix_trim == THR_STICK) {
if (g_model.thrTrim) {
int16_t trimMin = g_model.extendedTrims ? 2*TRIM_EXTENDED_MIN : 2*TRIM_MIN;
trim = (((g_model.throttleReversed)?(trim+trimMin):(trim-trimMin)) * (RESX-v)) >> (RESX_SHIFT+1);
}
if (g_model.throttleReversed) {
trim = -trim;
}
}
v += trim;
}
} }
#else #else
int8_t mix_trim = md->carryTrim; int8_t mix_trim = md->carryTrim;
@@ -883,7 +879,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
} }
//========== CURVES =============== //========== CURVES ===============
#if defined(PCBTARANIS) #if defined(XCURVES)
if (apply_offset_and_curve && md->curve.value) { if (apply_offset_and_curve && md->curve.value) {
v = applyCurve(v, md->curve); v = applyCurve(v, md->curve);
} }
@@ -903,7 +899,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
} }
//========== DIFFERENTIAL ========= //========== DIFFERENTIAL =========
#if !defined(PCBTARANIS) #if !defined(XCURVES)
if (md->curveMode == MODE_DIFFERENTIAL) { if (md->curveMode == MODE_DIFFERENTIAL) {
// @@@2 also recalculate curveParam to a 256 basis which ease the calculation later a lot // @@@2 also recalculate curveParam to a 256 basis which ease the calculation later a lot
int16_t curveParam = calc100to256(GET_GVAR(md->curveParam, -100, 100, mixerCurrentFlightMode)); int16_t curveParam = calc100to256(GET_GVAR(md->curveParam, -100, 100, mixerCurrentFlightMode));
+15 -2
View File
@@ -1502,7 +1502,19 @@ enum SwashType {
SWASH_TYPE_MAX = SWASH_TYPE_90 SWASH_TYPE_MAX = SWASH_TYPE_90
}; };
PACK(typedef struct t_SwashRingData { // Swash Ring data #if defined(VIRTUALINPUTS)
PACK(typedef struct {
uint8_t type;
uint8_t value;
uint8_t collectiveSource;
uint8_t aileronSource;
uint8_t elevatorSource;
int8_t collectiveWeight;
int8_t aileronWeight;
int8_t elevatorWeight;
}) SwashRingData;
#else
PACK(typedef struct {
uint8_t invertELE:1; uint8_t invertELE:1;
uint8_t invertAIL:1; uint8_t invertAIL:1;
uint8_t invertCOL:1; uint8_t invertCOL:1;
@@ -1510,6 +1522,7 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
uint8_t collectiveSource; uint8_t collectiveSource;
uint8_t value; uint8_t value;
}) SwashRingData; }) SwashRingData;
#endif
#define TRIM_EXTENDED_MAX 500 #define TRIM_EXTENDED_MAX 500
#define TRIM_EXTENDED_MIN (-TRIM_EXTENDED_MAX) #define TRIM_EXTENDED_MIN (-TRIM_EXTENDED_MAX)
@@ -1673,7 +1686,7 @@ enum SwitchSources {
SWSRC_LAST_SWITCH = SWSRC_TRN, SWSRC_LAST_SWITCH = SWSRC_TRN,
#endif #endif
#if defined(PCBTARANIS) #if NUM_XPOTS > 0
SWSRC_FIRST_MULTIPOS_SWITCH, SWSRC_FIRST_MULTIPOS_SWITCH,
SWSRC_LAST_MULTIPOS_SWITCH = SWSRC_FIRST_MULTIPOS_SWITCH + (NUM_XPOTS*XPOTS_MULTIPOS_COUNT) - 1, SWSRC_LAST_MULTIPOS_SWITCH = SWSRC_FIRST_MULTIPOS_SWITCH + (NUM_XPOTS*XPOTS_MULTIPOS_COUNT) - 1,
#endif #endif
+3 -1
View File
@@ -155,7 +155,9 @@ const pm_char STR_DEFAULT[] PROGMEM = TR_DEFAULT;
const pm_char STR_CHECKTRIMS[] PROGMEM = TR_CHECKTRIMS; const pm_char STR_CHECKTRIMS[] PROGMEM = TR_CHECKTRIMS;
#ifdef HELI #ifdef HELI
const pm_char STR_SWASHTYPE[] PROGMEM = TR_SWASHTYPE; const pm_char STR_SWASHTYPE[] PROGMEM = TR_SWASHTYPE;
const pm_char STR_COLLECTIVE[] PROGMEM = TR_COLLECTIVE; const pm_char STR_COLLECTIVE_SOURCE[] PROGMEM = TR_COLLECTIVE_SOURCE;
const pm_char STR_AILERON_SOURCE[] PROGMEM = TR_AILERON_SOURCE;
const pm_char STR_ELEVATOR_SOURCE[] PROGMEM = TR_ELEVATOR_SOURCE;
const pm_char STR_SWASHRING[] PROGMEM = TR_SWASHRING; const pm_char STR_SWASHRING[] PROGMEM = TR_SWASHRING;
const pm_char STR_ELEDIRECTION[] PROGMEM = TR_ELEDIRECTION; const pm_char STR_ELEDIRECTION[] PROGMEM = TR_ELEDIRECTION;
const pm_char STR_AILDIRECTION[] PROGMEM = TR_AILDIRECTION; const pm_char STR_AILDIRECTION[] PROGMEM = TR_AILDIRECTION;
+3 -1
View File
@@ -333,7 +333,9 @@ extern const pm_char STR_FADEOUT[];
extern const pm_char STR_DEFAULT[]; extern const pm_char STR_DEFAULT[];
extern const pm_char STR_CHECKTRIMS[]; extern const pm_char STR_CHECKTRIMS[];
extern const pm_char STR_SWASHTYPE[]; extern const pm_char STR_SWASHTYPE[];
extern const pm_char STR_COLLECTIVE[]; extern const pm_char STR_COLLECTIVE_SOURCE[];
extern const pm_char STR_AILERON_SOURCE[];
extern const pm_char STR_ELEVATOR_SOURCE[];
extern const pm_char STR_SWASHRING[]; extern const pm_char STR_SWASHRING[];
extern const pm_char STR_ELEDIRECTION[]; extern const pm_char STR_ELEDIRECTION[];
extern const pm_char STR_AILDIRECTION[]; extern const pm_char STR_AILDIRECTION[];
+3 -1
View File
@@ -547,7 +547,9 @@
#define TR_CHECKTRIMS "\011Kont.\010Trimy" #define TR_CHECKTRIMS "\011Kont.\010Trimy"
#define OFS_CHECKTRIMS (9*FW) #define OFS_CHECKTRIMS (9*FW)
#define TR_SWASHTYPE "Typ cykliky" #define TR_SWASHTYPE "Typ cykliky"
#define TR_COLLECTIVE "Kolektiv" #define TR_COLLECTIVE_SOURCE "Kolektiv"
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING "Cyklika" #define TR_SWASHRING "Cyklika"
#define TR_ELEDIRECTION "Směr:Výškovka" #define TR_ELEDIRECTION "Směr:Výškovka"
#define TR_AILDIRECTION "\012Křidélka" #define TR_AILDIRECTION "\012Křidélka"
+3 -1
View File
@@ -551,7 +551,9 @@
#define TR_CHECKTRIMS CENTER"\006Trims\012Prüfen" #define TR_CHECKTRIMS CENTER"\006Trims\012Prüfen"
#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) #define OFS_CHECKTRIMS CENTER_OFS+(9*FW)
#define TR_SWASHTYPE TR("Typ Taumelsch","Typ Taumelscheibe") #define TR_SWASHTYPE TR("Typ Taumelsch","Typ Taumelscheibe")
#define TR_COLLECTIVE TR("Kollekt. Pitch","Kollekt. Pitch Kanal") #define TR_COLLECTIVE_SOURCE TR("Kollekt. Pitch","Kollekt. Pitch Kanal")
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING TR("Ring Begrenz","Ring Taumelscheibe") #define TR_SWASHRING TR("Ring Begrenz","Ring Taumelscheibe")
#define TR_ELEDIRECTION TR("Nick Richtung","Nick Servo Richtung") #define TR_ELEDIRECTION TR("Nick Richtung","Nick Servo Richtung")
#define TR_AILDIRECTION TR("Roll Richtung","Roll Servo Richtung") #define TR_AILDIRECTION TR("Roll Richtung","Roll Servo Richtung")
+16 -12
View File
@@ -174,7 +174,7 @@
#define LEN_VMIXTRIMS "\003" #define LEN_VMIXTRIMS "\003"
#define TR_VMIXTRIMS "OFF""ON\0""Rud""Ele""Thr""Ail" #define TR_VMIXTRIMS "OFF""ON\0""Rud""Ele""Thr""Ail"
#if defined(PCBTARANIS) #if LCD_W >= 212
#define TR_CSWTIMER "Timer" #define TR_CSWTIMER "Timer"
#define TR_CSWSTICKY "Stcky" #define TR_CSWSTICKY "Stcky"
#define TR_CSWRANGE "Range" #define TR_CSWRANGE "Range"
@@ -298,7 +298,7 @@
#define TR_FSW_RESET_ROTENC #define TR_FSW_RESET_ROTENC
#endif #endif
#if defined(PCBTARANIS) #if LCD_W >= 212
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 " #define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "
#elif defined(CPUARM) #elif defined(CPUARM)
#define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3" #define TR_FSW_RESET_TIMERS "Tmr1""Tmr2""Tmr3"
@@ -331,7 +331,7 @@
#define TR_ASPD_MAX TR("ASp+", "ASpd+") #define TR_ASPD_MAX TR("ASp+", "ASpd+")
#if defined(PCBTARANIS) #if LCD_W >= 212
#define TR_TELEM_RSSI_RX "RSSI\0" #define TR_TELEM_RSSI_RX "RSSI\0"
#else #else
#define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ") #define TR_TELEM_RSSI_RX TR("Rx\0 ", "Rx\0 ")
@@ -472,9 +472,9 @@
#if defined(PCBTARANIS) #if defined(PCBTARANIS)
#if defined(REV9E) #if defined(REV9E)
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36""S41""S42""S43""S44""S45""S46" #define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36""S41""S42""S43""S44""S45""S46"
#else #else
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36" #define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
#endif #endif
#define TR_VSWITCHES "---" TR_PHYS_SWITCHES TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW "ON\0""One" #define TR_VSWITCHES "---" TR_PHYS_SWITCHES TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW "ON\0""One"
#else #else
@@ -519,10 +519,12 @@
#define INDENT "\007" #define INDENT "\007"
#define LEN_INDENT 1 #define LEN_INDENT 1
#define INDENT_WIDTH 12 #define INDENT_WIDTH 12
#define BREAKSPACE "\036"
#else #else
#define INDENT "\001" #define INDENT "\001"
#define LEN_INDENT 1 #define LEN_INDENT 1
#define INDENT_WIDTH (FW/2) #define INDENT_WIDTH (FW/2)
#define BREAKSPACE " "
#endif #endif
#if defined(PCBTARANIS) #if defined(PCBTARANIS)
@@ -542,7 +544,7 @@
#define TR_MENUWHENDONE CENTER "\006" TR_ENTER " WHEN DONE" #define TR_MENUWHENDONE CENTER "\006" TR_ENTER " WHEN DONE"
#define TR_FREE "free" #define TR_FREE "free"
#define TR_DELETEMODEL "DELETE MODEL" #define TR_DELETEMODEL "DELETE" BREAKSPACE "MODEL"
#define TR_COPYINGMODEL "Copying model..." #define TR_COPYINGMODEL "Copying model..."
#define TR_MOVINGMODEL "Moving model..." #define TR_MOVINGMODEL "Moving model..."
#define TR_LOADINGMODEL "Loading model..." #define TR_LOADINGMODEL "Loading model..."
@@ -551,7 +553,7 @@
#define TR_PHASENAME "Mode Name" #define TR_PHASENAME "Mode Name"
#define TR_MIXNAME "Mix Name" #define TR_MIXNAME "Mix Name"
#define TR_INPUTNAME "Input Name" #define TR_INPUTNAME "Input Name"
#if defined(PCBTARANIS) #if defined(VIRTUALINPUTS)
#define TR_EXPONAME "Line Name" #define TR_EXPONAME "Line Name"
#else #else
#define TR_EXPONAME "Expo Name" #define TR_EXPONAME "Expo Name"
@@ -579,7 +581,9 @@
#define TR_CHECKTRIMS CENTER "\006Check\012Trims" #define TR_CHECKTRIMS CENTER "\006Check\012Trims"
#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) #define OFS_CHECKTRIMS CENTER_OFS+(9*FW)
#define TR_SWASHTYPE "Swash Type" #define TR_SWASHTYPE "Swash Type"
#define TR_COLLECTIVE TR("Collective","Collective source") #define TR_COLLECTIVE_SOURCE TR("Collective", "Collective source")
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING "Swash Ring" #define TR_SWASHRING "Swash Ring"
#define TR_ELEDIRECTION TR("ELE Direction","Long. cyc. direction") #define TR_ELEDIRECTION TR("ELE Direction","Long. cyc. direction")
#define TR_AILDIRECTION TR("AIL Direction","Lateral cyc. direction") #define TR_AILDIRECTION TR("AIL Direction","Lateral cyc. direction")
@@ -792,10 +796,10 @@
#define TR_DELAY "Delay" #define TR_DELAY "Delay"
#define TR_SD_CARD "SD CARD" #define TR_SD_CARD "SD CARD"
#define TR_SDHC_CARD "SD-HC CARD" #define TR_SDHC_CARD "SD-HC CARD"
#define TR_NO_SOUNDS_ON_SD "No Sounds on SD" #define TR_NO_SOUNDS_ON_SD "No Sounds" BREAKSPACE "on SD"
#define TR_NO_MODELS_ON_SD "No Models on SD" #define TR_NO_MODELS_ON_SD "No Models" BREAKSPACE "on SD"
#define TR_NO_BITMAPS_ON_SD "No Bitmaps on SD" #define TR_NO_BITMAPS_ON_SD "No Bitmaps" BREAKSPACE "on SD"
#define TR_NO_SCRIPTS_ON_SD "No Scripts on SD" #define TR_NO_SCRIPTS_ON_SD "No Scripts" BREAKSPACE "on SD"
#define TR_PLAY_FILE "Play" #define TR_PLAY_FILE "Play"
#define TR_DELETE_FILE "Delete" #define TR_DELETE_FILE "Delete"
#define TR_COPY_FILE "Copy" #define TR_COPY_FILE "Copy"
+3 -1
View File
@@ -544,7 +544,9 @@
#define TR_CHECKTRIMS CENTER "\006Check\012Trims" #define TR_CHECKTRIMS CENTER "\006Check\012Trims"
#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) #define OFS_CHECKTRIMS CENTER_OFS+(9*FW)
#define TR_SWASHTYPE "Tipo ciclico" #define TR_SWASHTYPE "Tipo ciclico"
#define TR_COLLECTIVE TR("Colectivo","Fuente Colectivo") #define TR_COLLECTIVE_SOURCE TR("Colectivo", "Fuente Colectivo")
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING "Ciclico" #define TR_SWASHRING "Ciclico"
#define TR_ELEDIRECTION TR("ELE Direccion","Largo cyc. direccion") #define TR_ELEDIRECTION TR("ELE Direccion","Largo cyc. direccion")
#define TR_AILDIRECTION TR("AIL Direccion","Lateral cyc. direccion") #define TR_AILDIRECTION TR("AIL Direccion","Lateral cyc. direccion")
+4 -2
View File
@@ -1,4 +1,4 @@
/* /*
* Authors (alphabetical order) * Authors (alphabetical order)
* - Bertrand Songis <bsongis@gmail.com> * - Bertrand Songis <bsongis@gmail.com>
* - Bernet Andre <bernet.andre@gmail.com> * - Bernet Andre <bernet.andre@gmail.com>
@@ -544,7 +544,9 @@
#define TR_CHECKTRIMS CENTER "\006Check\012Trims" #define TR_CHECKTRIMS CENTER "\006Check\012Trims"
#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) #define OFS_CHECKTRIMS CENTER_OFS+(9*FW)
#define TR_SWASHTYPE "Swash Type" #define TR_SWASHTYPE "Swash Type"
#define TR_COLLECTIVE TR("Collective","Collective source") #define TR_COLLECTIVE_SOURCE TR("Collective","Collective source")
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING "Swash Ring" #define TR_SWASHRING "Swash Ring"
#define TR_ELEDIRECTION TR("ELE Direction","Long. cyc. direction") #define TR_ELEDIRECTION TR("ELE Direction","Long. cyc. direction")
#define TR_AILDIRECTION TR("AIL Direction","Lateral cyc. direction") #define TR_AILDIRECTION TR("AIL Direction","Lateral cyc. direction")
+4 -2
View File
@@ -1,4 +1,4 @@
/* /*
* Authors (alphabetical order) * Authors (alphabetical order)
* - Andre Bernet <bernet.andre@gmail.com> * - Andre Bernet <bernet.andre@gmail.com>
* - Bertrand Songis <bsongis@gmail.com> * - Bertrand Songis <bsongis@gmail.com>
@@ -544,7 +544,9 @@
#define TR_CHECKTRIMS "\006Vérif\012Trims" #define TR_CHECKTRIMS "\006Vérif\012Trims"
#define OFS_CHECKTRIMS (9*FW) #define OFS_CHECKTRIMS (9*FW)
#define TR_SWASHTYPE TR("Type de Plat.", "Type de plateau") #define TR_SWASHTYPE TR("Type de Plat.", "Type de plateau")
#define TR_COLLECTIVE TR("Collectif", "Voie du pas collectif") #define TR_COLLECTIVE_SOURCE TR("Collectif", "Voie du pas collectif")
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING TR("Limite Cycl.", "Limite du cyclique") #define TR_SWASHRING TR("Limite Cycl.", "Limite du cyclique")
#define TR_ELEDIRECTION TR("Inv. longitud.", "Inversion longitudinal") #define TR_ELEDIRECTION TR("Inv. longitud.", "Inversion longitudinal")
#define TR_AILDIRECTION TR("Inv. latéral", "Inversion latéral") #define TR_AILDIRECTION TR("Inv. latéral", "Inversion latéral")
+3 -1
View File
@@ -544,7 +544,9 @@
#define TR_CHECKTRIMS "\003Contr.\004Trim" #define TR_CHECKTRIMS "\003Contr.\004Trim"
#define OFS_CHECKTRIMS (9*FW) #define OFS_CHECKTRIMS (9*FW)
#define TR_SWASHTYPE "Tipo Ciclico" #define TR_SWASHTYPE "Tipo Ciclico"
#define TR_COLLECTIVE TR("Collettivo","Origine Collettivo") #define TR_COLLECTIVE_SOURCE TR("Collettivo","Origine Collettivo")
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING "Anello Ciclico" #define TR_SWASHRING "Anello Ciclico"
#define TR_ELEDIRECTION TR("Direzione ELE","Direzione Long. cyc.") #define TR_ELEDIRECTION TR("Direzione ELE","Direzione Long. cyc.")
#define TR_AILDIRECTION TR("Direzione AIL","Direzione Lateral cyc.") #define TR_AILDIRECTION TR("Direzione AIL","Direzione Lateral cyc.")
+3 -1
View File
@@ -542,7 +542,9 @@
#define TR_CHECKTRIMS CENTER "\006Spr \012Trymy" #define TR_CHECKTRIMS CENTER "\006Spr \012Trymy"
#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) #define OFS_CHECKTRIMS CENTER_OFS+(9*FW)
#define TR_SWASHTYPE "Typ tarczy" #define TR_SWASHTYPE "Typ tarczy"
#define TR_COLLECTIVE TR("Kolektyw ","Źródło Kolektywu ") #define TR_COLLECTIVE_SOURCE TR("Kolektyw", "Źródło Kolektywu")
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING "Tarcza " #define TR_SWASHRING "Tarcza "
#define TR_ELEDIRECTION TR("Ster Wysokośc","Dług. Kierunku cyklu") #define TR_ELEDIRECTION TR("Ster Wysokośc","Dług. Kierunku cyklu")
#define TR_AILDIRECTION TR("Kierunek Lotk","Lateral cyc. direction") #define TR_AILDIRECTION TR("Kierunek Lotk","Lateral cyc. direction")
+3 -1
View File
@@ -544,7 +544,9 @@
#define TR_CHECKTRIMS "\006Check\012Trims" #define TR_CHECKTRIMS "\006Check\012Trims"
#define OFS_CHECKTRIMS (9*FW) #define OFS_CHECKTRIMS (9*FW)
#define TR_SWASHTYPE "Ciclico Tipo" #define TR_SWASHTYPE "Ciclico Tipo"
#define TR_COLLECTIVE "Coletivo" #define TR_COLLECTIVE_SOURCE "Coletivo"
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING "Anel Coletivo" #define TR_SWASHRING "Anel Coletivo"
#define TR_ELEDIRECTION "PFD Sentido" #define TR_ELEDIRECTION "PFD Sentido"
#define TR_AILDIRECTION "AIL Sentido" #define TR_AILDIRECTION "AIL Sentido"
+3 -1
View File
@@ -544,7 +544,9 @@
#define TR_CHECKTRIMS CENTER "\006Kolla\012Trimmar" #define TR_CHECKTRIMS CENTER "\006Kolla\012Trimmar"
#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) #define OFS_CHECKTRIMS CENTER_OFS+(9*FW)
#define TR_SWASHTYPE "Swashtyp" #define TR_SWASHTYPE "Swashtyp"
#define TR_COLLECTIVE "Kollektiv" #define TR_COLLECTIVE_SOURCE "Kollektiv"
#define TR_AILERON_SOURCE "Aileron Source"
#define TR_ELEVATOR_SOURCE "Elevator Source"
#define TR_SWASHRING "Swashring" #define TR_SWASHRING "Swashring"
#define TR_ELEDIRECTION "HöJD Riktning" #define TR_ELEDIRECTION "HöJD Riktning"
#define TR_AILDIRECTION "SKEV Riktning" #define TR_AILDIRECTION "SKEV Riktning"