|
|
|
@ -7,11 +7,6 @@
@@ -7,11 +7,6 @@
|
|
|
|
|
* |
|
|
|
|
****************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @file |
|
|
|
|
/// @brief Battery, propeller and magnetometer settings |
|
|
|
|
/// @author Gus Grubba <mavlink@grubba.com> |
|
|
|
|
|
|
|
|
|
import QtQuick 2.2 |
|
|
|
|
import QtQuick.Controls 1.2 |
|
|
|
|
import QtQuick.Dialogs 1.2 |
|
|
|
@ -30,10 +25,14 @@ SetupPage {
@@ -30,10 +25,14 @@ SetupPage {
|
|
|
|
|
Component { |
|
|
|
|
id: pageComponent |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
Item { |
|
|
|
|
width: Math.max(availableWidth, innerColumn.width) |
|
|
|
|
height: innerColumn.height |
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
id: innerColumn |
|
|
|
|
width: availableWidth |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
|
|
|
|
|
|
property int textEditWidth: ScreenTools.defaultFontPixelWidth * 8 |
|
|
|
|
|
|
|
|
@ -216,22 +215,12 @@ SetupPage {
@@ -216,22 +215,12 @@ SetupPage {
|
|
|
|
|
} // QGCViewDialog |
|
|
|
|
} // Component - calcAmpsPerVoltDlgComponent |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Battery") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: parent.width |
|
|
|
|
height: batteryGrid.height + ScreenTools.defaultFontPixelHeight |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
QGCGroupBox { |
|
|
|
|
id: batteryGroup |
|
|
|
|
title: qsTr("Battery") |
|
|
|
|
|
|
|
|
|
GridLayout { |
|
|
|
|
id: batteryGrid |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
columns: 5 |
|
|
|
|
columnSpacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
@ -356,31 +345,23 @@ SetupPage {
@@ -356,31 +345,23 @@ SetupPage {
|
|
|
|
|
"Click the Calculate button for help with calculating a new value." |
|
|
|
|
} |
|
|
|
|
} // Grid |
|
|
|
|
} // Rectangle - Battery settings |
|
|
|
|
} // QGCGroupBox - Battery settings |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("ESC PWM Minimum and Maximum Calibration") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: parent.width |
|
|
|
|
height: escCalColumn.height + ScreenTools.defaultFontPixelHeight |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
QGCGroupBox { |
|
|
|
|
anchors.left: batteryGroup.left |
|
|
|
|
anchors.right: batteryGroup.right |
|
|
|
|
title: qsTr("ESC PWM Minimum and Maximum Calibration") |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id : escCalColumn |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
ColumnLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: parent.width |
|
|
|
|
color: qgcPal.warningText |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
text: qsTr("WARNING: Propellers must be removed from vehicle prior to performing ESC calibration.") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
@ -401,23 +382,14 @@ SetupPage {
@@ -401,23 +382,14 @@ SetupPage {
|
|
|
|
|
checked: uavcanEnable.rawValue != 0 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("UAVCAN Bus Configuration") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
visible: showUAVCAN.checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: parent.width |
|
|
|
|
height: uavCanConfigRow.height + ScreenTools.defaultFontPixelHeight |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
QGCGroupBox { |
|
|
|
|
anchors.left: batteryGroup.left |
|
|
|
|
anchors.right: batteryGroup.right |
|
|
|
|
title: qsTr("UAVCAN Bus Configuration") |
|
|
|
|
visible: showUAVCAN.checked |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
id: uavCanConfigRow |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
@ -434,44 +406,34 @@ SetupPage {
@@ -434,44 +406,34 @@ SetupPage {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("UAVCAN Motor Index and Direction Assignment") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
visible: showUAVCAN.checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: parent.width |
|
|
|
|
height: uavCanEscCalColumn.height + ScreenTools.defaultFontPixelHeight |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
QGCGroupBox { |
|
|
|
|
anchors.left: batteryGroup.left |
|
|
|
|
anchors.right: batteryGroup.right |
|
|
|
|
title: qsTr("UAVCAN Motor Index and Direction Assignment") |
|
|
|
|
visible: showUAVCAN.checked |
|
|
|
|
enabled: uavcanEnabledCheckBox.checked |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: uavCanEscCalColumn |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
ColumnLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: parent.width |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
color: qgcPal.warningText |
|
|
|
|
text: qsTr("WARNING: Propellers must be removed from vehicle prior to performing UAVCAN ESC configuration.") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: parent.width |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
text: qsTr("ESC parameters will only be accessible in the editor after assignment.") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: parent.width |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
text: qsTr("Start the process, then turn each motor into its turn direction, in the order of their motor indices.") |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
@ -493,25 +455,15 @@ SetupPage {
@@ -493,25 +455,15 @@ SetupPage {
|
|
|
|
|
text: qsTr("Show Advanced Settings") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Advanced Power Settings") |
|
|
|
|
font.family: ScreenTools.demiboldFontFamily |
|
|
|
|
visible: showAdvanced.checked |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
id: batteryRectangle |
|
|
|
|
width: parent.width |
|
|
|
|
height: advBatteryColumn.height + ScreenTools.defaultFontPixelHeight |
|
|
|
|
color: qgcPal.windowShade |
|
|
|
|
QGCGroupBox { |
|
|
|
|
anchors.left: batteryGroup.left |
|
|
|
|
anchors.right: batteryGroup.right |
|
|
|
|
title: qsTr("Advanced Power Settings") |
|
|
|
|
visible: showAdvanced.checked |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: advBatteryColumn |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
ColumnLayout { |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
@ -531,11 +483,11 @@ SetupPage {
@@ -531,11 +483,11 @@ SetupPage {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: parent.width |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
text: qsTr("Batteries show less voltage at high throttle. Enter the difference in Volts between idle throttle and full ") + |
|
|
|
|
qsTr("throttle, divided by the number of battery cells. Leave at the default if unsure. ") + |
|
|
|
|
highlightPrefix + qsTr("If this value is set too high, the battery might be deep discharged and damaged.") + highlightSuffix |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
@ -549,8 +501,9 @@ SetupPage {
@@ -549,8 +501,9 @@ SetupPage {
|
|
|
|
|
text: ((battNumCells.value * battLowVolt.value) - (battNumCells.value * battVoltLoadDrop.value)).toFixed(1) + qsTr(" V") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} // Rectangle - Advanced power settings |
|
|
|
|
} // Column |
|
|
|
|
} // QGCGroupBox - Advanced power settings |
|
|
|
|
} // Column |
|
|
|
|
} // Item |
|
|
|
|
} // Component |
|
|
|
|
} // SetupPage |
|
|
|
|