mavlink/qgroundcontrol — pull request #983 by DonLakeFlyer (2014-11-18 19:35:04+00:00)
Title: Auto pilot plugin architecture

This change centralizes autopilot specific code into an AutoPilotPlugin object. This keeps the central QGroundControl code clean as a generic mavlink implementation. It also creates a VehicleComponent architecture for the autopilot plugin to expose vehicle setup ui in a standard way. Each autopilot can expose multiple vehicle components which are then used to setup the vehicle. This way QGC can provide a Vehicle Setup UI without having autopilot specific code mixed into the main code base. The main classes which make this work are the AutoPilotPlugin class (AutoPilotPlugins/AutoPilotPlugin.h) and the VehicleComponent class (VehicleSetup/VehicleCompoment.h).

As it stands now there are two plugins implemented. One for MAV_AUTOPILOT_PX4 and a generic implementation for all other boards.

From a new functionality standpoint this is mostly restructuring which will be taken advantage of in the future as we work through the rest of the PX4 setup screens. There are three visible changes though. the first two can be seen here:

![screen shot 2014-11-15 at 12 56 01 pm](https://cloud.githubusercontent.com/assets/5876851/5094250/4ba0456a-6f14-11e4-8a99-6b7c08a4e262.png)

At the top you will see that the toolbar is re-ordered to better represent that sequence steps you go through: Setup, Plan, Fly, Analyze. Also each Setup button now has both the Setup UI like it had before, but it also has a filtered list of parameters that are associated with that component. Above you can see the example for the Radio component. In some sense this provides the "Advanced Mode" for each component. The setup screen for the Radio Component is the same Radio Calibration code that exists in the product today. Same for Firmware and Airframe.

Another example is show here for the start of the Flight Modes setup screen. Although the Setup page is still a Coming Soon like before, it provides you quick access to the switch parameters:

![screen shot 2014-11-18 at 11 26 37 am](https://cloud.githubusercontent.com/assets/5876851/5094459/f8ef241a-6f15-11e4-9c2d-87b4b80b45af.png)

The last new thing is a Vehicle Summary page in Setup. This is a work in progress and will go through iterations with the UI Designer and will fill out more as each new Setup component is implemented. This is also where Advanced Config not lives as the All Parameters tab for this page.

![screen shot 2014-11-17 at 10 40 36 am](https://cloud.githubusercontent.com/assets/5876851/5094476/1a507b7c-6f16-11e4-8587-0d2c5c104fcb.png)