I want to test controlling my multirotor over an internet link. I want to be able to take over with the RC transmitter if anything weird happens during the first test. I want to set the input so that RC is first priority and then Mavlink and have some way to mark the RC link as “not good” with a switch state so that I can flip the switch and immediately take over control via RC. I have not found a way for PX4 to mark the RC input as “bad” or “invalid” based on the button state. I’ve been looking at the manual_control_setpoint topic to see which control it is using. What are the best ways to set up this switching based on RC controller?
Hi,
Welcome to the PX4 community.
For your use case, I would distinguish between manual-control source selection and flight-mode switching.
If you are sending Offboard setpoints over MAVLink, I would generally keep the RC link available and use an RC flight-mode switch to request a suitable manual-assisted mode, such as Position or Altitude, rather than deliberately marking a healthy RC link as invalid.
A few points are worth checking:
-
Configure and verify the RC flight-mode switch in QGroundControl.
-
Review the Offboard-loss timeout and failsafe action for your PX4 version, including
COM_OF_LOSS_TandCOM_OBL_RC_ACTwhere applicable. -
Check the actual navigation state and failsafe status, rather than relying only on
manual_control_setpointto identify the active controller. -
Validate the mode transition and loss-of-link behavior in SITL before considering a controlled real-world test.
One important question: are you using MAVLink Offboard setpoints through MAVSDK or a companion computer, or are you sending MAVLink MANUAL_CONTROL messages over the internet?
Those are different control paths, and the correct switching approach depends on which one you are using.
I would also avoid relying on internet connectivity or a manually triggered RC-validity change as the primary safety mechanism.
Best regards,
Yiğitcan Öztürk
PAMILANGA LIMITED
If you need stick input over the internet (MANUAL_CONTROL) rather than Offboard setpoints, COM_RC_IN_MODE 5 is “Prio: RC > MAVL 1 > MAVL 2”. Priority modes switch to a higher-priority source as soon as it becomes valid. With the receiver set to output nothing on signal loss, turning the transmitter off leaves MAVLink in control, and turning it on takes over. Test that on the ground with the props off first, because the delay depends on how fast the transmitter links. Confirm these values on your firmware.
Also check COM_RC_LOSS_T (manual control loss timeout, default 0.5 s). Internet jitter can trip it if the timeout is shorter than the gaps in your stream.
I would put RC_MAP_KILL_SW on its own switch. That channel sets all outputs to their disarmed values, and flipping it back restores control.
MAN_OVERRIDE_SPD (multicopter, default 1, negative disables it) switches to Position mode when the sticks are moved quickly. Check in SITL whether it does what you want in the mode you plan to use.
Thanks for the detailed parameter references.
One distinction worth making is whether the internet-side controller sends MAVLink MANUAL_CONTROL messages or Offboard setpoints.
For MANUAL_CONTROL, source-priority settings may provide the intended RC takeover behavior, subject to the firmware version and receiver failsafe configuration.
For Offboard control, the mode-transition and Offboard-loss behavior need to be validated separately. Manual-input source priority alone does not establish an automatic Offboard-to-RC transition.
I would also distinguish an RC takeover switch from RC_MAP_KILL_SW. A kill switch is an emergency motor-stop mechanism, not a normal control-handover mechanism.
A useful SITL acceptance test would record:
-
The active control source and navigation mode before and after RC takeover.
-
The time between valid RC input and the observed transition.
-
Behavior during MAVLink interruption and recovery.
-
Behavior when the RC receiver loses signal.
-
Whether the expected failsafe action occurs without an unintended mode transition.
Could the original poster confirm whether their internet controller uses MANUAL_CONTROL or Offboard setpoints, and which PX4 firmware version they are running?
That would help narrow down the appropriate configuration.
Best regards,
Yiğitcan Öztürk
PAMILANGA LIMITED
One clarification: PX4 doesn’t have a standard parameter that maps an auxiliary switch to “mark RC invalid.” Source priority is based on whether the RC input is present/valid, so with COM_RC_IN_MODE 5 a valid RC link will already outrank MAVLink. To let MAVLink drive, the RC input must actually be absent/failsafe; then restoring it gives RC priority again. If you want a switch rather than turning the transmitter off, that has to come from receiver/transmitter failsafe behavior (receiver outputs no pulses), not PX4. For Offboard, use an RC mode switch to exit Offboard and verify the Offboard-loss action separately.