Commit 98fde8d0 authored by Don Gagne's avatar Don Gagne

Add Simple flight mode for multi-rotor

parent cda355d6
......@@ -50,6 +50,7 @@ const char* PX4FirmwarePlugin::_rattitudeFlightMode = "Rattitude";
const char* PX4FirmwarePlugin::_followMeFlightMode = "Follow Me";
const char* PX4FirmwarePlugin::_rtgsFlightMode = "Return to Groundstation";
const char* PX4FirmwarePlugin::_readyFlightMode = "Ready";
const char* PX4FirmwarePlugin::_simpleFlightMode = "Simple";
/// Tranlates from PX4 custom modes to flight mode names
......@@ -61,6 +62,7 @@ static const struct Modes2Name rgModes2Name[] = {
{ PX4_CUSTOM_MAIN_MODE_RATTITUDE, 0, PX4FirmwarePlugin::_rattitudeFlightMode, true, true, true },
{ PX4_CUSTOM_MAIN_MODE_ALTCTL, 0, PX4FirmwarePlugin::_altCtlFlightMode, true, true, true },
{ PX4_CUSTOM_MAIN_MODE_POSCTL, 0, PX4FirmwarePlugin::_posCtlFlightMode, true, true, true },
{ PX4_CUSTOM_MAIN_MODE_SIMPLE, 0, PX4FirmwarePlugin::_simpleFlightMode, true, false, true },
{ PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_SUB_MODE_AUTO_LOITER, PX4FirmwarePlugin::_holdFlightMode, true, true, true },
{ PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_SUB_MODE_AUTO_MISSION, PX4FirmwarePlugin::_missionFlightMode, true, true, true },
{ PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_SUB_MODE_AUTO_RTL, PX4FirmwarePlugin::_rtlFlightMode, true, true, true },
......
......@@ -81,6 +81,7 @@ public:
static const char* _landingFlightMode;
static const char* _rtgsFlightMode;
static const char* _followMeFlightMode;
static const char* _simpleFlightMode;
private:
void _handleAutopilotVersion(Vehicle* vehicle, mavlink_message_t* message);
......
......@@ -50,7 +50,8 @@ enum PX4_CUSTOM_MAIN_MODE {
PX4_CUSTOM_MAIN_MODE_ACRO,
PX4_CUSTOM_MAIN_MODE_OFFBOARD,
PX4_CUSTOM_MAIN_MODE_STABILIZED,
PX4_CUSTOM_MAIN_MODE_RATTITUDE
PX4_CUSTOM_MAIN_MODE_RATTITUDE,
PX4_CUSTOM_MAIN_MODE_SIMPLE
};
enum PX4_CUSTOM_SUB_MODE_AUTO {
......
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