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
c2b0c085
Commit
c2b0c085
authored
Jul 25, 2016
by
Don Gagne
Committed by
GitHub
Jul 25, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3829 from birchera/dummy_mission_stats
[Mission stats] Dummy mission stats
parents
182f6b1a
f49da92e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
2 deletions
+93
-2
MissionItemStatus.qml
src/MissionEditor/MissionItemStatus.qml
+93
-2
No files found.
src/MissionEditor/MissionItemStatus.qml
View file @
c2b0c085
...
...
@@ -17,12 +17,14 @@ import QGroundControl.Palette 1.0
import
QGroundControl
1.0
Rectangle
{
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
currentMissionItem
///< Mission item to display status for
property
var
missionItems
///< List of all available mission items
property
real
expandedWidth
///< Width of control when expanded
width
:
_expanded
?
expandedWidth
:
_collapsedWidth
height
:
valueGrid
.
height
+
(
_margins
*
2
)
height
:
Math
.
max
(
valueGrid
.
height
,
valueMissionGrid
.
height
)
+
(
_margins
*
2
)
radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
color
:
qgcPal
.
window
opacity
:
0.80
...
...
@@ -38,10 +40,23 @@ Rectangle {
property
real
_gradientPercent
:
isNaN
(
_gradient
)
?
0
:
_gradient
*
100
property
real
_azimuth
:
_statusValid
?
_currentMissionItem
.
azimuth
:
-
1
property
bool
_statusValid
:
currentMissionItem
!=
undefined
property
bool
_vehicleValid
:
_activeVehicle
!=
undefined
property
bool
_missionValid
:
missionItems
!=
undefined
property
bool
_currentSurvey
:
_statusValid
?
currentMissionItem
.
commandName
==
"
Survey
"
:
false
property
string
_distanceText
:
_statusValid
?
QGroundControl
.
metersToAppSettingsDistanceUnits
(
_distance
).
toFixed
(
2
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
:
"
"
property
string
_altText
:
_statusValid
?
QGroundControl
.
metersToAppSettingsDistanceUnits
(
_altDifference
).
toFixed
(
2
)
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
:
"
"
property
string
_gradientText
:
_statusValid
?
_gradientPercent
.
toFixed
(
0
)
+
"
%
"
:
"
"
property
string
_azimuthText
:
_statusValid
?
Math
.
round
(
_azimuth
)
:
"
"
property
string
_numberShotsText
:
_currentSurvey
?
"
783
"
:
"
"
property
string
_coveredAreaText
:
_currentSurvey
?
"
87ha / 217acr
"
:
"
"
property
string
_totalDistanceText
:
_missionValid
?
"
30.91
"
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
:
"
"
property
string
_totalTimeText
:
_missionValid
?
"
34min 23s
"
:
"
"
property
string
_maxTelemDistText
:
_missionValid
?
"
5.23
"
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
:
"
"
property
bool
_isVTOL
:
_vehicleValid
?
_activeVehicle
.
vtol
:
false
property
string
_hoverDistanceText
:
_missionValid
?
"
0.47
"
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
:
"
"
property
string
_cruiseDistanceText
:
_missionValid
?
"
30.44
"
+
"
"
+
QGroundControl
.
appSettingsDistanceUnitsString
:
"
"
property
string
_hoverTimeText
:
_missionValid
?
"
4min 02s
"
:
"
"
property
string
_cruiseTimeText
:
_missionValid
?
"
34min 21s
"
:
"
"
readonly
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
...
...
@@ -61,6 +76,9 @@ Rectangle {
columnSpacing
:
_margins
anchors.verticalCenter
:
parent
.
verticalCenter
QGCLabel
{
text
:
qsTr
(
"
Selected waypoint
"
)
}
QGCLabel
{
text
:
qsTr
(
"
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Distance:
"
)
}
QGCLabel
{
text
:
_distanceText
}
...
...
@@ -72,6 +90,24 @@ Rectangle {
QGCLabel
{
text
:
qsTr
(
"
Azimuth:
"
)
}
QGCLabel
{
text
:
_azimuthText
}
QGCLabel
{
text
:
qsTr
(
"
# shots:
"
)
visible
:
_currentSurvey
}
QGCLabel
{
text
:
_numberShotsText
visible
:
_currentSurvey
}
QGCLabel
{
text
:
qsTr
(
"
Covered area:
"
)
visible
:
_currentSurvey
}
QGCLabel
{
text
:
_coveredAreaText
visible
:
_currentSurvey
}
}
ListView
{
...
...
@@ -85,7 +121,7 @@ Rectangle {
orientation
:
ListView
.
Horizontal
spacing
:
0
visible
:
_expanded
width
:
parent
.
width
-
valueGrid
.
width
-
(
_margins
*
2
)
width
:
parent
.
width
-
valueGrid
.
width
-
valueMissionGrid
.
width
-
(
_margins
*
2
)
clip
:
true
currentIndex
:
_currentMissionIndex
...
...
@@ -110,5 +146,60 @@ Rectangle {
}
}
}
Grid
{
id
:
valueMissionGrid
columns
:
2
columnSpacing
:
_margins
anchors.verticalCenter
:
parent
.
verticalCenter
QGCLabel
{
text
:
qsTr
(
"
Total mission [WIP]
"
)
}
QGCLabel
{
text
:
qsTr
(
"
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Distance:
"
)
}
QGCLabel
{
text
:
_totalDistanceText
}
QGCLabel
{
text
:
qsTr
(
"
Time:
"
)
}
QGCLabel
{
text
:
_totalTimeText
}
QGCLabel
{
text
:
qsTr
(
"
Max telem dist:
"
)
}
QGCLabel
{
text
:
_maxTelemDistText
}
QGCLabel
{
text
:
qsTr
(
"
Hover distance:
"
)
visible
:
_isVTOL
}
QGCLabel
{
text
:
_hoverDistanceText
visible
:
_isVTOL
}
QGCLabel
{
text
:
qsTr
(
"
Cruise distance:
"
)
visible
:
_isVTOL
}
QGCLabel
{
text
:
_cruiseDistanceText
visible
:
_isVTOL
}
QGCLabel
{
text
:
qsTr
(
"
Hover time:
"
)
visible
:
_isVTOL
}
QGCLabel
{
text
:
_hoverTimeText
visible
:
_isVTOL
}
QGCLabel
{
text
:
qsTr
(
"
Cruise time:
"
)
visible
:
_isVTOL
}
QGCLabel
{
text
:
_cruiseTimeText
visible
:
_isVTOL
}
}
}
}
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