Skip to content

Commit

Permalink
Merge pull request mavlink#5173 from DonLakeFlyer/StopOneMocklink
Browse files Browse the repository at this point in the history
Stop one MockLink at a time
  • Loading branch information
DonLakeFlyer authored May 18, 2017
2 parents 52c47fd + 6341bf6 commit 5682c23
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/QmlControls/QGroundControlQmlGlobal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void QGroundControlQmlGlobal::startAPMArduSubMockLink(bool sendStatusText)
#endif
}

void QGroundControlQmlGlobal::stopAllMockLinks(void)
void QGroundControlQmlGlobal::stopOneMockLink(void)
{
#ifdef QT_DEBUG
LinkManager* linkManager = qgcApp()->toolbox()->linkManager();
Expand All @@ -148,6 +148,7 @@ void QGroundControlQmlGlobal::stopAllMockLinks(void)

if (mockLink) {
linkManager->disconnectLink(mockLink);
return;
}
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/QmlControls/QGroundControlQmlGlobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class QGroundControlQmlGlobal : public QGCTool
Q_INVOKABLE void startAPMArduCopterMockLink (bool sendStatusText);
Q_INVOKABLE void startAPMArduPlaneMockLink (bool sendStatusText);
Q_INVOKABLE void startAPMArduSubMockLink (bool sendStatusText);
Q_INVOKABLE void stopAllMockLinks (void);
Q_INVOKABLE void stopOneMockLink (void);

/// Converts from meters to the user specified distance unit
Q_INVOKABLE QVariant metersToAppSettingsDistanceUnits(const QVariant& meters) const { return FactMetaData::metersToAppSettingsDistanceUnits(meters); }
Expand Down
4 changes: 2 additions & 2 deletions src/ui/preferences/MockLink.qml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ Rectangle {
text: qsTr("Send status text + voice")
}
QGCButton {
text: qsTr("Stop All MockLinks")
onClicked: QGroundControl.stopAllMockLinks()
text: qsTr("Stop One MockLink")
onClicked: QGroundControl.stopOneMockLink()
}
}
}
Expand Down

0 comments on commit 5682c23

Please sign in to comment.