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
b42742ab
Commit
b42742ab
authored
Jan 20, 2020
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugs fixed
parent
a4e86d1e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
84 additions
and
17 deletions
+84
-17
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+1
-0
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+6
-5
FlightDisplayWimaMenu.qml
src/FlightDisplay/FlightDisplayWimaMenu.qml
+19
-7
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+3
-1
PlanMapItems.qml
src/FlightMap/MapItems/PlanMapItems.qml
+3
-1
WimaPlanMapItems.qml
src/FlightMap/MapItems/WimaPlanMapItems.qml
+32
-0
MissionController.h
src/MissionManager/MissionController.h
+1
-0
WimaMissionItemMapVisual.qml
src/PlanView/WimaMissionItemMapVisual.qml
+1
-1
WimaController.cc
src/Wima/WimaController.cc
+2
-1
main.cc
src/main.cc
+13
-0
MainWindowInner.qml
src/ui/MainWindowInner.qml
+3
-1
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
b42742ab
...
...
@@ -760,6 +760,7 @@ QGCView {
GuidedActionsController
{
id
:
guidedActionsController
wimaController
:
wimaController
wimaMenu
:
wimaMenu
missionController
:
_missionController
confirmDialog
:
guidedActionConfirm
actionList
:
guidedActionList
...
...
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
b42742ab
...
...
@@ -216,17 +216,18 @@ FlightMap {
}
// Add mission items generated by wima planer to the map
// all Items
WimaPlanMapItems
{
map
:
flightMap
largeMapView
:
_mainIsMap
missionItems
:
wimaController
.
missionItems
path
:
wimaController
.
waypointPath
showItems
:
_wimaEnabled
&&
_showAllWimaItems
zOrderWP
:
QGroundControl
.
zOrderWaypointIndicators
-
2
zOrderLines
:
QGroundControl
.
zOrderWaypointLines
-
2
color
:
"
#B4808080
"
// gray with alpha 0.7
zOrderWP
:
QGroundControl
.
zOrderWaypointIndicators
-
3
zOrderLines
:
QGroundControl
.
zOrderWaypointLines
-
1
color
:
"
gray
"
}
// current Items
WimaPlanMapItems
{
map
:
flightMap
largeMapView
:
_mainIsMap
...
...
@@ -234,7 +235,7 @@ FlightMap {
path
:
wimaController
.
currentWaypointPath
showItems
:
_wimaEnabled
&&
_showCurrentWimaItems
zOrderWP
:
QGroundControl
.
zOrderWaypointIndicators
-
1
zOrderLines
:
QGroundControl
.
zOrderWaypoint
Lines
-
1
zOrderLines
:
QGroundControl
.
zOrderWaypoint
Indicators
-
2
color
:
"
green
"
// gray with alpha 0.7
}
...
...
src/FlightDisplay/FlightDisplayWimaMenu.qml
View file @
b42742ab
...
...
@@ -27,6 +27,7 @@ Item {
property
var
wimaController
// must be provided by the user
property
var
planMasterController
// must be provided by the user
readonly
property
alias
missionReadyForStart
:
_private
.
missionReadyForStart
property
bool
_controllerValid
:
planMasterController
!==
undefined
property
real
_controllerProgressPct
:
_controllerValid
?
planMasterController
.
missionController
.
progressPct
:
0
...
...
@@ -34,14 +35,21 @@ Item {
signal
initSmartRTL
();
Item
{
id
:
_private
property
bool
missionReadyForStart
:
true
}
// Progress bar visibility
on_ControllerProgressPctChanged
:
{
if
(
_controllerProgressPct
===
1
)
{
uploadCompleteText
.
visible
=
true
progressBar
.
visible
=
false
uploadCompleteText
.
visible
=
true
progressBar
.
visible
=
false
_private
.
missionReadyForStart
=
true
}
else
if
(
_controllerProgressPct
>
0
)
{
progressBar
.
visible
=
true
uploadCompleteText
.
visible
=
false
progressBar
.
visible
=
true
uploadCompleteText
.
visible
=
false
_private
.
missionReadyForStart
=
false
}
}
...
...
@@ -225,7 +233,7 @@ Item {
width
:
parent
.
width
QGCLabel
{
text
:
qsTr
(
"
Phase
Speed
"
)
text
:
qsTr
(
"
Mission
Speed
"
)
Layout.fillWidth
:
true
}
FactTextField
{
...
...
@@ -234,7 +242,7 @@ Item {
}
QGCLabel
{
text
:
qsTr
(
"
A
rrival and Return
Speed
"
)
text
:
qsTr
(
"
A
aR
Speed
"
)
Layout.fillWidth
:
true
}
FactTextField
{
...
...
@@ -298,7 +306,11 @@ Item {
QGCButton
{
id
:
buttonUpload
text
:
qsTr
(
"
Upload
"
)
onClicked
:
wimaController
.
uploadToVehicle
()
onClicked
:
{
if
(
!
planMasterController
.
offline
)
{
wimaController
.
uploadToVehicle
()
}
}
Layout
.
fillWidth
:
true
}
...
...
src/FlightDisplay/GuidedActionsController.qml
View file @
b42742ab
...
...
@@ -28,6 +28,7 @@ Item {
id
:
_root
property
var
wimaController
property
var
wimaMenu
property
var
missionController
property
var
confirmDialog
property
var
actionList
...
...
@@ -120,6 +121,7 @@ Item {
property
bool
showOrbit
:
_guidedActionsEnabled
&&
!
_hideOrbit
&&
_vehicleFlying
&&
_activeVehicle
.
orbitModeSupported
&&
!
_missionActive
property
bool
showLandAbort
:
_guidedActionsEnabled
&&
_vehicleFlying
&&
_activeVehicle
.
fixedWing
&&
_vehicleLanding
property
bool
showGotoLocation
:
_guidedActionsEnabled
&&
_vehicleFlying
property
bool
wimaEnabled
:
wimaController
.
enableWimaController
.
value
// Note: The '_missionItemCount - 2' is a hack to not trigger resume mission when a mission ends with an RTL item
property
bool
showResumeMission
:
_activeVehicle
&&
!
_vehicleArmed
&&
_vehicleWasFlying
&&
_missionAvailable
&&
_resumeMissionIndex
>
0
&&
(
_resumeMissionIndex
<
_missionItemCount
-
2
)
...
...
@@ -130,7 +132,7 @@ Item {
property
bool
_guidedActionsEnabled
:
(
!
ScreenTools
.
isDebug
&&
QGroundControl
.
corePlugin
.
options
.
guidedActionsRequireRCRSSI
&&
_activeVehicle
)
?
_rcRSSIAvailable
:
_activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
string
_flightMode
:
_activeVehicle
?
_activeVehicle
.
flightMode
:
""
property
bool
_missionAvailable
:
missionController
.
containsItems
property
bool
_missionAvailable
:
wimaEnabled
?
wimaMenu
.
missionReadyForStart
:
missionController
.
containsItems
property
bool
_missionActive
:
_activeVehicle
?
_vehicleArmed
&&
(
_vehicleInLandMode
||
_vehicleInRTLMode
||
_vehicleInMissionMode
)
:
false
property
bool
_vehicleArmed
:
_activeVehicle
?
_activeVehicle
.
armed
:
false
property
bool
_vehicleFlying
:
_activeVehicle
?
_activeVehicle
.
flying
:
false
...
...
src/FlightMap/MapItems/PlanMapItems.qml
View file @
b42742ab
...
...
@@ -33,7 +33,9 @@ Item {
// Add the mission item visuals to the map
Repeater
{
model
:
largeMapView
?
_missionController
.
visualItems
:
0
property
bool
show
:
largeMapView
property
var
wimaController
model
:
show
?
_missionController
.
visualItems
:
0
delegate
:
MissionItemMapVisual
{
map
:
_map
...
...
src/FlightMap/MapItems/WimaPlanMapItems.qml
View file @
b42742ab
...
...
@@ -30,8 +30,29 @@ Item {
property
var
_map
:
map
property
var
_missionLineViewComponent
property
var
zoom
:
map
.
zoomLevel
property
bool
showItems
:
true
// onZoomChanged: {
// console.log('zoomLevel')
// console.log(zoom)
// }
function
hideNumber
()
{
if
(
zoom
>
19.5
)
{
return
1
}
else
if
(
zoom
>
19
)
{
return
2
}
else
if
(
zoom
>
17
)
{
return
4
}
else
if
(
zoom
>
14
)
{
return
8
}
else
{
return
-
1
}
}
Component
{
id
:
missionLineViewComponent
...
...
@@ -51,6 +72,17 @@ Item {
map
:
_map
color
:
_root
.
color
zOrder
:
_root
.
zOrderWP
visible
:
isVisible
(
index
)
&&
_root
.
visible
function
isVisible
(
index
)
{
var
num
=
hideNumber
()
if
(
num
>
0
)
{
return
((
index
+
num
)
%
num
)
==
0
?
true
:
false
}
else
{
return
false
}
}
}
}
...
...
src/MissionManager/MissionController.h
View file @
b42742ab
...
...
@@ -101,6 +101,7 @@ public:
Q_PROPERTY
(
QString
corridorScanComplexItemName
READ
corridorScanComplexItemName
CONSTANT
)
Q_PROPERTY
(
QString
structureScanComplexItemName
READ
structureScanComplexItemName
CONSTANT
)
Q_INVOKABLE
void
removeMissionItem
(
int
index
);
/// Add a new simple mission item to the list
...
...
src/PlanView/WimaMissionItemMapVisual.qml
View file @
b42742ab
...
...
@@ -107,7 +107,7 @@ Item {
MissionItemIndicator
{
coordinate
:
_missionItem
.
coordinate
visible
:
_missionItem
.
specifiesCoordinate
visible
:
_missionItem
.
specifiesCoordinate
&&
_root
.
visible
z
:
_root
.
zOrder
missionItem
:
_missionItem
sequenceNumber
:
_missionItem
.
sequenceNumber
...
...
src/Wima/WimaController.cc
View file @
b42742ab
...
...
@@ -970,10 +970,11 @@ void WimaController::checkBatteryLevel()
Vehicle
*
managerVehicle
=
masterController
()
->
managerVehicle
();
WimaSettings
*
wimaSettings
=
qgcApp
()
->
toolbox
()
->
settingsManager
()
->
wimaSettings
();
int
batteryThreshold
=
wimaSettings
->
lowBatteryThreshold
()
->
rawValue
().
toInt
();
bool
enabled
=
_enableWimaController
.
rawValue
().
toBool
();
static
long
attemptCounter
=
0
;
if
(
managerVehicle
!=
nullptr
)
{
if
(
managerVehicle
!=
nullptr
&&
enabled
==
true
)
{
Fact
*
battery1percentRemaining
=
managerVehicle
->
battery1FactGroup
()
->
getFact
(
VehicleBatteryFactGroup
::
_percentRemainingFactName
);
Fact
*
battery2percentRemaining
=
managerVehicle
->
battery2FactGroup
()
->
getFact
(
VehicleBatteryFactGroup
::
_percentRemainingFactName
);
...
...
src/main.cc
View file @
b42742ab
...
...
@@ -32,6 +32,14 @@
#include "RunGuard.h"
#endif
#ifndef QML_PROFILE
#define QML_PROFILE 1
#endif
#if QML_PROFILE
#include <QQmlDebuggingEnabler>
#endif
#ifdef UNITTEST_BUILD
#include "UnitTest.h"
#endif
...
...
@@ -246,6 +254,11 @@ int main(int argc, char *argv[])
//-- Initialize Cache System
getQGCMapEngine
()
->
init
();
#if QML_PROFILE
QQmlDebuggingEnabler
enabler
;
#endif
int
exitCode
=
0
;
#ifdef UNITTEST_BUILD
...
...
src/ui/MainWindowInner.qml
View file @
b42742ab
...
...
@@ -42,6 +42,8 @@ Item {
readonly
property
string
_wimaViewSource
:
"
WimaView.qml
"
readonly
property
string
_analyzeViewSource
:
"
AnalyzeView.qml
"
readonly
property
int
_messageLifeTime
:
10000
// ms, messages will be removed from the screen after this time
onHeightChanged
:
{
//-- We only deal with the available height if within the Fly or Plan view
if
(
!
setupViewLoader
.
visible
)
{
...
...
@@ -656,7 +658,7 @@ Item {
// Message life-time timer
Timer
{
id
:
lifetimeTimer
interval
:
10000
// ms
interval
:
_messageLifeTime
// ms
repeat
:
false
onTriggered
:
{
...
...
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