mavlink/qgroundcontrol — pull request #1141 by DonLakeFlyer (2014-12-24 00:05:13+00:00)
Title: Fact controls

Major change is the addition of two new QML controls which work with the FactSystem: FactLabel and FactTextField. They work just like there QML counterparts except they support the QGC palette and you can connect them directly to facts.

Example usage:
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0

Rectangle {
QGCPalette { id: palette; colorGroup: QGCPalette.Active }

width: 400
height: 400
color: palette.window

Column {
Label { text: "Return to Land Altitude"; color: palette.windowText }
FactLabel { fact: autopilot.parameters["RTL_RETURN_ALT"] }
FactTextField { fact: autopilot.parameters["RTL_RETURN_ALT"] }
}
}

In the above example when the user changes the value in FactTextField and hits Enter or tabs out, the parameter will automatically be updated on the board with the users value.

There is also work in this pull to further implement meta data associated with Facts. This will eventually automatically validate a FactTextField against parameter meta data to prevent incorrect values.