mavlink/qgroundcontrol — pull request #292 by Susurrus (2013-06-21 23:31:36+00:00)
Title: Joystick commands

Extended the existing joystick interface to include button and axis mappings. Button mappings are performed by selecting an action from those returned by UASInterface::getActions(). I've been using it to toggle manual/autonomous control on my vessel.

Axis mappings allow you to specify which of yaw, pitch, roll, or throttle a given joystick axis is controlling and if its input should be inverted. The throttle axis also takes into account whether the vehicle can command a reverse longitudinal thrust and if so expands the axis range to allow for finer control. For auto-centering axes, this can be overridden so that the vehicle doesn't default to 50% forward thrust.

All joystick mappings are saved in the general settings for QGC based on both the autopilot type and the system type and are changed automatically when switching between vehicles in QGC. Additionally the enabled state and which joystick/controller was last selected are saved and reloaded on startup as well.

I still think that this should be merged into the main settings window, as there's no reason to keep it separate. Additionally I have not compiled anything on any other platform, but no libraries or platform-specific changes were done. I don't have a mac, but I'll bring it up in Windows this weekend and see how it works.