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
745f792e
Commit
745f792e
authored
May 13, 2017
by
Gus Grubba
Committed by
GitHub
May 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5145 from DonLakeFlyer/SendPlanToVehicle
Fix PlanMasterController:sendPlanToVehicle
parents
4f5855cf
27322f1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
PlanMasterController.cc
src/MissionManager/PlanMasterController.cc
+7
-5
Vehicle.cc
src/Vehicle/Vehicle.cc
+1
-0
No files found.
src/MissionManager/PlanMasterController.cc
View file @
745f792e
...
...
@@ -74,6 +74,9 @@ void PlanMasterController::start(bool editMode)
void
PlanMasterController
::
startStaticActiveVehicle
(
Vehicle
*
vehicle
)
{
_editMode
=
false
;
_missionController
.
start
(
false
);
_geoFenceController
.
start
(
false
);
_rallyPointController
.
start
(
false
);
_activeVehicleChanged
(
vehicle
);
}
...
...
@@ -186,7 +189,7 @@ void PlanMasterController::_loadRallyPointsComplete(void)
void
PlanMasterController
::
_sendMissionComplete
(
void
)
{
if
(
_
editMode
&&
_
sendGeoFence
)
{
if
(
_sendGeoFence
)
{
qCDebug
(
PlanMasterControllerLog
)
<<
"PlanMasterController::sendToVehicle start fence sendToVehicle"
;
_sendGeoFence
=
false
;
_sendRallyPoints
=
true
;
...
...
@@ -197,7 +200,7 @@ void PlanMasterController::_sendMissionComplete(void)
void
PlanMasterController
::
_sendGeoFenceComplete
(
void
)
{
if
(
_
editMode
&&
_
sendRallyPoints
)
{
if
(
_sendRallyPoints
)
{
qCDebug
(
PlanMasterControllerLog
)
<<
"PlanMasterController::sendToVehicle start rally sendToVehicle"
;
_sendRallyPoints
=
false
;
_rallyPointController
.
sendToVehicle
();
...
...
@@ -206,7 +209,7 @@ void PlanMasterController::_sendGeoFenceComplete(void)
void
PlanMasterController
::
_sendRallyPointsComplete
(
void
)
{
if
(
_
editMode
&&
_
syncInProgress
)
{
if
(
_syncInProgress
)
{
qCDebug
(
PlanMasterControllerLog
)
<<
"PlanMasterController::sendToVehicle rally point send complete"
;
_syncInProgress
=
false
;
emit
syncInProgressChanged
(
false
);
...
...
@@ -217,8 +220,6 @@ void PlanMasterController::sendToVehicle(void)
{
if
(
offline
())
{
qCWarning
(
PlanMasterControllerLog
)
<<
"PlanMasterController::sendToVehicle called while offline"
;
}
else
if
(
!
_editMode
)
{
qCWarning
(
PlanMasterControllerLog
)
<<
"PlanMasterController::sendToVehicle called from Fly view"
;
}
else
if
(
syncInProgress
())
{
qCWarning
(
PlanMasterControllerLog
)
<<
"PlanMasterController::sendToVehicle called while syncInProgress"
;
}
else
{
...
...
@@ -396,6 +397,7 @@ void PlanMasterController::sendPlanToVehicle(Vehicle* vehicle, const QString& fi
PlanMasterController
*
controller
=
new
PlanMasterController
();
controller
->
startStaticActiveVehicle
(
vehicle
);
controller
->
loadFromFile
(
filename
);
controller
->
sendToVehicle
();
delete
controller
;
}
...
...
src/Vehicle/Vehicle.cc
View file @
745f792e
...
...
@@ -1754,6 +1754,7 @@ void Vehicle::_startPlanRequest(void)
QDir
missionAutoLoadDir
(
missionAutoLoadDirPath
);
QString
autoloadFilename
=
missionAutoLoadDir
.
absoluteFilePath
(
tr
(
"AutoLoad%1.%2"
).
arg
(
_id
).
arg
(
AppSettings
::
planFileExtension
));
if
(
QFile
(
autoloadFilename
).
exists
())
{
_initialPlanRequestComplete
=
true
;
// We aren't going to load from the vehicle, so we are done
PlanMasterController
::
sendPlanToVehicle
(
this
,
autoloadFilename
);
return
;
}
...
...
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