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
08f54ff7
Commit
08f54ff7
authored
Apr 26, 2017
by
Don Gagne
Committed by
GitHub
Apr 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5066 from DonLakeFlyer/Fixes
Various Fixes
parents
be117f58
adcc3d0a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
6 deletions
+29
-6
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+6
-2
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+5
-2
MissionController.cc
src/MissionManager/MissionController.cc
+14
-0
MissionController.h
src/MissionManager/MissionController.h
+4
-2
No files found.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
08f54ff7
...
...
@@ -60,8 +60,12 @@ FlightMap {
// When the user pans the map we stop responding to vehicle coordinate updates until the panRecenterTimer fires
onUserPannedChanged
:
{
_disableVehicleTracking
=
true
panRecenterTimer
.
start
()
if
(
userPanned
)
{
console
.
log
(
"
user panned
"
)
userPanned
=
false
_disableVehicleTracking
=
true
panRecenterTimer
.
restart
()
}
}
function
pointInRect
(
point
,
rect
)
{
...
...
src/FlightDisplay/GuidedActionsController.qml
View file @
08f54ff7
...
...
@@ -87,8 +87,8 @@ Item {
property
bool
showTakeoff
:
_activeVehicle
&&
_activeVehicle
.
guidedModeSupported
&&
!
_vehicleFlying
&&
!
_activeVehicle
.
fixedWing
property
bool
showLand
:
_activeVehicle
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_activeVehicle
.
fixedWing
&&
!
_vehicleInLandMode
property
bool
showStartMission
:
_activeVehicle
&&
_missionAvailable
&&
!
_missionActive
&&
!
_vehicleFlying
property
bool
showContinueMission
:
_activeVehicle
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleFlying
property
bool
showResumeMission
:
_activeVehicle
&&
!
_vehicleFlying
&&
_missionAvailable
&&
_resumeMissionIndex
>
0
property
bool
showContinueMission
:
_activeVehicle
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleFlying
&&
(
_currentMissionIndex
<
missionController
.
visualItems
.
count
-
1
)
property
bool
showResumeMission
:
_activeVehicle
&&
!
_vehicleFlying
&&
_missionAvailable
&&
_resumeMissionIndex
>
0
&&
(
_resumeMissionIndex
<
missionController
.
visualItems
.
count
-
2
)
property
bool
showPause
:
_activeVehicle
&&
_vehicleArmed
&&
_activeVehicle
.
pauseVehicleSupported
&&
_vehicleFlying
&&
!
_vehiclePaused
property
bool
showChangeAlt
:
(
_activeVehicle
&&
_vehicleFlying
)
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showOrbit
:
!
_hideOrbit
&&
_activeVehicle
&&
_vehicleFlying
&&
_activeVehicle
.
orbitModeSupported
&&
_vehicleArmed
&&
!
_missionActive
...
...
@@ -105,11 +105,14 @@ Item {
property
bool
_vehicleInMissionMode
:
false
property
bool
_vehicleInRTLMode
:
false
property
bool
_vehicleInLandMode
:
false
property
int
_currentMissionIndex
:
missionController
.
currentMissionIndex
property
int
_resumeMissionIndex
:
missionController
.
resumeMissionIndex
property
bool
_hideEmergenyStop
:
!
QGroundControl
.
corePlugin
.
options
.
guidedBarShowEmergencyStop
property
bool
_hideOrbit
:
!
QGroundControl
.
corePlugin
.
options
.
guidedBarShowOrbit
property
var
_actionData
on_CurrentMissionIndexChanged
:
console
.
log
(
"
_currentMissionIndex
"
,
_currentMissionIndex
)
on_FlightModeChanged
:
{
_vehiclePaused
=
_flightMode
===
_activeVehicle
.
pauseFlightMode
_vehicleInRTLMode
=
_flightMode
===
_activeVehicle
.
rtlFlightMode
...
...
src/MissionManager/MissionController.cc
View file @
08f54ff7
...
...
@@ -1528,6 +1528,19 @@ int MissionController::resumeMissionIndex(void) const
return
resumeIndex
;
}
int
MissionController
::
currentMissionIndex
(
void
)
const
{
if
(
_editMode
)
{
return
-
1
;
}
else
{
int
currentIndex
=
_missionManager
->
currentIndex
();
if
(
!
_controllerVehicle
->
firmwarePlugin
()
->
sendHomePositionToVehicle
())
{
currentIndex
++
;
}
return
currentIndex
;
}
}
void
MissionController
::
_currentMissionIndexChanged
(
int
sequenceNumber
)
{
if
(
!
_editMode
)
{
...
...
@@ -1539,6 +1552,7 @@ void MissionController::_currentMissionIndexChanged(int sequenceNumber)
VisualMissionItem
*
item
=
qobject_cast
<
VisualMissionItem
*>
(
_visualItems
->
get
(
i
));
item
->
setIsCurrentItem
(
item
->
sequenceNumber
()
==
sequenceNumber
);
}
emit
currentMissionIndexChanged
(
currentMissionIndex
());
}
}
...
...
src/MissionManager/MissionController.h
View file @
08f54ff7
...
...
@@ -70,7 +70,8 @@ public:
Q_PROPERTY
(
double
progressPct
READ
progressPct
NOTIFY
progressPctChanged
)
Q_PROPERTY
(
int
resumeMissionIndex
READ
resumeMissionIndex
NOTIFY
resumeMissionIndexChanged
)
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.
Q_PROPERTY
(
double
missionDistance
READ
missionDistance
NOTIFY
missionDistanceChanged
)
Q_PROPERTY
(
double
missionTime
READ
missionTime
NOTIFY
missionTimeChanged
)
...
...
@@ -134,7 +135,7 @@ public:
QGeoCoordinate
plannedHomePosition
(
void
)
const
;
double
progressPct
(
void
)
const
{
return
_progressPct
;
}
/// Returns the item index two which a mission should be resumed. -1 indicates resume mission not available.
int
currentMissionIndex
(
void
)
const
;
int
resumeMissionIndex
(
void
)
const
;
double
missionDistance
(
void
)
const
{
return
_missionFlightStatus
.
totalDistance
;
}
...
...
@@ -166,6 +167,7 @@ signals:
void
batteriesRequiredChanged
(
int
batteriesRequired
);
void
plannedHomePositionChanged
(
QGeoCoordinate
plannedHomePosition
);
void
progressPctChanged
(
double
progressPct
);
void
currentMissionIndexChanged
(
int
currentMissionIndex
);
private
slots
:
void
_newMissionItemsAvailableFromVehicle
(
bool
removeAllRequested
);
...
...
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