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
47a9895a
Commit
47a9895a
authored
Sep 13, 2017
by
Don Gagne
Committed by
GitHub
Sep 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5648 from DonLakeFlyer/PlanSignalling
Better plan load signaling
parents
d4ec57c8
c9ffe70e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
Vehicle.cc
src/Vehicle/Vehicle.cc
+13
-1
Vehicle.h
src/Vehicle/Vehicle.h
+4
-2
UnitTest.cc
src/qgcunittest/UnitTest.cc
+1
-1
No files found.
src/Vehicle/Vehicle.cc
View file @
47a9895a
...
...
@@ -1959,7 +1959,7 @@ void Vehicle::_rallyPointLoadComplete(void)
qCDebug
(
VehicleLog
)
<<
"_missionLoadComplete _initialPlanRequestComplete = true"
;
if
(
!
_initialPlanRequestComplete
)
{
_initialPlanRequestComplete
=
true
;
emit
initialPlanRequestComplete
d
(
);
emit
initialPlanRequestComplete
Changed
(
true
);
}
}
...
...
@@ -2817,6 +2817,18 @@ void Vehicle::_updateDistanceToHome(void)
}
}
void
Vehicle
::
forceInitialPlanRequestComplete
(
void
)
{
_initialPlanRequestComplete
=
true
;
emit
initialPlanRequestCompleteChanged
(
true
);
}
void
Vehicle
::
sendPlan
(
QString
planFile
)
{
PlanMasterController
::
sendPlanToVehicle
(
this
,
planFile
);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
...
src/Vehicle/Vehicle.h
View file @
47a9895a
...
...
@@ -317,6 +317,7 @@ public:
Q_PROPERTY
(
QVariantList
toolBarIndicators
READ
toolBarIndicators
CONSTANT
)
Q_PROPERTY
(
QVariantList
cameraList
READ
cameraList
CONSTANT
)
Q_PROPERTY
(
QmlObjectListModel
*
adsbVehicles
READ
adsbVehicles
CONSTANT
)
Q_PROPERTY
(
bool
initialPlanRequestComplete
READ
initialPlanRequestComplete
NOTIFY
initialPlanRequestCompleteChanged
)
/// true: Vehicle is flying, false: Vehicle is on ground
Q_PROPERTY
(
bool
flying
READ
flying
NOTIFY
flyingChanged
)
...
...
@@ -429,6 +430,7 @@ public:
Q_INVOKABLE
void
clearMessages
();
Q_INVOKABLE
void
triggerCamera
(
void
);
Q_INVOKABLE
void
sendPlan
(
QString
planFile
);
#if 0
// Temporarily removed, waiting for new command implementation
...
...
@@ -700,7 +702,7 @@ public:
/// @return: true: initial request is complete, false: initial request is still in progress;
bool
initialPlanRequestComplete
(
void
)
const
{
return
_initialPlanRequestComplete
;
}
void
forceInitialPlanRequestComplete
(
void
)
{
_initialPlanRequestComplete
=
true
;
}
void
forceInitialPlanRequestComplete
(
void
)
;
void
_setFlying
(
bool
flying
);
void
_setLanding
(
bool
landing
);
...
...
@@ -734,7 +736,7 @@ signals:
void
firmwareTypeChanged
(
void
);
void
vehicleTypeChanged
(
void
);
void
capabilitiesKnownChanged
(
bool
capabilitiesKnown
);
void
initialPlanRequestComplete
d
(
void
);
void
initialPlanRequestComplete
Changed
(
bool
initialPlanRequestComplete
);
void
capabilityBitsChanged
(
uint64_t
capabilityBits
);
void
messagesReceivedChanged
();
...
...
src/qgcunittest/UnitTest.cc
View file @
47a9895a
...
...
@@ -394,7 +394,7 @@ void UnitTest::_connectMockLink(MAV_AUTOPILOT autopilot)
// Wait for plan request to complete
if
(
!
_vehicle
->
initialPlanRequestComplete
())
{
QSignalSpy
spyPlan
(
_vehicle
,
SIGNAL
(
initialPlanRequestComplete
d
(
)));
QSignalSpy
spyPlan
(
_vehicle
,
SIGNAL
(
initialPlanRequestComplete
Changed
(
bool
)));
QCOMPARE
(
spyPlan
.
wait
(
10000
),
true
);
}
}
...
...
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