QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PX4VehicleReadiness.cc
Go to the documentation of this file.
2
3#include "FirmwarePlugin.h"
4#include "Vehicle.h"
5
9
11{
12 QString flightMode;
13 switch (action) {
15 // guidedModeTakeoff and startTakeoff both switch to Takeoff mode, then arm
16 flightMode = _vehicle->firmwarePlugin()->takeOffFlightMode();
17 break;
19 // startMission switches to Mission mode, then arms
20 flightMode = _vehicle->firmwarePlugin()->missionFlightMode();
21 break;
22 }
23 return ActionFlightModes{.armFlightMode = flightMode, .targetFlightMode = flightMode};
24}
PX4VehicleReadiness(Vehicle *vehicle)
ActionFlightModes _actionFlightModes(GuidedAction action) const override
Firmware returns the modes its plugin uses for the action. Unknown modes fall back to the current mod...
VehicleReadiness(Vehicle *vehicle)
Flight modes a guided action uses, as the firmware plugin performs it.