mavlink/qgroundcontrol — pull request #255 by malcom2073 (2013-04-25 13:40:22+00:00)
Title: Mp merge

This pull is for the new configuration layout and file handling. It also contains a few fixes for communicating with APM2.5, due to a bug in how it handles MavLink parameters.

The new configuration screen can be seen here:
http://www.mikesshop.net/QGroundControl/NewConfig/
It has the same Radio/Calibration tabs, and it now has a General and Advanced tab. The other tabs are automatically generated.

On connecting to a MAV, QGC now looks in files/%autopilot%/general/widgets for qgw files, and parses them out for display on the General tab. It parses any directories in files/%autopilot%/general/widgets as new tabs. The same is also done for files/%autopilot%/%airframe%/general/widgets.

Calibration is loaded from both files/%autopilot%/calibration/calibration.qgw and files/%autopilot%/%airframe/calibration/calibration.qgw for display on the Sensor Calibration tab.

There are some changes in the internals of QGW files as well.

New Type: COMBO

QGC_TOOL_WIDGET_ITEMS\17\TYPE=COMBO
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_DESCRIPTION=RC5 Invert
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_PARAMID=RC5_REV
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_COUNT=2
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_VISIBLE_PARAM=RC5_FUNCTION
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_VISIBLE_VAL=7
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_ITEM_0_TEXT=Normal
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_ITEM_0_VAL=1
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_ITEM_1_TEXT=Inverted
QGC_TOOL_WIDGET_ITEMS\17\QGC_PARAM_COMBOBOX_ITEM_1_VAL=-1

Most of the variables are fairly self explanatory. VISIBLE_PARAM and VISIBLE_VAL are used for showing/hiding the combobox, based on if the MavLink param listed in VISIBLE_PARAM is equal to the value in VISIBLE_VAL.

Sliders can also take advantage of VISIBLE_PARAM and VISIBLE_VAL, and do in the camera gimbal settings.

New Type: TEXT

QGC_TOOL_WIDGET_ITEMS\4\TYPE=TEXT
QGC_TOOL_WIDGET_ITEMS\4\QGC_TEXT_SOURCE=MAV
QGC_TOOL_WIDGET_ITEMS\4\QGC_TEXT_ID=MAG_TEXT
QGC_TOOL_WIDGET_ITEMS\4\QGC_TEXT_TEXT=

SOURCE can be MAV or NONE. If it is NONE, then the text field is set to the value under TEXT. If it is MAV, then it is set to the MavLink status message. Text using MAV is disabled and will not display, until enabled by a command button.

QGC_TOOL_WIDGET_ITEMS\3\QGC_COMMAND_BUTTON_LABEL=MAG_TEXT

This new command button parameter activates the text with the ID MAG_TEXT, so it will then display MavLink status messages. Once a Command Successful is received, the text field then deactivates again. This is used to display calibration instructions.

Calibration "instructions" typically listed on the left hand side of the Sensor Calibration screen, now come from files/%autopilot%/general/calibration/description.txt. This file is in HTML.