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
76077ac5
Commit
76077ac5
authored
Oct 12, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1970 from DonLakeFlyer/Tablet
Tablet usability fixes
parents
696643ab
e5a698a7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
213 additions
and
205 deletions
+213
-205
PowerComponent.qml
src/AutoPilotPlugins/PX4/PowerComponent.qml
+207
-200
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+1
-1
QGCButton.qml
src/QmlControls/QGCButton.qml
+1
-1
QGCCheckBox.qml
src/QmlControls/QGCCheckBox.qml
+1
-1
QGCComboBox.qml
src/QmlControls/QGCComboBox.qml
+1
-1
QGCRadioButton.qml
src/QmlControls/QGCRadioButton.qml
+1
-1
QGCTextField.qml
src/QmlControls/QGCTextField.qml
+1
-0
No files found.
src/AutoPilotPlugins/PX4/PowerComponent.qml
View file @
76077ac5
...
...
@@ -104,253 +104,260 @@ QGCView {
id
:
panel
anchors.fill
:
parent
Flickable
{
anchors.fill
:
parent
flickableDirection
:
Flickable
.
VerticalFlick
contentHeight
:
innerColumn
.
height
Column
{
id
:
innerColumn
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
text
:
"
POWER CONFIG
"
font.pixelSize
:
ScreenTools
.
largeFontPixelSize
}
Column
{
anchors.fill
:
parent
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
text
:
"
POWER CONFIG
"
font.pixelSize
:
ScreenTools
.
largeFontPixelSize
}
QGCLabel
{
text
:
"
Battery
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
}
QGCLabel
{
text
:
"
Battery
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
}
Rectangle
{
width
:
parent
.
width
height
:
voltageCol
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
palette
.
windowShade
Rectangle
{
width
:
parent
.
width
height
:
voltageCol
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
palette
.
windowShade
Column
{
id
:
voltageCol
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
Column
{
id
:
voltageCol
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
property
real
firstColumnWidth
:
Math
.
max
(
Math
.
max
(
cellsLabel
.
contentWidth
,
battHighLabel
.
contentWidth
),
battLowLabel
.
contentWidth
)
+
ScreenTools
.
defaultFontPixelWidth
property
real
firstColumnWidth
:
Math
.
max
(
Math
.
max
(
cellsLabel
.
contentWidth
,
battHighLabel
.
contentWidth
),
battLowLabel
.
contentWidth
)
+
ScreenTools
.
defaultFontPixelWidth
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
id
:
cellsLabel
text
:
"
Number of Cells (in Series)
"
anchors.baseline
:
cellsField
.
baseline
}
QGCLabel
{
id
:
cellsLabel
text
:
"
Number of Cells (in Series)
"
anchors.baseline
:
cellsField
.
baseline
FactTextField
{
id
:
cellsField
x
:
voltageCol
.
firstColumnWidth
width
:
textEditWidth
fact
:
battNumCells
showUnits
:
true
}
}
FactTextField
{
id
:
cellsField
x
:
voltageCol
.
firstColumnWidth
width
:
textEditWidth
fact
:
battNumCells
showUnits
:
true
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
id
:
battHighLabel
text
:
"
Full Voltage (per cell)
"
anchors.baseline
:
battHighField
.
baseline
}
FactTextField
{
id
:
battHighField
x
:
voltageCol
.
firstColumnWidth
width
:
textEditWidth
fact
:
battHighVolt
showUnits
:
true
}
}
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
id
:
battHigh
Label
text
:
"
Full
Voltage (per cell)
"
anchors.baseline
:
battHigh
Field
.
baseline
QGCLabel
{
id
:
battLow
Label
text
:
"
Empty
Voltage (per cell)
"
anchors.baseline
:
battLow
Field
.
baseline
}
FactTextField
{
id
:
battHighField
x
:
voltageCol
.
firstColumnWidth
width
:
textEditWidth
fact
:
battHighVolt
showUnits
:
true
FactTextField
{
id
:
battLowField
x
:
voltageCol
.
firstColumnWidth
width
:
textEditWidth
fact
:
battLowVolt
showUnits
:
true
}
}
}
// Column
QGCColoredImage
{
id
:
batteryImage
anchors.verticalCenter
:
voltageCol
.
verticalCenter
x
:
voltageCol
.
firstColumnWidth
+
textEditWidth
+
(
ScreenTools
.
defaultFontPixelWidth
*
3
)
width
:
height
*
0.75
height
:
voltageCol
.
height
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
color
:
palette
.
button
cache
:
false
source
:
getBatteryImage
();
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
Column
{
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
2
anchors.left
:
batteryImage
.
right
anchors.verticalCenter
:
voltageCol
.
verticalCenter
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
id
:
battLowLabel
text
:
"
Empty Voltage (per cell)
"
anchors.baseline
:
battLowField
.
baseline
text
:
"
Battery Max:
"
+
(
battNumCells
.
value
*
battHighVolt
.
value
).
toFixed
(
1
)
+
'
V
'
}
FactTextField
{
id
:
battLowField
x
:
voltageCol
.
firstColumnWidth
width
:
textEditWidth
fact
:
battLowVolt
showUnits
:
true
QGCLabel
{
text
:
"
Battery Min:
"
+
(
battNumCells
.
value
*
battLowVolt
.
value
).
toFixed
(
1
)
+
'
V
'
}
}
}
// Column
QGCColoredImage
{
id
:
batteryImage
anchors.verticalCenter
:
voltageCol
.
verticalCenter
x
:
voltageCol
.
firstColumnWidth
+
textEditWidth
+
(
ScreenTools
.
defaultFontPixelWidth
*
3
)
width
:
height
*
0.75
height
:
voltageCol
.
height
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
color
:
palette
.
button
cache
:
false
source
:
getBatteryImage
();
}
// Rectangle - Battery settings
QGCLabel
{
text
:
"
ESC Calibration
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
}
Column
{
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
*
2
anchors.left
:
batteryImage
.
right
anchors.verticalCenter
:
voltageCol
.
verticalCenter
spacing
:
ScreenTools
.
defaultFontPixelHeight
Rectangle
{
width
:
parent
.
width
height
:
escCalColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
palette
.
windowShade
QGCLabel
{
text
:
"
Battery Max:
"
+
(
battNumCells
.
value
*
battHighVolt
.
value
).
toFixed
(
1
)
+
'
V
'
}
Column
{
id
:
escCalColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
"
Battery Min:
"
+
(
battNumCells
.
value
*
battLowVolt
.
value
).
toFixed
(
1
)
+
'
V
'
}
}
}
// Rectangle - Battery settings
QGCLabel
{
text
:
"
ESC Calibration
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
}
Rectangle
{
width
:
parent
.
width
height
:
escCalColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
palette
.
windowShade
Column
{
id
:
escCalColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
color
:
palette
.
warningText
text
:
"
<font color=
\"
yellow
\"
>WARNING: Propellers must be removed from vehicle prior to performing ESC calibration.</font>
"
}
QGCLabel
{
color
:
palette
.
warningText
text
:
"
<font color=
\"
yellow
\"
>WARNING: Propellers must be removed from vehicle prior to performing ESC calibration.</font>
"
}
QGCLabel
{
text
:
"
You must use USB connection for this operation.
"
}
QGCLabel
{
text
:
"
You must use USB connection for this operation.
"
}
QGCButton
{
text
:
"
Calibrate
"
onClicked
:
controller
.
calibrateEsc
()
QGCButton
{
text
:
"
Calibrate
"
onClicked
:
controller
.
calibrateEsc
()
}
}
}
}
QGCLabel
{
text
:
"
UAVCAN ESC Configuration
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
}
Rectangle
{
width
:
parent
.
width
height
:
uavCanEscCalColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
palette
.
windowShade
Column
{
id
:
uavCanEscCalColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
color
:
palette
.
warningText
text
:
"
<font color=
\"
yellow
\"
>WARNING: Propellers must be removed from vehicle prior to performing UAVCAN ESC configuration.</font>
"
}
QGCLabel
{
text
:
"
You must use USB connection for this operation.
"
}
QGCLabel
{
text
:
"
UAVCAN ESC Configuration
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
}
QGCButton
{
text
:
"
Start Configuration
"
onClicked
:
controller
.
busConfigureActuators
()
}
Rectangle
{
width
:
parent
.
width
height
:
uavCanEscCalColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
palette
.
windowShade
QGCButton
{
text
:
"
End Configuration
"
onClicked
:
controller
.
StopBusConfigureActuators
()
}
}
}
QGCCheckBox
{
id
:
showAdvanced
text
:
"
Show Advanced Settings
"
}
QGCLabel
{
text
:
"
Advanced Power Settings
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
visible
:
showAdvanced
.
checked
}
Rectangle
{
id
:
batteryRectangle
width
:
parent
.
width
height
:
advBatteryColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
palette
.
windowShade
visible
:
showAdvanced
.
checked
Column
{
id
:
advBatteryColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
Column
{
id
:
uavCanEscCalColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
"
Voltage Drop on Full Load (per cell)
"
anchors.baseline
:
battDropField
.
baseline
color
:
palette
.
warningText
text
:
"
<font color=
\"
yellow
\"
>WARNING: Propellers must be removed from vehicle prior to performing UAVCAN ESC configuration.</font>
"
}
FactTextField
{
id
:
battDropField
width
:
textEditWidth
fact
:
battVoltLoadDrop
showUnits
:
true
QGCLabel
{
text
:
"
You must use USB connection for this operation.
"
}
}
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
text
:
"
Batteries show less voltage at high throttle. Enter the difference in Volts between idle throttle and full
"
+
"
throttle, divided by the number of battery cells. Leave at the default if unsure.
"
+
"
<font color=
\"
yellow
\"
>If this value is set too high, the battery might be deep discharged and damaged.</font>
"
QGCButton
{
text
:
"
Start Configuration
"
onClicked
:
controller
.
busConfigureActuators
()
}
QGCButton
{
text
:
"
End Configuration
"
onClicked
:
controller
.
StopBusConfigureActuators
()
}
}
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCCheckBox
{
id
:
showAdvanced
text
:
"
Show Advanced Settings
"
}
QGCLabel
{
text
:
"
Compensated Minimum Voltage:
"
QGCLabel
{
text
:
"
Advanced Power Settings
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
visible
:
showAdvanced
.
checked
}
Rectangle
{
id
:
batteryRectangle
width
:
parent
.
width
height
:
advBatteryColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
palette
.
windowShade
visible
:
showAdvanced
.
checked
Column
{
id
:
advBatteryColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
"
Voltage Drop on Full Load (per cell)
"
anchors.baseline
:
battDropField
.
baseline
}
FactTextField
{
id
:
battDropField
width
:
textEditWidth
fact
:
battVoltLoadDrop
showUnits
:
true
}
}
QGCLabel
{
text
:
((
battNumCells
.
value
*
battLowVolt
.
value
)
-
(
battNumCells
.
value
*
battVoltLoadDrop
.
value
)).
toFixed
(
1
)
+
'
V
'
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
text
:
"
Batteries show less voltage at high throttle. Enter the difference in Volts between idle throttle and full
"
+
"
throttle, divided by the number of battery cells. Leave at the default if unsure.
"
+
"
<font color=
\"
yellow
\"
>If this value is set too high, the battery might be deep discharged and damaged.</font>
"
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
"
Compensated Minimum Voltage:
"
}
QGCLabel
{
text
:
((
battNumCells
.
value
*
battLowVolt
.
value
)
-
(
battNumCells
.
value
*
battVoltLoadDrop
.
value
)).
toFixed
(
1
)
+
'
V
'
}
}
}
}
}
//
Rectangle - Advanced power settings
}
//
Column
}
// Rectangle - Advanced power settings
}
//
Column
}
//
Flickable
}
// QGCViewPanel
}
// QGCView
src/MissionEditor/MissionEditor.qml
View file @
76077ac5
...
...
@@ -108,7 +108,7 @@ QGCView {
Rectangle
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.bottom
:
parent
.
bottom
width
:
parent
.
width
/
3
width
:
parent
.
width
*
0.75
height
:
syncNeededText
.
height
+
(
ScreenTools
.
defaultFontPixelWidth
*
2
)
border.width
:
1
border.color
:
"
white
"
...
...
src/QmlControls/QGCButton.qml
View file @
76077ac5
...
...
@@ -64,7 +64,7 @@ Button {
background
:
Item
{
property
bool
down
:
control
.
pressed
||
(
control
.
checkable
&&
control
.
checked
)
implicitWidth
:
Math
.
round
(
TextSingleton
.
implicitHeight
*
4.5
)
implicitHeight
:
Math
.
max
(
25
,
Math
.
round
(
TextSingleton
.
implicitHeight
*
1.2
))
implicitHeight
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
Math
.
max
(
25
,
Math
.
round
(
TextSingleton
.
implicitHeight
*
1.2
))
Rectangle
{
anchors.fill
:
parent
...
...
src/QmlControls/QGCCheckBox.qml
View file @
76077ac5
...
...
@@ -11,7 +11,7 @@ CheckBox {
style
:
CheckBoxStyle
{
label
:
Item
{
implicitWidth
:
text
.
implicitWidth
+
2
implicitHeight
:
text
.
implicitHeight
implicitHeight
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
text
.
implicitHeight
baselineOffset
:
text
.
baselineOffset
Rectangle
{
anchors.fill
:
text
...
...
src/QmlControls/QGCComboBox.qml
View file @
76077ac5
...
...
@@ -18,7 +18,7 @@ ComboBox {
background
:
Item
{
implicitWidth
:
Math
.
round
(
TextSingleton
.
implicitHeight
*
4.5
)
implicitHeight
:
Math
.
max
(
25
,
Math
.
round
(
TextSingleton
.
implicitHeight
*
1.2
))
implicitHeight
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
Math
.
max
(
25
,
Math
.
round
(
TextSingleton
.
implicitHeight
*
1.2
))
Rectangle
{
anchors.fill
:
parent
...
...
src/QmlControls/QGCRadioButton.qml
View file @
76077ac5
...
...
@@ -11,7 +11,7 @@ RadioButton {
style
:
RadioButtonStyle
{
label
:
Item
{
implicitWidth
:
text
.
implicitWidth
+
2
implicitHeight
:
text
.
implicitHeight
implicitHeight
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
text
.
implicitHeight
baselineOffset
:
text
.
y
+
text
.
baselineOffset
Rectangle
{
anchors.fill
:
text
...
...
src/QmlControls/QGCTextField.qml
View file @
76077ac5
...
...
@@ -12,6 +12,7 @@ TextField {
property
var
__qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
textColor
:
__qgcPal
.
textFieldText
height
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
implicitHeight
Label
{
id
:
unitsLabelWidthGenerator
...
...
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