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
2d37f689
Unverified
Commit
2d37f689
authored
Sep 25, 2018
by
Don Gagne
Committed by
GitHub
Sep 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6887 from DonLakeFlyer/StableMerge
Stable merge
parents
ce3739ee
ca849d3b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
29 deletions
+54
-29
ChangeLog.md
ChangeLog.md
+2
-0
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+8
-7
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+18
-14
MissionController.cc
src/MissionManager/MissionController.cc
+4
-0
MissionController.h
src/MissionManager/MissionController.h
+4
-0
QGCLoggingCategory.cc
src/QGCLoggingCategory.cc
+8
-7
QGCLoggingCategory.h
src/QGCLoggingCategory.h
+1
-0
QGCCorePlugin.cc
src/api/QGCCorePlugin.cc
+6
-0
QGCCorePlugin.h
src/api/QGCCorePlugin.h
+2
-0
LogReplayLink.cc
src/comm/LogReplayLink.cc
+1
-1
No files found.
ChangeLog.md
View file @
2d37f689
...
...
@@ -11,6 +11,7 @@ Note: This file only contains high level features or important fixes.
## 3.4
### 3.4.4 - Not yet released
*
Multi-Vehicle Start Mission and Pause now work correctly. Issue #6864.
### 3.4.3
*
Fix bug where Resume Mission would not display correctly in some cases. Issue #6835.
...
...
@@ -22,3 +23,4 @@ Note: This file only contains high level features or important fixes.
### 3.4.1
*
Fix crash when Survery with terrain follow is moved quickly
*
Fix terrain follow climb/descent rate fields swapped in ui
src/FlightDisplay/FlightDisplayView.qml
View file @
2d37f689
...
...
@@ -470,13 +470,14 @@ QGCView {
}
MultiVehicleList
{
anchors.margins
:
_margins
anchors.top
:
singleMultiSelector
.
bottom
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
visible
:
!
singleVehicleView
.
checked
&&
!
QGroundControl
.
videoManager
.
fullScreen
z
:
_panel
.
z
+
4
anchors.margins
:
_margins
anchors.top
:
singleMultiSelector
.
bottom
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
width
:
ScreenTools
.
defaultFontPixelWidth
*
30
visible
:
!
singleVehicleView
.
checked
&&
!
QGroundControl
.
videoManager
.
fullScreen
z
:
_panel
.
z
+
4
guidedActionsController
:
_guidedController
}
//-- Virtual Joystick
...
...
src/FlightDisplay/GuidedActionsController.qml
View file @
2d37f689
...
...
@@ -40,10 +40,12 @@ Item {
readonly
property
string
takeoffTitle
:
qsTr
(
"
Takeoff
"
)
readonly
property
string
landTitle
:
qsTr
(
"
Land
"
)
readonly
property
string
startMissionTitle
:
qsTr
(
"
Start Mission
"
)
readonly
property
string
mvStartMissionTitle
:
qsTr
(
"
Start Mission (MV)
"
)
readonly
property
string
continueMissionTitle
:
qsTr
(
"
Continue Mission
"
)
readonly
property
string
resumeMissionTitle
:
qsTr
(
"
Resume Mission
"
)
readonly
property
string
resumeMissionUploadFailTitle
:
qsTr
(
"
Resume FAILED
"
)
readonly
property
string
pauseTitle
:
qsTr
(
"
Pause
"
)
readonly
property
string
mvPauseTitle
:
qsTr
(
"
Pause (MV)
"
)
readonly
property
string
changeAltTitle
:
qsTr
(
"
Change Altitude
"
)
readonly
property
string
orbitTitle
:
qsTr
(
"
Orbit
"
)
readonly
property
string
landAbortTitle
:
qsTr
(
"
Land Abort
"
)
...
...
@@ -101,18 +103,19 @@ Item {
property
bool
showTakeoff
:
_guidedActionsEnabled
&&
_activeVehicle
.
takeoffVehicleSupported
&&
!
_vehicleFlying
property
bool
showLand
:
_guidedActionsEnabled
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_activeVehicle
.
fixedWing
&&
!
_vehicleInLandMode
property
bool
showStartMission
:
_guidedActionsEnabled
&&
_missionAvailable
&&
!
_missionActive
&&
!
_vehicleFlying
property
bool
showContinueMission
:
_guidedActionsEnabled
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleArmed
&&
_vehicleFlying
&&
(
_currentMissionIndex
<
missionController
.
visualItems
.
c
ount
-
1
)
property
bool
showContinueMission
:
_guidedActionsEnabled
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleArmed
&&
_vehicleFlying
&&
(
_currentMissionIndex
<
_missionItemC
ount
-
1
)
property
bool
showPause
:
_guidedActionsEnabled
&&
_vehicleArmed
&&
_activeVehicle
.
pauseVehicleSupported
&&
_vehicleFlying
&&
!
_vehiclePaused
property
bool
showChangeAlt
:
_guidedActionsEnabled
&&
_vehicleFlying
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showOrbit
:
_guidedActionsEnabled
&&
!
_hideOrbit
&&
_vehicleFlying
&&
_activeVehicle
.
orbitModeSupported
&&
!
_missionActive
property
bool
showLandAbort
:
_guidedActionsEnabled
&&
_vehicleFlying
&&
_activeVehicle
.
fixedWing
&&
_vehicleLanding
property
bool
showGotoLocation
:
_guidedActionsEnabled
&&
_vehicleFlying
// Note: The '
missionController.visualItems.count - 3
' 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
<
missionController
.
visualItems
.
count
-
3
)
// 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
)
property
bool
guidedUIVisible
:
guidedActionConfirm
.
visible
||
guidedActionList
.
visible
property
var
_corePlugin
:
QGroundControl
.
corePlugin
property
bool
_guidedActionsEnabled
:
(
!
ScreenTools
.
isDebug
&&
QGroundControl
.
corePlugin
.
options
.
guidedActionsRequireRCRSSI
&&
_activeVehicle
)
?
_rcRSSIAvailable
:
_activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
string
_flightMode
:
_activeVehicle
?
_activeVehicle
.
flightMode
:
""
...
...
@@ -125,6 +128,7 @@ Item {
property
bool
_vehicleInMissionMode
:
false
property
bool
_vehicleInRTLMode
:
false
property
bool
_vehicleInLandMode
:
false
property
int
_missionItemCount
:
missionController
.
missionItemCount
property
int
_currentMissionIndex
:
missionController
.
currentMissionIndex
property
int
_resumeMissionIndex
:
missionController
.
resumeMissionIndex
property
bool
_hideEmergenyStop
:
!
QGroundControl
.
corePlugin
.
options
.
guidedBarShowEmergencyStop
...
...
@@ -132,15 +136,14 @@ Item {
property
bool
_vehicleWasFlying
:
false
property
bool
_rcRSSIAvailable
:
_activeVehicle
?
_activeVehicle
.
rcRSSI
>
0
&&
_activeVehicle
.
rcRSSI
<=
100
:
false
//Handy code for debugging state problems
property
bool
__debugGuidedStates
:
false
// You can turn on log output for GuidedActionsController by turning on GuidedActionsControllerLog category
property
bool
__guidedModeSupported
:
_activeVehicle
?
_activeVehicle
.
guidedModeSupported
:
false
property
bool
__pauseVehicleSupported
:
_activeVehicle
?
_activeVehicle
.
pauseVehicleSupported
:
false
property
bool
__flightMode
:
_flightMode
function
_outputState
()
{
if
(
_
_debugGuidedStates
)
{
console
.
log
(
qsTr
(
"
_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicle
InRTLMode(%5) pauseVehicleSupported(%6) _vehiclePaused(%7) _flightMode(%8)
"
).
arg
(
_activeVehicle
?
1
:
0
).
arg
(
_vehicleArmed
?
1
:
0
).
arg
(
__guidedModeSupported
?
1
:
0
).
arg
(
_vehicleFlying
?
1
:
0
).
arg
(
_vehicleInRTLMode
?
1
:
0
).
arg
(
__pauseVehicleSupported
?
1
:
0
).
arg
(
_vehiclePaused
?
1
:
0
).
arg
(
_flightMode
))
if
(
_
corePlugin
.
guidedActionsControllerLogging
()
)
{
console
.
log
(
qsTr
(
"
_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicle
WasFlying(%5) _vehicleInRTLMode(%6) pauseVehicleSupported(%7) _vehiclePaused(%8) _flightMode(%9) _missionItemCount(%10)
"
).
arg
(
_activeVehicle
?
1
:
0
).
arg
(
_vehicleArmed
?
1
:
0
).
arg
(
__guidedModeSupported
?
1
:
0
).
arg
(
_vehicleFlying
?
1
:
0
).
arg
(
_vehicleWasFlying
?
1
:
0
).
arg
(
_vehicleInRTLMode
?
1
:
0
).
arg
(
__pauseVehicleSupported
?
1
:
0
).
arg
(
_vehiclePaused
?
1
:
0
).
arg
(
_flightMode
).
arg
(
_missionItemCount
))
}
}
...
...
@@ -152,31 +155,32 @@ Item {
on__FlightModeChanged
:
_outputState
()
on__GuidedModeSupportedChanged
:
_outputState
()
on__PauseVehicleSupportedChanged
:
_outputState
()
on_MissionItemCountChanged
:
_outputState
()
on_CurrentMissionIndexChanged
:
{
if
(
_
_debugGuidedStates
)
{
if
(
_
corePlugin
.
guidedActionsControllerLogging
()
)
{
console
.
log
(
"
_currentMissionIndex
"
,
_currentMissionIndex
)
}
}
on_ResumeMissionIndexChanged
:
{
if
(
_
_debugGuidedStates
)
{
if
(
_
corePlugin
.
guidedActionsControllerLogging
()
)
{
console
.
log
(
"
_resumeMissionIndex
"
,
_resumeMissionIndex
)
}
}
onShowResumeMissionChanged
:
{
if
(
_
_debugGuidedStates
)
{
if
(
_
corePlugin
.
guidedActionsControllerLogging
()
)
{
console
.
log
(
"
showResumeMission
"
,
showResumeMission
)
}
_outputState
()
}
onShowStartMissionChanged
:
{
if
(
_
_debugGuidedStates
)
{
if
(
_
corePlugin
.
guidedActionsControllerLogging
()
)
{
console
.
log
(
"
showStartMission
"
,
showStartMission
)
}
_outputState
()
}
onShowContinueMissionChanged
:
{
if
(
_
_debugGuidedStates
)
{
if
(
_
corePlugin
.
guidedActionsControllerLogging
()
)
{
console
.
log
(
"
showContinueMission
"
,
showContinueMission
)
}
_outputState
()
...
...
@@ -245,7 +249,7 @@ Item {
confirmDialog
.
hideTrigger
=
Qt
.
binding
(
function
()
{
return
!
showStartMission
})
break
;
case
actionMVStartMission
:
confirmDialog
.
title
=
s
tartMissionTitle
confirmDialog
.
title
=
mvS
tartMissionTitle
confirmDialog
.
message
=
startMissionMessage
confirmDialog
.
hideTrigger
=
true
break
;
...
...
@@ -317,7 +321,7 @@ Item {
altitudeSlider
.
visible
=
true
break
;
case
actionMVPause
:
confirmDialog
.
title
=
p
auseTitle
confirmDialog
.
title
=
mvP
auseTitle
confirmDialog
.
message
=
mvPauseMessage
confirmDialog
.
hideTrigger
=
true
break
;
...
...
src/MissionManager/MissionController.cc
View file @
2d37f689
...
...
@@ -58,6 +58,7 @@ const int MissionController::_missionFileVersion = 2;
MissionController
::
MissionController
(
PlanMasterController
*
masterController
,
QObject
*
parent
)
:
PlanElementController
(
masterController
,
parent
)
,
_missionManager
(
_managerVehicle
->
missionManager
())
,
_missionItemCount
(
0
)
,
_visualItems
(
nullptr
)
,
_settingsItem
(
nullptr
)
,
_firstItemsFromVehicle
(
false
)
...
...
@@ -163,6 +164,9 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque
const
QList
<
MissionItem
*>&
newMissionItems
=
_missionManager
->
missionItems
();
qCDebug
(
MissionControllerLog
)
<<
"loading from vehicle: count"
<<
newMissionItems
.
count
();
_missionItemCount
=
newMissionItems
.
count
();
emit
missionItemCountChanged
(
_missionItemCount
);
int
i
=
0
;
if
(
_controllerVehicle
->
firmwarePlugin
()
->
sendHomePositionToVehicle
()
&&
newMissionItems
.
count
()
!=
0
)
{
// First item is fake home position
...
...
src/MissionManager/MissionController.h
View file @
2d37f689
...
...
@@ -75,6 +75,7 @@ public:
Q_PROPERTY
(
double
progressPct
READ
progressPct
NOTIFY
progressPctChanged
)
Q_PROPERTY
(
int
missionItemCount
READ
missionItemCount
NOTIFY
missionItemCountChanged
)
///< True mission item command count (only valid in Fly View)
Q_PROPERTY
(
int
currentMissionIndex
READ
currentMissionIndex
NOTIFY
currentMissionIndexChanged
)
Q_PROPERTY
(
int
resumeMissionIndex
READ
resumeMissionIndex
NOTIFY
resumeMissionIndexChanged
)
///< Returns the item index two which a mission should be resumed. -1 indicates resume mission not available.
...
...
@@ -176,6 +177,7 @@ public:
QString
corridorScanComplexItemName
(
void
)
const
{
return
_corridorScanMissionItemName
;
}
QString
structureScanComplexItemName
(
void
)
const
{
return
_structureScanMissionItemName
;
}
int
missionItemCount
(
void
)
const
{
return
_missionItemCount
;
}
int
currentMissionIndex
(
void
)
const
;
int
resumeMissionIndex
(
void
)
const
;
int
currentPlanViewIndex
(
void
)
const
;
...
...
@@ -215,6 +217,7 @@ signals:
void
currentPlanViewIndexChanged
(
void
);
void
currentPlanViewItemChanged
(
void
);
void
missionBoundingCubeChanged
(
void
);
void
missionItemCountChanged
(
int
missionItemCount
);
private
slots
:
void
_newMissionItemsAvailableFromVehicle
(
bool
removeAllRequested
);
...
...
@@ -269,6 +272,7 @@ private:
private:
MissionManager
*
_missionManager
;
int
_missionItemCount
;
QmlObjectListModel
*
_visualItems
;
MissionSettingsItem
*
_settingsItem
;
QmlObjectListModel
_waypointLines
;
...
...
src/QGCLoggingCategory.cc
View file @
2d37f689
...
...
@@ -16,13 +16,14 @@
#include <QSettings>
// Add Global logging categories (not class specific) here using QGC_LOGGING_CATEGORY
QGC_LOGGING_CATEGORY
(
FirmwareUpgradeLog
,
"FirmwareUpgradeLog"
)
QGC_LOGGING_CATEGORY
(
FirmwareUpgradeVerboseLog
,
"FirmwareUpgradeVerboseLog"
)
QGC_LOGGING_CATEGORY
(
MissionCommandsLog
,
"MissionCommandsLog"
)
QGC_LOGGING_CATEGORY
(
MissionItemLog
,
"MissionItemLog"
)
QGC_LOGGING_CATEGORY
(
ParameterManagerLog
,
"ParameterManagerLog"
)
QGC_LOGGING_CATEGORY
(
GeotaggingLog
,
"GeotaggingLog"
)
QGC_LOGGING_CATEGORY
(
RTKGPSLog
,
"RTKGPSLog"
)
QGC_LOGGING_CATEGORY
(
FirmwareUpgradeLog
,
"FirmwareUpgradeLog"
)
QGC_LOGGING_CATEGORY
(
FirmwareUpgradeVerboseLog
,
"FirmwareUpgradeVerboseLog"
)
QGC_LOGGING_CATEGORY
(
MissionCommandsLog
,
"MissionCommandsLog"
)
QGC_LOGGING_CATEGORY
(
MissionItemLog
,
"MissionItemLog"
)
QGC_LOGGING_CATEGORY
(
ParameterManagerLog
,
"ParameterManagerLog"
)
QGC_LOGGING_CATEGORY
(
GeotaggingLog
,
"GeotaggingLog"
)
QGC_LOGGING_CATEGORY
(
RTKGPSLog
,
"RTKGPSLog"
)
QGC_LOGGING_CATEGORY
(
GuidedActionsControllerLog
,
"GuidedActionsControllerLog"
)
QGCLoggingCategoryRegister
*
_instance
=
NULL
;
const
char
*
QGCLoggingCategoryRegister
::
_filterRulesSettingsGroup
=
"LoggingFilters"
;
...
...
src/QGCLoggingCategory.h
View file @
2d37f689
...
...
@@ -25,6 +25,7 @@ Q_DECLARE_LOGGING_CATEGORY(MissionItemLog)
Q_DECLARE_LOGGING_CATEGORY
(
ParameterManagerLog
)
Q_DECLARE_LOGGING_CATEGORY
(
GeotaggingLog
)
Q_DECLARE_LOGGING_CATEGORY
(
RTKGPSLog
)
Q_DECLARE_LOGGING_CATEGORY
(
GuidedActionsControllerLog
)
/// @def QGC_LOGGING_CATEGORY
/// This is a QGC specific replacement for Q_LOGGING_CATEGORY. It will register the category name into a
...
...
src/api/QGCCorePlugin.cc
View file @
2d37f689
...
...
@@ -16,6 +16,7 @@
#include "AppMessages.h"
#include "QmlObjectListModel.h"
#include "VideoReceiver.h"
#include "QGCLoggingCategory.h"
#include <QtQml>
#include <QQmlEngine>
...
...
@@ -313,3 +314,8 @@ VideoReceiver* QGCCorePlugin::createVideoReceiver(QObject* parent)
{
return
new
VideoReceiver
(
parent
);
}
bool
QGCCorePlugin
::
guidedActionsControllerLogging
(
void
)
const
{
return
GuidedActionsControllerLog
().
isDebugEnabled
();
}
src/api/QGCCorePlugin.h
View file @
2d37f689
...
...
@@ -52,6 +52,8 @@ public:
Q_PROPERTY
(
QString
brandImageOutdoor
READ
brandImageOutdoor
CONSTANT
)
Q_PROPERTY
(
QmlObjectListModel
*
customMapItems
READ
customMapItems
CONSTANT
)
Q_INVOKABLE
bool
guidedActionsControllerLogging
(
void
)
const
;
/// The list of settings under the Settings Menu
/// @return A list of QGCSettings
virtual
QVariantList
&
settingsPages
(
void
);
...
...
src/comm/LogReplayLink.cc
View file @
2d37f689
...
...
@@ -269,7 +269,7 @@ bool LogReplayLink::_loadLogFile(void)
// timestamp size. This guarantees that we will hit a MAVLink packet before
// the end of the file. Unfortunately, it basically guarantees that we will
// hit more than one. This is why we have to search for a bit.
qint64
fileLoc
=
_logFile
.
size
()
-
MAVLINK_MAX_PACKET_LEN
-
cbTimestamp
;
qint64
fileLoc
=
_logFile
.
size
()
-
((
MAVLINK_MAX_PACKET_LEN
-
cbTimestamp
)
*
2
)
;
_logFile
.
seek
(
fileLoc
);
quint64
endTimeUSecs
=
startTimeUSecs
;
// Set a sane default for the endtime
mavlink_message_t
msg
;
...
...
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