Commit b114e1bd authored by Anton Babushkin's avatar Anton Babushkin

RC switches names fixed in RC calibration

parent 8f6e8117
...@@ -71,7 +71,7 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) : ...@@ -71,7 +71,7 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
channelNames << "Yaw / Rudder"; channelNames << "Yaw / Rudder";
channelNames << "Throttle"; channelNames << "Throttle";
channelNames << "Main Mode Switch"; channelNames << "Main Mode Switch";
channelNames << "Assist Switch"; channelNames << "Posctl Switch";
channelNames << "Loiter Switch"; channelNames << "Loiter Switch";
channelNames << "Return Switch"; channelNames << "Return Switch";
channelNames << "Flaps"; channelNames << "Flaps";
...@@ -202,8 +202,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) : ...@@ -202,8 +202,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
connect(ui->yawSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setYawChan(int))); connect(ui->yawSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setYawChan(int)));
connect(ui->throttleSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setThrottleChan(int))); connect(ui->throttleSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setThrottleChan(int)));
connect(ui->modeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setModeChan(int))); connect(ui->modeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setModeChan(int)));
connect(ui->assistSwSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setAssistChan(int))); connect(ui->posctlSwSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setAssistChan(int)));
connect(ui->missionSwSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setMissionChan(int))); connect(ui->loiterSwSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setMissionChan(int)));
connect(ui->returnSwSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setReturnChan(int))); connect(ui->returnSwSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setReturnChan(int)));
connect(ui->flapsSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setFlapsChan(int))); connect(ui->flapsSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setFlapsChan(int)));
connect(ui->aux1SpinBox, SIGNAL(valueChanged(int)), this, SLOT(setAux1Chan(int))); connect(ui->aux1SpinBox, SIGNAL(valueChanged(int)), this, SLOT(setAux1Chan(int)));
...@@ -215,8 +215,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) : ...@@ -215,8 +215,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
connect(ui->invertCheckBox_3, SIGNAL(clicked(bool)), this, SLOT(setYawInverted(bool))); connect(ui->invertCheckBox_3, SIGNAL(clicked(bool)), this, SLOT(setYawInverted(bool)));
connect(ui->invertCheckBox_4, SIGNAL(clicked(bool)), this, SLOT(setThrottleInverted(bool))); connect(ui->invertCheckBox_4, SIGNAL(clicked(bool)), this, SLOT(setThrottleInverted(bool)));
connect(ui->invertCheckBox_5, SIGNAL(clicked(bool)), this, SLOT(setModeInverted(bool))); connect(ui->invertCheckBox_5, SIGNAL(clicked(bool)), this, SLOT(setModeInverted(bool)));
connect(ui->assistSwInvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setAssistInverted(bool))); connect(ui->posctlSwInvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setAssistInverted(bool)));
connect(ui->missionSwInvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setMissionInverted(bool))); connect(ui->loiterSwInvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setMissionInverted(bool)));
connect(ui->returnSwInvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setReturnInverted(bool))); connect(ui->returnSwInvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setReturnInverted(bool)));
connect(ui->flapsInvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setFlapsInverted(bool))); connect(ui->flapsInvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setFlapsInverted(bool)));
connect(ui->aux1InvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setAux1Inverted(bool))); connect(ui->aux1InvertCheckBox, SIGNAL(clicked(bool)), this, SLOT(setAux1Inverted(bool)));
...@@ -227,8 +227,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) : ...@@ -227,8 +227,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
connect(ui->yawButton, SIGNAL(clicked()), this, SLOT(identifyYawChannel())); connect(ui->yawButton, SIGNAL(clicked()), this, SLOT(identifyYawChannel()));
connect(ui->throttleButton, SIGNAL(clicked()), this, SLOT(identifyThrottleChannel())); connect(ui->throttleButton, SIGNAL(clicked()), this, SLOT(identifyThrottleChannel()));
connect(ui->modeButton, SIGNAL(clicked()), this, SLOT(identifyModeChannel())); connect(ui->modeButton, SIGNAL(clicked()), this, SLOT(identifyModeChannel()));
connect(ui->assistSwButton, SIGNAL(clicked()), this, SLOT(identifyAssistChannel())); connect(ui->posctlSwButton, SIGNAL(clicked()), this, SLOT(identifyAssistChannel()));
connect(ui->missionSwButton, SIGNAL(clicked()), this, SLOT(identifyMissionChannel())); connect(ui->loiterSwButton, SIGNAL(clicked()), this, SLOT(identifyMissionChannel()));
connect(ui->returnSwButton, SIGNAL(clicked()), this, SLOT(identifyReturnChannel())); connect(ui->returnSwButton, SIGNAL(clicked()), this, SLOT(identifyReturnChannel()));
connect(ui->flapsButton, SIGNAL(clicked()), this, SLOT(identifyFlapsChannel())); connect(ui->flapsButton, SIGNAL(clicked()), this, SLOT(identifyFlapsChannel()));
connect(ui->aux1Button, SIGNAL(clicked()), this, SLOT(identifyAux1Channel())); connect(ui->aux1Button, SIGNAL(clicked()), this, SLOT(identifyAux1Channel()));
...@@ -1409,10 +1409,10 @@ void QGCPX4VehicleConfig::remoteControlChannelRawChanged(int chan, float fval) ...@@ -1409,10 +1409,10 @@ void QGCPX4VehicleConfig::remoteControlChannelRawChanged(int chan, float fval)
ui->modeSpinBox->setValue(chan + 1); ui->modeSpinBox->setValue(chan + 1);
break; break;
case 5: case 5:
ui->assistSwSpinBox->setValue(chan + 1); ui->posctlSwSpinBox->setValue(chan + 1);
break; break;
case 6: case 6:
ui->missionSwSpinBox->setValue(chan + 1); ui->loiterSwSpinBox->setValue(chan + 1);
break; break;
case 7: case 7:
ui->returnSwSpinBox->setValue(chan + 1); ui->returnSwSpinBox->setValue(chan + 1);
...@@ -1565,10 +1565,10 @@ void QGCPX4VehicleConfig::updateAllInvertedCheckboxes() ...@@ -1565,10 +1565,10 @@ void QGCPX4VehicleConfig::updateAllInvertedCheckboxes()
//ui->radio5Widget->setName(tr("Mode Switch (#%1)").arg(rcMapping[4] + 1)); //ui->radio5Widget->setName(tr("Mode Switch (#%1)").arg(rcMapping[4] + 1));
break; break;
case 5: case 5:
ui->assistSwInvertCheckBox->setChecked(rcRev[rc_input_index]); ui->posctlSwInvertCheckBox->setChecked(rcRev[rc_input_index]);
break; break;
case 6: case 6:
ui->missionSwInvertCheckBox->setChecked(rcRev[rc_input_index]); ui->loiterSwInvertCheckBox->setChecked(rcRev[rc_input_index]);
break; break;
case 7: case 7:
ui->returnSwInvertCheckBox->setChecked(rcRev[rc_input_index]); ui->returnSwInvertCheckBox->setChecked(rcRev[rc_input_index]);
...@@ -1692,13 +1692,13 @@ void QGCPX4VehicleConfig::handleRcParameterChange(QString parameterName, QVarian ...@@ -1692,13 +1692,13 @@ void QGCPX4VehicleConfig::handleRcParameterChange(QString parameterName, QVarian
} }
else if (parameterName.startsWith("RC_MAP_POSCTL_SW")) { else if (parameterName.startsWith("RC_MAP_POSCTL_SW")) {
setChannelToFunctionMapping(5, intValue); setChannelToFunctionMapping(5, intValue);
ui->assistSwSpinBox->setValue(rcMapping[5]+1); ui->posctlSwSpinBox->setValue(rcMapping[5]+1);
ui->assistSwSpinBox->setEnabled(true); ui->posctlSwSpinBox->setEnabled(true);
} }
else if (parameterName.startsWith("RC_MAP_LOITER_SW")) { else if (parameterName.startsWith("RC_MAP_LOITER_SW")) {
setChannelToFunctionMapping(6, intValue); setChannelToFunctionMapping(6, intValue);
ui->missionSwSpinBox->setValue(rcMapping[6]+1); ui->loiterSwSpinBox->setValue(rcMapping[6]+1);
ui->missionSwSpinBox->setEnabled(true); ui->loiterSwSpinBox->setEnabled(true);
} }
else if (parameterName.startsWith("RC_MAP_RETURN_SW")) { else if (parameterName.startsWith("RC_MAP_RETURN_SW")) {
setChannelToFunctionMapping(7, intValue); setChannelToFunctionMapping(7, intValue);
...@@ -1941,17 +1941,17 @@ void QGCPX4VehicleConfig::updateRcChanLabels() ...@@ -1941,17 +1941,17 @@ void QGCPX4VehicleConfig::updateRcChanLabels()
} }
if (rcValue[rcMapping[5]] != UINT16_MAX) { if (rcValue[rcMapping[5]] != UINT16_MAX) {
ui->assistSwChanLabel->setText(labelForRcValue(rcAssist)); ui->posctlSwChanLabel->setText(labelForRcValue(rcAssist));
} }
else { else {
ui->assistSwChanLabel->setText(blankLabel); ui->posctlSwChanLabel->setText(blankLabel);
} }
if (rcValue[rcMapping[6]] != UINT16_MAX) { if (rcValue[rcMapping[6]] != UINT16_MAX) {
ui->missionSwChanLabel->setText(labelForRcValue(rcLoiter)); ui->loiterSwChanLabel->setText(labelForRcValue(rcLoiter));
} }
else { else {
ui->missionSwChanLabel->setText(blankLabel); ui->loiterSwChanLabel->setText(blankLabel);
} }
if (rcValue[rcMapping[7]] != UINT16_MAX) { if (rcValue[rcMapping[7]] != UINT16_MAX) {
......
...@@ -20,16 +20,7 @@ ...@@ -20,16 +20,7 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="1" column="1"> <item row="1" column="1">
...@@ -67,9 +58,9 @@ ...@@ -67,9 +58,9 @@
<item> <item>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="6" column="0"> <item row="6" column="0">
<widget class="QLabel" name="chanNameAssistSw"> <widget class="QLabel" name="posctlSwChanName">
<property name="text"> <property name="text">
<string>Assist Switch</string> <string>Posctl Switch</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
...@@ -121,7 +112,7 @@ ...@@ -121,7 +112,7 @@
</widget> </widget>
</item> </item>
<item row="8" column="0"> <item row="8" column="0">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="returnChanName">
<property name="text"> <property name="text">
<string>Return Switch</string> <string>Return Switch</string>
</property> </property>
...@@ -141,7 +132,7 @@ ...@@ -141,7 +132,7 @@
</widget> </widget>
</item> </item>
<item row="10" column="0"> <item row="10" column="0">
<widget class="QLabel" name="chanNameAux2_2"> <widget class="QLabel" name="aux1ChanName">
<property name="text"> <property name="text">
<string>Aux 1</string> <string>Aux 1</string>
</property> </property>
...@@ -188,7 +179,7 @@ ...@@ -188,7 +179,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="chanName_2"> <widget class="QLabel" name="pitchChanName">
<property name="text"> <property name="text">
<string>Pitch / Elevator</string> <string>Pitch / Elevator</string>
</property> </property>
...@@ -205,7 +196,7 @@ ...@@ -205,7 +196,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="chanName_3"> <widget class="QLabel" name="yawChanName">
<property name="text"> <property name="text">
<string>Yaw / Rudder</string> <string>Yaw / Rudder</string>
</property> </property>
...@@ -288,7 +279,7 @@ ...@@ -288,7 +279,7 @@
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="7" column="1">
<widget class="QLabel" name="missionSwChanLabel"> <widget class="QLabel" name="loiterSwChanLabel">
<property name="text"> <property name="text">
<string>0000</string> <string>0000</string>
</property> </property>
...@@ -298,7 +289,7 @@ ...@@ -298,7 +289,7 @@
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="5" column="0">
<widget class="QLabel" name="chanName_5"> <widget class="QLabel" name="modeSwChanName">
<property name="text"> <property name="text">
<string>Mode Switch</string> <string>Mode Switch</string>
</property> </property>
...@@ -328,7 +319,7 @@ ...@@ -328,7 +319,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="chanName"> <widget class="QLabel" name="rollChanName">
<property name="text"> <property name="text">
<string>Roll / Ailerons</string> <string>Roll / Ailerons</string>
</property> </property>
...@@ -355,7 +346,7 @@ ...@@ -355,7 +346,7 @@
</widget> </widget>
</item> </item>
<item row="6" column="2"> <item row="6" column="2">
<widget class="QCheckBox" name="assistSwInvertCheckBox"> <widget class="QCheckBox" name="posctlSwInvertCheckBox">
<property name="text"> <property name="text">
<string>Reverse</string> <string>Reverse</string>
</property> </property>
...@@ -372,14 +363,14 @@ ...@@ -372,14 +363,14 @@
</widget> </widget>
</item> </item>
<item row="6" column="4"> <item row="6" column="4">
<widget class="QPushButton" name="assistSwButton"> <widget class="QPushButton" name="posctlSwButton">
<property name="text"> <property name="text">
<string>Identify Assist Switch</string> <string>Identify Posctl Switch</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="0"> <item row="11" column="0">
<widget class="QLabel" name="chanNameAux2"> <widget class="QLabel" name="aux2ChanName">
<property name="text"> <property name="text">
<string>Aux 2</string> <string>Aux 2</string>
</property> </property>
...@@ -396,7 +387,7 @@ ...@@ -396,7 +387,7 @@
</widget> </widget>
</item> </item>
<item row="6" column="3"> <item row="6" column="3">
<widget class="QSpinBox" name="assistSwSpinBox"> <widget class="QSpinBox" name="posctlSwSpinBox">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -457,7 +448,7 @@ ...@@ -457,7 +448,7 @@
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="6" column="1">
<widget class="QLabel" name="assistSwChanLabel"> <widget class="QLabel" name="posctlSwChanLabel">
<property name="text"> <property name="text">
<string>0000</string> <string>0000</string>
</property> </property>
...@@ -487,9 +478,9 @@ ...@@ -487,9 +478,9 @@
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="7" column="0">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="loiterSwChanName">
<property name="text"> <property name="text">
<string>Mission Switch</string> <string>Loiter Switch</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
...@@ -507,7 +498,7 @@ ...@@ -507,7 +498,7 @@
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QLabel" name="chanName_4"> <widget class="QLabel" name="throttleChanName">
<property name="text"> <property name="text">
<string>Throttle</string> <string>Throttle</string>
</property> </property>
...@@ -517,7 +508,7 @@ ...@@ -517,7 +508,7 @@
</widget> </widget>
</item> </item>
<item row="9" column="0"> <item row="9" column="0">
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="flapsChanName">
<property name="text"> <property name="text">
<string>Flaps</string> <string>Flaps</string>
</property> </property>
...@@ -537,7 +528,7 @@ ...@@ -537,7 +528,7 @@
</widget> </widget>
</item> </item>
<item row="7" column="2"> <item row="7" column="2">
<widget class="QCheckBox" name="missionSwInvertCheckBox"> <widget class="QCheckBox" name="loiterSwInvertCheckBox">
<property name="text"> <property name="text">
<string>Reverse</string> <string>Reverse</string>
</property> </property>
...@@ -558,7 +549,7 @@ ...@@ -558,7 +549,7 @@
</widget> </widget>
</item> </item>
<item row="7" column="3"> <item row="7" column="3">
<widget class="QSpinBox" name="missionSwSpinBox"> <widget class="QSpinBox" name="loiterSwSpinBox">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -582,9 +573,9 @@ ...@@ -582,9 +573,9 @@
</widget> </widget>
</item> </item>
<item row="7" column="4"> <item row="7" column="4">
<widget class="QPushButton" name="missionSwButton"> <widget class="QPushButton" name="loiterSwButton">
<property name="text"> <property name="text">
<string>Identify Mission Switch</string> <string>Identify Loiter Switch</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -1005,16 +996,7 @@ ...@@ -1005,16 +996,7 @@
<string>Configuration</string> <string>Configuration</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
...@@ -1032,16 +1014,7 @@ ...@@ -1032,16 +1014,7 @@
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
...@@ -1060,16 +1033,7 @@ ...@@ -1060,16 +1033,7 @@
<string>Configuration</string> <string>Configuration</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
...@@ -1087,16 +1051,7 @@ ...@@ -1087,16 +1051,7 @@
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
...@@ -1129,16 +1084,7 @@ ...@@ -1129,16 +1084,7 @@
<string>Onboard Configuration</string> <string>Onboard Configuration</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
...@@ -1156,16 +1102,7 @@ ...@@ -1156,16 +1102,7 @@
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
...@@ -1271,16 +1208,7 @@ ...@@ -1271,16 +1208,7 @@
<item row="0" column="0" rowspan="3"> <item row="0" column="0" rowspan="3">
<widget class="QWidget" name="navBarWidget" native="true"> <widget class="QWidget" name="navBarWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment