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
74a0e0de
Commit
74a0e0de
authored
Dec 08, 2018
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
4509f4b1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
9 deletions
+27
-9
RallyPointController.cc
src/MissionManager/RallyPointController.cc
+5
-4
RallyPointController.h
src/MissionManager/RallyPointController.h
+1
-1
RallyPointManager.cc
src/MissionManager/RallyPointManager.cc
+18
-3
RallyPointManager.h
src/MissionManager/RallyPointManager.h
+3
-1
No files found.
src/MissionManager/RallyPointController.cc
View file @
74a0e0de
...
...
@@ -203,15 +203,15 @@ QString RallyPointController::editorQml(void) const
return
_rallyPointManager
->
editorQml
();
}
void
RallyPointController
::
_managerLoadComplete
(
const
QList
<
QGeoCoordinate
>
rgPoints
)
void
RallyPointController
::
_managerLoadComplete
(
void
)
{
// Fly view always reloads on _loadComplete
// Plan view only reloads on _loadComplete if specifically requested
if
(
_flyView
||
_itemsRequested
)
{
_points
.
clearAndDeleteContents
();
QObjectList
pointList
;
for
(
int
i
=
0
;
i
<
rgPoints
.
count
();
i
++
)
{
pointList
.
append
(
new
RallyPoint
(
rgPoints
[
i
],
this
));
for
(
int
i
=
0
;
i
<
_rallyPointManager
->
points
()
.
count
();
i
++
)
{
pointList
.
append
(
new
RallyPoint
(
_rallyPointManager
->
points
()
[
i
],
this
));
}
_points
.
swapObjectList
(
pointList
);
setDirty
(
false
);
...
...
@@ -224,7 +224,7 @@ void RallyPointController::_managerLoadComplete(const QList<QGeoCoordinate> rgPo
void
RallyPointController
::
_managerSendComplete
(
bool
error
)
{
// Fly view always reloads after send
if
(
!
error
&&
!
_flyView
)
{
if
(
!
error
&&
_flyView
)
{
showPlanFromManagerVehicle
();
}
}
...
...
@@ -317,6 +317,7 @@ bool RallyPointController::showPlanFromManagerVehicle (void)
}
else
{
qCDebug
(
RallyPointControllerLog
)
<<
"showPlanFromManagerVehicle: sync complete"
;
_itemsRequested
=
true
;
_managerLoadComplete
();
return
false
;
}
}
...
...
src/MissionManager/RallyPointController.h
View file @
74a0e0de
...
...
@@ -61,7 +61,7 @@ signals:
void
loadComplete
(
void
);
private
slots
:
void
_managerLoadComplete
(
const
QList
<
QGeoCoordinate
>
rgPoints
);
void
_managerLoadComplete
(
void
);
void
_managerSendComplete
(
bool
error
);
void
_managerRemoveAllComplete
(
bool
error
);
void
_setFirstPointCurrent
(
void
);
...
...
src/MissionManager/RallyPointManager.cc
View file @
74a0e0de
...
...
@@ -21,7 +21,7 @@ RallyPointManager::RallyPointManager(Vehicle* vehicle)
connect
(
&
_planManager
,
&
PlanManager
::
inProgressChanged
,
this
,
&
RallyPointManager
::
inProgressChanged
);
connect
(
&
_planManager
,
&
PlanManager
::
error
,
this
,
&
RallyPointManager
::
error
);
connect
(
&
_planManager
,
&
PlanManager
::
removeAllComplete
,
this
,
&
RallyPointManager
::
removeAllComplete
);
connect
(
&
_planManager
,
&
PlanManager
::
sendComplete
,
this
,
&
RallyPointManager
::
sendComplete
);
connect
(
&
_planManager
,
&
PlanManager
::
sendComplete
,
this
,
&
RallyPointManager
::
_
sendComplete
);
connect
(
&
_planManager
,
&
PlanManager
::
newMissionItemsAvailable
,
this
,
&
RallyPointManager
::
_planManagerLoadComplete
);
}
...
...
@@ -45,8 +45,12 @@ void RallyPointManager::loadFromVehicle(void)
void
RallyPointManager
::
sendToVehicle
(
const
QList
<
QGeoCoordinate
>&
rgPoints
)
{
QList
<
MissionItem
*>
rallyItems
;
_rgSendPoints
.
clear
();
for
(
const
QGeoCoordinate
&
rallyPoint
:
rgPoints
)
{
_rgSendPoints
.
append
(
rallyPoint
);
}
QList
<
MissionItem
*>
rallyItems
;
for
(
int
i
=
0
;
i
<
rgPoints
.
count
();
i
++
)
{
MissionItem
*
item
=
new
MissionItem
(
0
,
...
...
@@ -100,5 +104,16 @@ void RallyPointManager::_planManagerLoadComplete(bool removeAllRequested)
}
emit
loadComplete
(
_rgPoints
);
emit
loadComplete
();
}
void
RallyPointManager
::
_sendComplete
(
bool
error
)
{
if
(
error
)
{
_rgPoints
.
clear
();
}
else
{
_rgPoints
=
_rgSendPoints
;
}
_rgSendPoints
.
clear
();
emit
sendComplete
(
error
);
}
src/MissionManager/RallyPointManager.h
View file @
74a0e0de
...
...
@@ -62,13 +62,14 @@ public:
}
ErrorCode_t
;
signals:
void
loadComplete
(
const
QList
<
QGeoCoordinate
>
rgPoints
);
void
loadComplete
(
void
);
void
inProgressChanged
(
bool
inProgress
);
void
error
(
int
errorCode
,
const
QString
&
errorMsg
);
void
removeAllComplete
(
bool
error
);
void
sendComplete
(
bool
error
);
private
slots
:
void
_sendComplete
(
bool
error
);
void
_planManagerLoadComplete
(
bool
removeAllRequested
);
protected:
...
...
@@ -77,6 +78,7 @@ protected:
Vehicle
*
_vehicle
;
PlanManager
_planManager
;
QList
<
QGeoCoordinate
>
_rgPoints
;
QList
<
QGeoCoordinate
>
_rgSendPoints
;
};
#endif
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