@ -42,6 +42,7 @@ QGCView {
@@ -42,6 +42,7 @@ QGCView {
QGCPalette { id: qgcPal ; colorGroupEnabled: panel . enabled }
readonly property string dialogTitle: "Radio Config"
readonly property real labelToMonitorMargin: defaultTextWidth * 3
property bool controllerCompleted: false
property bool controllerAndViewReady: false
@ -49,11 +50,15 @@ QGCView {
@@ -49,11 +50,15 @@ QGCView {
function updateChannelCount ( )
{
if ( controllerAndViewReady ) {
/ *
FIXME: Turned off for now , since it prevents binding . Need to restructure to
allow binding and still check channel count
if ( controller . channelCount < controller . minChannelCount ) {
showDialog ( channelCountDialogComponent , "Radio Config" , 50 , 0 )
showDialog ( channelCountDialogComponent , dialogTitle , 50 , 0 )
} else {
hideDialog ( )
}
* /
}
}
@ -90,6 +95,32 @@ QGCView {
@@ -90,6 +95,32 @@ QGCView {
anchors.fill: parent
Component {
id: copyTrimsDialogComponent
QGCViewMessage {
message: "Center your sticks and move throttle all the way down, then press Ok to copy trims. After pressing Ok, reset the trims on your radio back to zero."
function accept ( ) {
hideDialog ( )
controller . copyTrims ( )
}
}
}
Component {
id: zeroTrimsDialogComponent
QGCViewMessage {
message: "Before calibrating you should zero all your trims and subtrims. Click Ok to start Calibration."
function accept ( ) {
hideDialog ( )
controller . nextButtonClicked ( )
}
}
}
Component {
id: channelCountDialogComponent
QGCViewMessage {
@ -245,22 +276,6 @@ QGCView {
@@ -245,22 +276,6 @@ QGCView {
anchors.right: columnSpacer . left
spacing: 10
Row {
spacing: 10
QGCLabel {
anchors.baseline: bindButton . baseline
text: "Place Spektrum satellite receiver in bind mode:"
}
QGCButton {
id: bindButton
text: "Spektrum Bind"
onClicked: showDialog ( spektrumBindDialogComponent , "Radio Config" , 50 , StandardButton . Ok | StandardButton . Cancel )
}
}
/ / A t t i t u d e C o n t r o l s
Column {
width: parent . width
@ -412,7 +427,7 @@ QGCView {
@@ -412,7 +427,7 @@ QGCView {
primary: true
text: "Calibrate"
onClicked: controller . nextButtonClicked ( )
onClicked: showDialog ( zeroTrimsDialogComponent , dialogTitle , 50 , StandardButton . Ok | StandardButton . Cancel )
}
} / / R o w - B u t t o n s
@ -422,6 +437,35 @@ QGCView {
@@ -422,6 +437,35 @@ QGCView {
width: parent . width
wrapMode: Text . WordWrap
}
Item {
width: 10
height: defaultTextHeight * 2
}
QGCLabel { text: "Additional Radio setup:" }
Row {
spacing: 10
QGCLabel {
anchors.baseline: bindButton . baseline
text: "Place Spektrum satellite receiver in bind mode:"
}
QGCButton {
id: bindButton
text: "Spektrum Bind"
onClicked: showDialog ( spektrumBindDialogComponent , dialogTitle , 50 , StandardButton . Ok | StandardButton . Cancel )
}
}
QGCButton {
text: "Copy Trims"
onClicked: showDialog ( copyTrimsDialogComponent , dialogTitle , 50 , StandardButton . Ok | StandardButton . Cancel )
}
} / / C o l u m n - L e f t C o l u m n
Item {