Skip to content
Snippets Groups Projects
Commit 9af2c59b authored by lm's avatar lm
Browse files

Made param7 accessible as well

parent 3fbf5bc7
No related branches found
No related tags found
No related merge requests found
...@@ -394,7 +394,7 @@ void UASWaypointManager::saveWaypoints(const QString &saveFile) ...@@ -394,7 +394,7 @@ void UASWaypointManager::saveWaypoints(const QString &saveFile)
QTextStream out(&file); QTextStream out(&file);
//write the waypoint list version to the first line for compatibility check //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++) 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(" "); 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.")); 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.")); //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) : ...@@ -105,9 +105,7 @@ WaypointView::WaypointView(Waypoint* wp, QWidget* parent) :
connect(customCommand->param4SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam4(double))); connect(customCommand->param4SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam4(double)));
connect(customCommand->param5SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam5(double))); connect(customCommand->param5SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam5(double)));
connect(customCommand->param6SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam6(double))); connect(customCommand->param6SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam6(double)));
connect(customCommand->param7SpinBox, SIGNAL(valueChanged(double)), wp, SLOT(setParam7(double)));
// MISSION ELEMENT WIDGET
// TODO
} }
void WaypointView::setYaw(int yawDegree) void WaypointView::setYaw(int yawDegree)
...@@ -507,6 +505,11 @@ void WaypointView::updateValues() ...@@ -507,6 +505,11 @@ void WaypointView::updateValues()
{ {
customCommand->param6SpinBox->setValue(wp->getParam6()); customCommand->param6SpinBox->setValue(wp->getParam6());
} }
// Param 7
if (customCommand->param7SpinBox->value() != wp->getParam7())
{
customCommand->param7SpinBox->setValue(wp->getParam7());
}
wp->blockSignals(false); wp->blockSignals(false);
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </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"> <property name="spacing">
<number>5</number> <number>5</number>
</property> </property>
...@@ -114,6 +114,19 @@ ...@@ -114,6 +114,19 @@
</property> </property>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
<resources/> <resources/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment