Commit f16514fb authored by Danny Schrader's avatar Danny Schrader

removed FirmwarePlugin message. Changed abortLanding() to abortLanding(double).

parent 8c2f662c
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
static FirmwarePluginFactoryRegister* _instance = NULL; static FirmwarePluginFactoryRegister* _instance = NULL;
const char* guided_mode_not_supported_by_vehicle = "Guided mode not supported by Vehicle."; const char* guided_mode_not_supported_by_vehicle = "Guided mode not supported by Vehicle.";
const char* landing_aborted = "Landing aborted.";
const char* FirmwarePlugin::px4FollowMeFlightMode = "Follow Me"; const char* FirmwarePlugin::px4FollowMeFlightMode = "Follow Me";
...@@ -232,12 +231,6 @@ void FirmwarePlugin::pauseVehicle(Vehicle* vehicle) ...@@ -232,12 +231,6 @@ void FirmwarePlugin::pauseVehicle(Vehicle* vehicle)
qgcApp()->showMessage(guided_mode_not_supported_by_vehicle); qgcApp()->showMessage(guided_mode_not_supported_by_vehicle);
} }
void FirmwarePlugin::abortLanding(Vehicle* vehicle)
{
Q_UNUSED(vehicle);
qgcApp()->showMessage(landing_aborted);
}
void FirmwarePlugin::guidedModeRTL(Vehicle* vehicle) void FirmwarePlugin::guidedModeRTL(Vehicle* vehicle)
{ {
// Not supported by generic vehicle // Not supported by generic vehicle
......
...@@ -105,9 +105,6 @@ public: ...@@ -105,9 +105,6 @@ public:
/// If not, vehicle will be left in Loiter. /// If not, vehicle will be left in Loiter.
virtual void pauseVehicle(Vehicle* vehicle); virtual void pauseVehicle(Vehicle* vehicle);
/// Command vehicle to abort landing
virtual void abortLanding(Vehicle* vehicle);
/// Command vehicle to return to launch /// Command vehicle to return to launch
virtual void guidedModeRTL(Vehicle* vehicle); virtual void guidedModeRTL(Vehicle* vehicle);
......
...@@ -240,7 +240,7 @@ Item { ...@@ -240,7 +240,7 @@ Item {
//_activeVehicle.guidedModeOrbit(QGroundControl.flightMapPosition, 50.0) //_activeVehicle.guidedModeOrbit(QGroundControl.flightMapPosition, 50.0)
break; break;
case confirmAbort: case confirmAbort:
_activeVehicle.abortLanding() _activeVehicle.abortLanding(50) // hardcoded value for climbOutAltitude that is currently ignored
break; break;
default: default:
console.warn(qsTr("Internal error: unknown confirmActionCode"), confirmActionCode) console.warn(qsTr("Internal error: unknown confirmActionCode"), confirmActionCode)
...@@ -366,7 +366,7 @@ Item { ...@@ -366,7 +366,7 @@ Item {
QGCButton { QGCButton {
pointSize: _guidedModeBar._fontPointSize pointSize: _guidedModeBar._fontPointSize
text: qsTr("Abort") text: qsTr("Abort")
visible: _activeVehicle && _activeVehicle.flying visible: _activeVehicle && _activeVehicle.flying && _activeVehicle.fixedWing
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmAbort) onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmAbort)
} }
......
...@@ -1838,14 +1838,12 @@ void Vehicle::pauseVehicle(void) ...@@ -1838,14 +1838,12 @@ void Vehicle::pauseVehicle(void)
_firmwarePlugin->pauseVehicle(this); _firmwarePlugin->pauseVehicle(this);
} }
void Vehicle::abortLanding(void) void Vehicle::abortLanding(double climbOutAltitude)
{ {
sendMavCommand(defaultComponentId(), sendMavCommand(defaultComponentId(),
MAV_CMD_DO_GO_AROUND, MAV_CMD_DO_GO_AROUND,
true, // show error if fails true, // show error if fails
50); // this is a dummy value that is currently ignored climbOutAltitude);
_firmwarePlugin->abortLanding(this);
} }
bool Vehicle::guidedMode(void) const bool Vehicle::guidedMode(void) const
......
...@@ -356,7 +356,7 @@ public: ...@@ -356,7 +356,7 @@ public:
Q_INVOKABLE void emergencyStop(void); Q_INVOKABLE void emergencyStop(void);
/// Command vehicle to abort landing /// Command vehicle to abort landing
Q_INVOKABLE void abortLanding(void); Q_INVOKABLE void abortLanding(double climbOutAltitude);
/// Alter the current mission item on the vehicle /// Alter the current mission item on the vehicle
Q_INVOKABLE void setCurrentMissionSequence(int seq); Q_INVOKABLE void setCurrentMissionSequence(int seq);
......
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