Browse Source

Made param7 accessible as well

QGC4.4
lm 14 years ago
parent
commit
9af2c59b12
  1. 4
      src/uas/UASWaypointManager.cc
  2. 9
      src/ui/WaypointView.cc
  3. 15
      src/ui/mission/QGCCustomWaypointAction.ui

4
src/uas/UASWaypointManager.cc

@ -394,7 +394,7 @@ void UASWaypointManager::saveWaypoints(const QString &saveFile) @@ -394,7 +394,7 @@ void UASWaypointManager::saveWaypoints(const QString &saveFile)
QTextStream out(&file);
//write the waypoint list version to the first line for compatibility check
out << "QGC WPL 100\r\n";
out << "QGC WPL 110\r\n";
for (int i = 0; i < waypoints.size(); i++)
{
@ -420,7 +420,7 @@ void UASWaypointManager::loadWaypoints(const QString &loadFile) @@ -420,7 +420,7 @@ void UASWaypointManager::loadWaypoints(const QString &loadFile)
const QStringList &version = in.readLine().split(" ");
if (!(version.size() == 3 && version[0] == "QGC" && version[1] == "WPL" && version[2] == "100"))
if (!(version.size() == 3 && version[0] == "QGC" && version[1] == "WPL" && version[2] == "110"))
{
emit updateStatusString(tr("The waypoint file is not compatible with the current version of QGroundControl."));
//MainWindow::instance()->showCriticalMessage(tr("Error loading waypoint file"),tr("The waypoint file is not compatible with the current version of QGroundControl."));

9
src/ui/WaypointView.cc

@ -105,9 +105,7 @@ WaypointView::WaypointView(Waypoint* wp, QWidget* parent) : @@ -105,9 +105,7 @@ WaypointView::WaypointView(Waypoint* wp, QWidget* parent) :
connect(customCommand->param4SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam4(double)));
connect(customCommand->param5SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam5(double)));
connect(customCommand->param6SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam6(double)));
// MISSION ELEMENT WIDGET
// TODO
connect(customCommand->param7SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam7(double)));
}
void WaypointView::setYaw(int yawDegree)
@ -507,6 +505,11 @@ void WaypointView::updateValues() @@ -507,6 +505,11 @@ void WaypointView::updateValues()
{
customCommand->param6SpinBox->setValue(wp->getParam6());
}
// Param 7
if (customCommand->param7SpinBox->value() != wp->getParam7())
{
customCommand->param7SpinBox->setValue(wp->getParam7());
}
wp->blockSignals(false);
}

15
src/ui/mission/QGCCustomWaypointAction.ui

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="10,10,10,10,10,10,0">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="10,10,10,10,10,10,0,0">
<property name="spacing">
<number>5</number>
</property>
@ -114,6 +114,19 @@ @@ -114,6 +114,19 @@
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="param7SpinBox">
<property name="prefix">
<string>P7 </string>
</property>
<property name="minimum">
<double>-2147483647.000000000000000</double>
</property>
<property name="maximum">
<double>2147483647.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>

Loading…
Cancel
Save