Relay control with Joystick buttons (MANUAL_CONTROL)


I use Pixhawk with ArduRover 4.2.0 and a PC running QGC 4.2.3 with a Joystick connected.
Pixhawk is connected to a RasPi (via Telemetry connection) running MavProxy.
The PC connects to Pixhawk (UDP or TCP) using the RasPi’s IP address.

In QGC there’s no option to control relays or AUX outputs from the joystick buttons.
What does it require to have this feature? QGC Customization? Some missing setting?

The rover will be used for agricultural activities with several relay-controlled/triggered functions.

I noticed that v.4.2.2 #10106 (Allow vehicles that have built-in joystick support to also use QGC joystick functions. by Williangalvani · Pull Request #10106 · mavlink/qgroundcontrol · GitHub) has something related to that but only for sub. The animation in that link does show some relay related functions, but I can’t tell if those are customizations or QGC’s built-in functions.


I run wireshark and noticed that QGC sends MANUAL_CONTROL information for each button press.

Then, I loaded ArduSub firmware on Pixhalk, noticed that the exact same MANUAL_CONTROL information is sent to Pixhawk when using QGC and the joystick, but here button presses trigger various actions, based on the BTNx settings on pixhawk.
These BTNx settings do not exist in ArduRover firmware (BTN parameters are only for digital inputs).
So, I assume it’s an Ardupilot firmware implementation of the ArduRover and QGC simply maps that to its interface.
QGC will simply send joystick button presses using the MANUAL_CONTROL command, regardless of the installed firmware on pixhawk.

I’m curious what you ended up doing here - did you just switch to Mission Planner, or a scripted approach, or build a custom QGroundControl variant or something? As far as I’m aware manually controlling relays in Rover requires using the MAV_CMD_DO_SET_RELAY command, which standard QGC doesn’t provide as an option.

In case it’s relevant / of interest I came across this post while writing a response to this one, since the recently released BlueBoat runs ArduRover, and we (Blue Robotics) don’t yet have detailed instructions or processes for handling more involved customisations. I imagine this kind of thing is likely to come up more frequently in future, since much of the existing Rover documentation is written around Mission Planner, whereas most of the existing Blue Robotics customers (and broader ArduSub community) are more used to QGroundControl, and there isn’t always feature parity between them.

An RC channel can control a relay. Therefore, a joystick button can be assigned just as easily. I know this is possible in Mission Planner with almost no effort required.

As for QGC…no idea…never use it.