mavlink/qgroundcontrol — pull request #290 by Susurrus (2013-06-11 01:18:42+00:00)
Title: Joystick configuration [DO NOT MERGE] [FEEDBACK REQUIRED]

I've been working on updating the joystick functionality in QGC as I actually use it as my primary control mechanism for my UAS and I wanted to put it on the radar of the main project to prevent duplication of work now that I'm actually working on it. Note that most of the changes in this branch stem off of my `recoloring` branch, so there are actually a rather small number of changes made here.

So far I've implemented the following:
* Multiple joystick/controller support
* Theme awareness and recoloring
* Support for however many buttons the controller actually has

Still to do:
* Pretty up the UI so that it is much more clear how the button and axis mapping works.
* Support different number of axes
* Load/store settings for each individual controller based on SDL-derived controller name

**Questions**
1. What is the proper way to specify that the vehicle should switch into/out of autonomous control? Is the `SET_MODE` message supposed to be used or instead the `COMMAND_LONG` message with the `MAV_CMD_DO_SET_MODE` payload?
2. There are currently 3 button mappings: auto, manual, stabilized. What should each of them actually do in terms of setting the vehicle mode because the mode also includes if the vehicle is armed. Should another button be available to arm the UAS? I was actually thinking instead of these options to reuse the options in the Control widget [Preflight, Manual, ...] and also have an Arm/Disarm button. Possibly with Halt as well. I just want a minimum list at this point of useful commands. I just need arm/disarm, autonomous, and manual so I'll start with that until I hear back on these questions.