Switching between different servos mid-flight

Hi all,

I am building a custom airship. I currently have it functioning as intended using ArduPilot on a Pixhawk 6X, but I have been continuously running into software limitations in ArduPilot that are requiring quite a few changes to the firmware itself and the source-code.

I initially used ArduPilot, because that is what I was most familiar with from previous projects, but I came to the conclusion yesterday that it might be worth switching this project to PX4 at this point in order to utilize some of PX4’s built-in software features that I need (i.e. custom servo slew rates, etc.).

Anyway, an issue I overcame via Lua scripting in ArduPilot is now something I need to figure out how to do in PX4 (doesn’t necessarily need to be solved via scripting).

Basically, the airship setup consists of 4 fins (two rudders and two elevons) as well as a rear motor that is on a gimbal that can pitch and yaw. I’d like to setup a switch (either a physical switch on my transmitter like I had in ArduPilot, or a software switch), that allows me to swap between which control surfaces I want to use for steering. In other words, this is how it should funciton:
- Switch position 0: ENABLE both rudders and elevons for yaw, pitch, and roll control, DISABLE gimbal entirely.
- Switch position 1: DISABLE all fins, ENABLE gimbal pitch and yaw control.
- Switch position 2: ENABLE all possible control surfaces.

Basically, I want to be able to use my transmitter as normal for pitch, roll, and yaw control, but depending on what position the switch is in, I’ll only be controlling specific control surfaces/actuators.

As I am quite new to PX4, any guidance in this is much appreciated!!!

TLDR: I have a vehicle that controls its pitch and yaw (and some roll) via both fins and thrust vectoring, but I want to go between using JUST fins or JUST thrust vectoring on the fly.