Is custom dynamic axis switching possible?

Apologies for the confusion - I was meaning that during setup Cockpit allows assigning the axes to whichever joystick you want (compared to the 4 pre-defined mappings in QGroundControl), but it is not yet possible to change those axis during operation using commands or buttons (unless you change their meaning at the receiving end, which is what ArduSub’s roll-pitch-toggle button function does).

In practice this is correct when using ArduSub, but technically speaking Cockpit doesn’t actually assign a meaning to the axes, it just sends values for axes X/Y/Z/R/S/T, and lets the autopilot interpret them however it wants to.

Yeah, that seems consistent :slight_smile:

Yep - joystick mapping sets are stored per user, so to change which mapping is in use you can either switch to a different one, or switch users.

We’re working on improving the joystick setup interface, because there are three available mappings (per joystick type), but the hardcoded naming (“ROV JOYSTICK MAPPING”, “BOAT JOYSTICK MAPPING”, and “MAV JOYSTICK MAPPING”) makes it seem like they only work for particular vehicle types, when in reality you could use them as three different mappings for a single vehicle type if you wanted to.

Switching the current mapping currently just involves opening the joystick page and clicking on a different one. I suppose we could make an Action for switching between joystick mappings, which would also be a fast-track workaround to achieving (limited but functional) dynamic joystick axis assignment, by swapping the entire mapping for one with identical button function assignments but swapped around axes…

Not quite, but it should become possible when the MANUAL_CONTROL inputs are made directly configurable - same as the dynamic axis switching. Alternatively it may become possible once axis values can be used in the data lake, if you’re willing to forego the autopilot’s built in button functions and switch from MANUAL_CONTROL to RC_CHANNELS_OVERRIDE for the motion control.

That said, it is already possible to create a custom data lake variable, assign an analog trigger’s “button function” to control that, and then use its value in a custom Action (e.g. to send a MAVLink message to directly control a servo, or combine it with another value for some more advanced functionality).

No worries - these questions are helpful for us to understand how and where our documentation can be improved, and it’s always cool when people are pushing the limits of what the software is capable of :slight_smile: