Browse Source

Fixed RC cal

QGC4.4
Lorenz Meier 12 years ago
parent
commit
3f88380f27
  1. 5
      files/styles/style-dark.css
  2. 9
      src/ui/QGCPX4VehicleConfig.cc
  3. 21
      src/ui/QGCPX4VehicleConfig.ui

5
files/styles/style-dark.css

@ -229,6 +229,11 @@ QGCPX4SensorCalibration QLabel#accelLabel { @@ -229,6 +229,11 @@ QGCPX4SensorCalibration QLabel#accelLabel {
min-height: 25px;
}
QGCPX4VehicleConfig QLabel#rcLabel {
color: #FEC654;
font-size: 18pt;
}
QGCToolWidgetItem {
border: 1px solid #666;
border-radius: 3px;

9
src/ui/QGCPX4VehicleConfig.cc

@ -239,6 +239,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) : @@ -239,6 +239,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
connect(&updateTimer, SIGNAL(timeout()), this, SLOT(updateView()));
updateTimer.start();
ui->rcLabel->setText(tr("NO RADIO CONTROL INPUT DETECTED. PLEASE ENSURE THE TRANSMITTER IS ON."));
}
QGCPX4VehicleConfig::~QGCPX4VehicleConfig()
@ -423,6 +425,7 @@ void QGCPX4VehicleConfig::startCalibrationRC() @@ -423,6 +425,7 @@ void QGCPX4VehicleConfig::startCalibrationRC()
QMessageBox::warning(0,
tr("RC not Connected"),
tr("Is the RC receiver connected and transmitter turned on? Detected %1 radio channels. To operate PX4, you need at least 5 channels. ").arg(chanCount));
ui->rcCalibrationButton->setChecked(false);
return;
}
@ -464,6 +467,9 @@ void QGCPX4VehicleConfig::startCalibrationRC() @@ -464,6 +467,9 @@ void QGCPX4VehicleConfig::startCalibrationRC()
void QGCPX4VehicleConfig::stopCalibrationRC()
{
if (!calibrationEnabled)
return;
QMessageBox::information(0,"Trims","Ensure all controls are centered and throttle is in the lowest position. Click OK to continue");
calibrationEnabled = false;
@ -1808,5 +1814,8 @@ void QGCPX4VehicleConfig::updateView() @@ -1808,5 +1814,8 @@ void QGCPX4VehicleConfig::updateView()
updateRcWidgetValues();
updateRcChanLabels();
if (chanCount > 0)
ui->rcLabel->setText(tr("Radio control detected with %1 channels.").arg(chanCount));
}
}

21
src/ui/QGCPX4VehicleConfig.ui

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1256</width>
<height>918</height>
<height>985</height>
</rect>
</property>
<property name="sizePolicy">
@ -199,6 +199,13 @@ @@ -199,6 +199,13 @@
</layout>
</item>
<item>
<widget class="QLabel" name="rcLabel">
<property name="text">
<string>Waiting for RC channel data..</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="advancedCheckBox">
<property name="text">
<string>Show Advanced Configuration Options</string>
@ -822,8 +829,8 @@ @@ -822,8 +829,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>21</width>
<height>16</height>
<width>98</width>
<height>28</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
@ -859,8 +866,8 @@ @@ -859,8 +866,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>21</width>
<height>16</height>
<width>98</width>
<height>28</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
@ -910,8 +917,8 @@ @@ -910,8 +917,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>16</width>
<height>16</height>
<width>98</width>
<height>28</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">

Loading…
Cancel
Save