Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
1048dacc
Commit
1048dacc
authored
Feb 27, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New QGCGroupBox control
parent
5c0dfa95
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
443 additions
and
456 deletions
+443
-456
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
PowerComponent.qml
src/AutoPilotPlugins/PX4/PowerComponent.qml
+409
-456
QGCGroupBox.qml
src/QmlControls/QGCGroupBox.qml
+32
-0
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+1
-0
No files found.
qgroundcontrol.qrc
View file @
1048dacc
...
...
@@ -79,6 +79,7 @@
<file alias="QGroundControl/Controls/QGCFlickable.qml">src/QmlControls/QGCFlickable.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableHorizontalIndicator.qml">src/QmlControls/QGCFlickableHorizontalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableVerticalIndicator.qml">src/QmlControls/QGCFlickableVerticalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCGroupBox.qml">src/QmlControls/QGCGroupBox.qml</file>
<file alias="QGroundControl/Controls/QGCLabel.qml">src/QmlControls/QGCLabel.qml</file>
<file alias="QGroundControl/Controls/QGCListView.qml">src/QmlControls/QGCListView.qml</file>
<file alias="QGroundControl/Controls/QGCMapLabel.qml">src/QmlControls/QGCMapLabel.qml</file>
...
...
src/AutoPilotPlugins/PX4/PowerComponent.qml
View file @
1048dacc
...
...
@@ -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 {
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 {
}
// 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 {
"
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 {
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 {
}
}
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 {
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 {
}
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 {
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
src/QmlControls/QGCGroupBox.qml
0 → 100644
View file @
1048dacc
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.2
import
QtQuick
.
Controls
2.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
ScreenTools
1.0
GroupBox
{
id
:
control
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
background
:
Rectangle
{
y
:
control
.
topPadding
-
control
.
padding
width
:
parent
.
width
height
:
parent
.
height
-
control
.
topPadding
+
control
.
padding
color
:
qgcPal
.
windowShade
}
label
:
QGCLabel
{
width
:
control
.
availableWidth
text
:
control
.
title
}
}
src/QmlControls/QGroundControl.Controls.qmldir
View file @
1048dacc
...
...
@@ -31,6 +31,7 @@ QGCCheckBox 1.0 QGCCheckBox.qml
QGCColoredImage 1.0 QGCColoredImage.qml
QGCComboBox 1.0 QGCComboBox.qml
QGCFlickable 1.0 QGCFlickable.qml
QGCGroupBox 1.0 QGCGroupBox.qml
QGCLabel 1.0 QGCLabel.qml
QGCListView 1.0 QGCListView.qml
QGCMapLabel 1.0 QGCMapLabel.qml
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment