diff --git a/src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc b/src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc index 0cfaa0487f47058b4bfaf0f0eadff2095c1d4398..469ec176e9b591be94df79bd6e1d646f3c2f017c 100644 --- a/src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc +++ b/src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc @@ -40,6 +40,7 @@ enum PX4_CUSTOM_MAIN_MODE { PX4_CUSTOM_MAIN_MODE_AUTO, PX4_CUSTOM_MAIN_MODE_ACRO, PX4_CUSTOM_MAIN_MODE_OFFBOARD, + PX4_CUSTOM_MAIN_MODE_STABILIZED, }; enum PX4_CUSTOM_SUB_MODE_AUTO { @@ -100,6 +101,18 @@ QList PX4AutoPilotPlugin::getModes(void) fullMode.baseMode = MAV_MODE_FLAG_CUSTOM_MODE_ENABLED | MAV_MODE_FLAG_MANUAL_INPUT_ENABLED; fullMode.customMode = px4_cm.data; modeList << fullMode; + + px4_cm.data = 0; + px4_cm.main_mode = PX4_CUSTOM_MAIN_MODE_ACRO; + fullMode.baseMode = MAV_MODE_FLAG_CUSTOM_MODE_ENABLED | MAV_MODE_FLAG_MANUAL_INPUT_ENABLED; + fullMode.customMode = px4_cm.data; + modeList << fullMode; + + px4_cm.data = 0; + px4_cm.main_mode = PX4_CUSTOM_MAIN_MODE_STABILIZED; + fullMode.baseMode = MAV_MODE_FLAG_CUSTOM_MODE_ENABLED | MAV_MODE_FLAG_MANUAL_INPUT_ENABLED | MAV_MODE_FLAG_STABILIZE_ENABLED; + fullMode.customMode = px4_cm.data; + modeList << fullMode; px4_cm.data = 0; px4_cm.main_mode = PX4_CUSTOM_MAIN_MODE_ALTCTL; @@ -140,6 +153,10 @@ QString PX4AutoPilotPlugin::getShortModeText(uint8_t baseMode, uint32_t customMo if (px4_mode.main_mode == PX4_CUSTOM_MAIN_MODE_MANUAL) { mode = "|MANUAL"; + } else if (px4_mode.main_mode == PX4_CUSTOM_MAIN_MODE_ACRO) { + mode = "|ACRO"; + } else if (px4_mode.main_mode == PX4_CUSTOM_MAIN_MODE_STABILIZED) { + mode = "|STAB"; } else if (px4_mode.main_mode == PX4_CUSTOM_MAIN_MODE_ALTCTL) { mode = "|ALTCTL"; } else if (px4_mode.main_mode == PX4_CUSTOM_MAIN_MODE_POSCTL) {