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
ede85754
Commit
ede85754
authored
Sep 05, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
81955d82
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
8 deletions
+42
-8
GeoFenceController.cc
src/MissionManager/GeoFenceController.cc
+10
-2
GeoFenceController.h
src/MissionManager/GeoFenceController.h
+2
-1
MissionController.cc
src/MissionManager/MissionController.cc
+9
-2
MissionController.h
src/MissionManager/MissionController.h
+2
-0
PlanMasterController.cc
src/MissionManager/PlanMasterController.cc
+7
-0
PlanMasterController.h
src/MissionManager/PlanMasterController.h
+1
-0
RallyPointController.cc
src/MissionManager/RallyPointController.cc
+9
-2
RallyPointController.h
src/MissionManager/RallyPointController.h
+2
-1
No files found.
src/MissionManager/GeoFenceController.cc
View file @
ede85754
...
...
@@ -342,8 +342,10 @@ void GeoFenceController::_setReturnPointFromManager(QGeoCoordinate breachReturnP
void
GeoFenceController
::
_managerLoadComplete
(
void
)
{
// Fly view always reloads on _loadComplete
// Plan view only reloads on _loadComplete if specifically requested
if
(
_flyView
||
_itemsRequested
)
{
// Plan view only reloads if:
// - Load was specifically requested
// - There is no current Plan
if
(
_flyView
||
_itemsRequested
||
isEmpty
())
{
_setReturnPointFromManager
(
_geoFenceManager
->
breachReturnPoint
());
_setFenceFromManager
(
_geoFenceManager
->
polygons
(),
_geoFenceManager
->
circles
());
setDirty
(
false
);
...
...
@@ -519,3 +521,9 @@ void GeoFenceController::_parametersReady(void)
connect
(
_px4ParamCircularFenceFact
,
&
Fact
::
rawValueChanged
,
this
,
&
GeoFenceController
::
paramCircularFenceChanged
);
emit
paramCircularFenceChanged
();
}
bool
GeoFenceController
::
isEmpty
(
void
)
const
{
return
_polygons
.
count
()
==
0
&&
_circles
.
count
()
==
0
&&
!
_breachReturnPoint
.
isValid
();
}
src/MissionManager/GeoFenceController.h
View file @
ede85754
...
...
@@ -82,7 +82,8 @@ public:
QmlObjectListModel
*
circles
(
void
)
{
return
&
_circles
;
}
QGeoCoordinate
breachReturnPoint
(
void
)
const
{
return
_breachReturnPoint
;
}
void
setBreachReturnPoint
(
const
QGeoCoordinate
&
breachReturnPoint
);
void
setBreachReturnPoint
(
const
QGeoCoordinate
&
breachReturnPoint
);
bool
isEmpty
(
void
)
const
;
signals:
void
breachReturnPointChanged
(
QGeoCoordinate
breachReturnPoint
);
...
...
src/MissionManager/MissionController.cc
View file @
ede85754
...
...
@@ -148,8 +148,10 @@ void MissionController::_newMissionItemsAvailableFromVehicle(bool removeAllReque
qCDebug
(
MissionControllerLog
)
<<
"_newMissionItemsAvailableFromVehicle flyView:count"
<<
_flyView
<<
_missionManager
->
missionItems
().
count
();
// Fly view always reloads on _loadComplete
// Plan view only reloads on _loadComplete if specifically requested
if
(
_flyView
||
removeAllRequested
||
_itemsRequested
||
_visualItems
->
count
()
<=
1
)
{
// Plan view only reloads if:
// - Load was specifically requested
// - There is no current Plan
if
(
_flyView
||
removeAllRequested
||
_itemsRequested
||
isEmpty
())
{
// Fly Mode (accept if):
// - Always accepts new items from the vehicle so Fly view is kept up to date
// Edit Mode (accept if):
...
...
@@ -2174,3 +2176,8 @@ void MissionController::_complexBoundingBoxChanged()
{
_updateTimer
.
start
(
UPDATE_TIMEOUT
);
}
bool
MissionController
::
isEmpty
(
void
)
const
{
return
_visualItems
->
count
()
<=
1
;
}
src/MissionManager/MissionController.h
View file @
ede85754
...
...
@@ -196,6 +196,8 @@ public:
int
batteryChangePoint
(
void
)
const
{
return
_missionFlightStatus
.
batteryChangePoint
;
}
///< -1 for not supported, 0 for not needed
int
batteriesRequired
(
void
)
const
{
return
_missionFlightStatus
.
batteriesRequired
;
}
///< -1 for not supported
bool
isEmpty
(
void
)
const
;
// These are the names shown in the UI for the pattern items. They are public so custom builds can remove the ones
// they don't want through the QGCCorePlugin::
static
const
QString
patternFWLandingName
;
...
...
src/MissionManager/PlanMasterController.cc
View file @
ede85754
...
...
@@ -576,3 +576,10 @@ bool PlanMasterController::syncInProgress(void) const
_geoFenceController
.
syncInProgress
()
||
_rallyPointController
.
syncInProgress
();
}
bool
PlanMasterController
::
isEmpty
(
void
)
const
{
return
_missionController
.
isEmpty
()
&&
_geoFenceController
.
isEmpty
()
&&
_rallyPointController
.
isEmpty
();
}
src/MissionManager/PlanMasterController.h
View file @
ede85754
...
...
@@ -84,6 +84,7 @@ public:
QString
currentPlanFile
(
void
)
const
{
return
_currentPlanFile
;
}
QStringList
loadNameFilters
(
void
)
const
;
QStringList
saveNameFilters
(
void
)
const
;
bool
isEmpty
(
void
)
const
;
QJsonDocument
saveToJson
();
...
...
src/MissionManager/RallyPointController.cc
View file @
ede85754
...
...
@@ -202,8 +202,10 @@ QString RallyPointController::editorQml(void) const
void
RallyPointController
::
_managerLoadComplete
(
void
)
{
// Fly view always reloads on _loadComplete
// Plan view only reloads on _loadComplete if specifically requested
if
(
_flyView
||
_itemsRequested
)
{
// Plan view only reloads if:
// - Load was specifically requested
// - There is no current Plan
if
(
_flyView
||
_itemsRequested
||
isEmpty
())
{
_points
.
clearAndDeleteContents
();
QObjectList
pointList
;
for
(
int
i
=
0
;
i
<
_rallyPointManager
->
points
().
count
();
i
++
)
{
...
...
@@ -318,3 +320,8 @@ bool RallyPointController::showPlanFromManagerVehicle (void)
}
}
}
bool
RallyPointController
::
isEmpty
(
void
)
const
{
return
_points
.
count
()
==
0
;
}
src/MissionManager/RallyPointController.h
View file @
ede85754
...
...
@@ -54,7 +54,8 @@ public:
QString
editorQml
(
void
)
const
;
QObject
*
currentRallyPoint
(
void
)
const
{
return
_currentRallyPoint
;
}
void
setCurrentRallyPoint
(
QObject
*
rallyPoint
);
void
setCurrentRallyPoint
(
QObject
*
rallyPoint
);
bool
isEmpty
(
void
)
const
;
signals:
void
currentRallyPointChanged
(
QObject
*
rallyPoint
);
...
...
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