mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OpenPilot OP-537
Make the GCS input configuration errors a bit more informative
This commit is contained in:
parent
4d634ad304
commit
1c700c9e7c
@ -179,6 +179,8 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
|
||||
// Connect the help button
|
||||
connect(m_config->inputHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
|
||||
connect(m_config->receiverError, SIGNAL(clicked()), this, SLOT(receiverHelp()));
|
||||
|
||||
}
|
||||
|
||||
ConfigInputWidget::~ConfigInputWidget()
|
||||
@ -655,4 +657,52 @@ void ConfigInputWidget::openHelp()
|
||||
|
||||
QDesktopServices::openUrl( QUrl("http://wiki.openpilot.org/display/Doc/Input+Configuration", QUrl::StrictMode) );
|
||||
}
|
||||
void ConfigInputWidget::receiverHelp()
|
||||
{
|
||||
QString unassigned;
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
||||
UAVDataObject* controlCommand = dynamic_cast<UAVDataObject*>(objManager->getObject(QString("ManualControlSettings")));
|
||||
|
||||
UAVObjectField *field;
|
||||
|
||||
field= controlCommand->getField("Roll");
|
||||
if(field->getValue().toString()=="None")
|
||||
unassigned.append("Roll");
|
||||
|
||||
field =controlCommand->getField("Pitch");
|
||||
if(field->getValue().toString()=="None")
|
||||
{
|
||||
if(unassigned.length()>0)
|
||||
unassigned.append(" ,");
|
||||
unassigned.append("Pitch");
|
||||
}
|
||||
|
||||
field =controlCommand->getField("Yaw");
|
||||
if(field->getValue().toString()=="None")
|
||||
{
|
||||
if(unassigned.length()>0)
|
||||
unassigned.append(" ,");
|
||||
unassigned.append("Yaw");
|
||||
}
|
||||
|
||||
field =controlCommand->getField("Throttle");
|
||||
if(field->getValue().toString()=="None")
|
||||
{
|
||||
if(unassigned.length()>0)
|
||||
unassigned.append(" ,");
|
||||
unassigned.append("Throttle");
|
||||
}
|
||||
|
||||
field =controlCommand->getField("FlightMode");
|
||||
if(field->getValue().toString()=="None")
|
||||
{
|
||||
if(unassigned.length()>0)
|
||||
unassigned.append(" ,");
|
||||
unassigned.append("FlightMode");
|
||||
}
|
||||
if(unassigned.length()>0)
|
||||
QMessageBox::information(this,"Not all required channels are assigned",QString("Channel left to assign:")+unassigned);
|
||||
else
|
||||
QMessageBox::information(this,"Receiver not connected","All the required channels are assigned, however no receiver signal is being detected");
|
||||
}
|
||||
|
@ -79,6 +79,7 @@ private slots:
|
||||
void saveRCInputObject();
|
||||
void reverseCheckboxClicked(bool state);
|
||||
void openHelp();
|
||||
void receiverHelp();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -80,7 +80,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" colspan="3">
|
||||
<item row="2" column="4" colspan="3">
|
||||
<widget class="QSlider" name="inSlider1">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
@ -99,7 +99,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<item row="2" column="7">
|
||||
<widget class="QLabel" name="ch1Max">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -120,7 +120,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="7">
|
||||
<item row="2" column="8">
|
||||
<widget class="QCheckBox" name="ch1Rev">
|
||||
<property name="toolTip">
|
||||
<string>Check this to reverse the channel.
|
||||
@ -188,7 +188,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3" colspan="3">
|
||||
<item row="3" column="4" colspan="3">
|
||||
<widget class="QSlider" name="inSlider2">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
@ -207,7 +207,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="6">
|
||||
<item row="3" column="7">
|
||||
<widget class="QLabel" name="ch2Max">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -228,7 +228,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="7">
|
||||
<item row="3" column="8">
|
||||
<widget class="QCheckBox" name="ch2Rev">
|
||||
<property name="toolTip">
|
||||
<string>Check this to reverse the channel.
|
||||
@ -296,7 +296,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3" colspan="3">
|
||||
<item row="4" column="4" colspan="3">
|
||||
<widget class="QSlider" name="inSlider3">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
@ -315,7 +315,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="6">
|
||||
<item row="4" column="7">
|
||||
<widget class="QLabel" name="ch3Max">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -336,7 +336,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="7">
|
||||
<item row="4" column="8">
|
||||
<widget class="QCheckBox" name="ch3Rev">
|
||||
<property name="toolTip">
|
||||
<string>Check this to reverse the channel.
|
||||
@ -404,7 +404,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3" colspan="3">
|
||||
<item row="5" column="4" colspan="3">
|
||||
<widget class="QSlider" name="inSlider4">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
@ -423,7 +423,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="6">
|
||||
<item row="5" column="7">
|
||||
<widget class="QLabel" name="ch4Max">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -444,7 +444,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="7">
|
||||
<item row="5" column="8">
|
||||
<widget class="QCheckBox" name="ch4Rev">
|
||||
<property name="toolTip">
|
||||
<string>Check this to reverse the channel.
|
||||
@ -512,7 +512,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3" colspan="3">
|
||||
<item row="6" column="4" colspan="3">
|
||||
<widget class="QSlider" name="inSlider5">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
@ -531,7 +531,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="6">
|
||||
<item row="6" column="7">
|
||||
<widget class="QLabel" name="ch5Max">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -552,7 +552,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="7">
|
||||
<item row="6" column="8">
|
||||
<widget class="QCheckBox" name="ch5Rev">
|
||||
<property name="toolTip">
|
||||
<string>Check this to reverse the channel.
|
||||
@ -620,7 +620,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="3" colspan="3">
|
||||
<item row="7" column="4" colspan="3">
|
||||
<widget class="QSlider" name="inSlider6">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
@ -639,7 +639,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="6">
|
||||
<item row="7" column="7">
|
||||
<widget class="QLabel" name="ch6Max">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -660,7 +660,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="7">
|
||||
<item row="7" column="8">
|
||||
<widget class="QCheckBox" name="ch6Rev">
|
||||
<property name="toolTip">
|
||||
<string>Check this to reverse the channel.
|
||||
@ -728,7 +728,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="3" colspan="3">
|
||||
<item row="8" column="4" colspan="3">
|
||||
<widget class="QSlider" name="inSlider7">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
@ -747,7 +747,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="6">
|
||||
<item row="8" column="7">
|
||||
<widget class="QLabel" name="ch7Max">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -768,7 +768,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="7">
|
||||
<item row="8" column="8">
|
||||
<widget class="QCheckBox" name="ch7Rev">
|
||||
<property name="toolTip">
|
||||
<string>Check this to reverse the channel.
|
||||
@ -800,7 +800,7 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="8">
|
||||
<item row="10" column="0" colspan="9">
|
||||
<widget class="QLabel" name="label_20">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@ -811,14 +811,14 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<item row="0" column="8">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Rev.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<item row="1" column="8">
|
||||
<widget class="QCheckBox" name="ch0Rev">
|
||||
<property name="toolTip">
|
||||
<string>Check this to reverse the channel.
|
||||
@ -830,7 +830,7 @@ reversal capabilities).</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<item row="1" column="7">
|
||||
<widget class="QLabel" name="ch0Max">
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -851,7 +851,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" colspan="3">
|
||||
<item row="1" column="4" colspan="3">
|
||||
<widget class="QSlider" name="inSlider0">
|
||||
<property name="mouseTracking">
|
||||
<bool>true</bool>
|
||||
@ -935,26 +935,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" colspan="4">
|
||||
<widget class="QLabel" name="RCInputConnected">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Indicates whether OpenPilot is getting a signal from the RC receiver.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RC Receiver not connected or invalid input configuration (missing channels)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="receiverType">
|
||||
<property name="toolTip">
|
||||
@ -981,6 +961,68 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="RCInputConnected">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>234</width>
|
||||
<height>54</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>11</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Indicates whether OpenPilot is getting a signal from the RC receiver.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RC Receiver not connected or invalid input configuration (missing channels)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="receiverError">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../coreplugin/core.qrc">
|
||||
<normaloff>:/core/images/helpicon.svg</normaloff>:/core/images/helpicon.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
|
Loading…
x
Reference in New Issue
Block a user