Commit 9af2c59b authored by lm's avatar lm

Made param7 accessible as well

parent 3fbf5bc7
......@@ -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)
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."));
......
......@@ -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()
{
customCommand->param6SpinBox->setValue(wp->getParam6());
}
// Param 7
if (customCommand->param7SpinBox->value() != wp->getParam7())
{
customCommand->param7SpinBox->setValue(wp->getParam7());
}
wp->blockSignals(false);
}
......
......@@ -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 @@
</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/>
......
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