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
21ebc83a
Commit
21ebc83a
authored
Feb 13, 2017
by
Don Gagne
Committed by
GitHub
Feb 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4526 from DonLakeFlyer/SurveyUT
Fix ComplexMissionItemText unit test crash
parents
143434f4
d4ce5a93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
24 deletions
+8
-24
ComplexMissionItemTest.cc
src/MissionManager/ComplexMissionItemTest.cc
+1
-21
SurveyMissionItem.cc
src/MissionManager/SurveyMissionItem.cc
+7
-3
No files found.
src/MissionManager/ComplexMissionItemTest.cc
View file @
21ebc83a
...
...
@@ -180,26 +180,6 @@ void ComplexMissionItemTest::_testCameraTrigger(void)
{
QCOMPARE
(
_complexItem
->
property
(
"cameraTrigger"
).
toBool
(),
true
);
// Turning on/off camera triggering while there is no grid should trigger:
// cameraTriggerChanged
// dirtyChanged
// lastSequenceNumber should not change
int
lastSeq
=
_complexItem
->
lastSequenceNumber
();
_complexItem
->
setProperty
(
"cameraTrigger"
,
false
);
QVERIFY
(
_multiSpy
->
checkOnlySignalByMask
(
dirtyChangedMask
|
cameraTriggerChangedMask
));
QVERIFY
(
!
_multiSpy
->
pullBoolFromSignalIndex
(
cameraTriggerChangedIndex
));
QCOMPARE
(
_complexItem
->
lastSequenceNumber
(),
lastSeq
);
_complexItem
->
setDirty
(
false
);
_multiSpy
->
clearAllSignals
();
_complexItem
->
setProperty
(
"cameraTrigger"
,
true
);
QVERIFY
(
_multiSpy
->
checkOnlySignalByMask
(
dirtyChangedMask
|
cameraTriggerChangedMask
));
QVERIFY
(
_multiSpy
->
pullBoolFromSignalIndex
(
cameraTriggerChangedIndex
));
QCOMPARE
(
_complexItem
->
lastSequenceNumber
(),
lastSeq
);
// Set up a grid
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -209,7 +189,7 @@ void ComplexMissionItemTest::_testCameraTrigger(void)
_complexItem
->
setDirty
(
false
);
_multiSpy
->
clearAllSignals
();
lastSeq
=
_complexItem
->
lastSequenceNumber
();
int
lastSeq
=
_complexItem
->
lastSequenceNumber
();
QVERIFY
(
lastSeq
>
0
);
// Turning off camera triggering should remove two camera trigger mission items, this should trigger:
...
...
src/MissionManager/SurveyMissionItem.cc
View file @
21ebc83a
...
...
@@ -136,9 +136,13 @@ SurveyMissionItem::SurveyMissionItem(Vehicle* vehicle, QObject* parent)
connect
(
this
,
&
SurveyMissionItem
::
cameraTriggerChanged
,
this
,
&
SurveyMissionItem
::
_cameraTriggerChanged
);
connect
(
&
_cameraTriggerDistanceFact
,
&
Fact
::
valueChanged
,
this
,
&
SurveyMissionItem
::
timeBetweenShotsChanged
);
connect
(
_vehicle
,
&
Vehicle
::
cruiseSpeedChanged
,
this
,
&
SurveyMissionItem
::
timeBetweenShotsChanged
);
connect
(
_vehicle
,
&
Vehicle
::
hoverSpeedChanged
,
this
,
&
SurveyMissionItem
::
timeBetweenShotsChanged
);
connect
(
&
_cameraTriggerDistanceFact
,
&
Fact
::
valueChanged
,
this
,
&
SurveyMissionItem
::
timeBetweenShotsChanged
);
// NULL check since object creation during unit testing passes NULL for vehicle
if
(
_vehicle
)
{
connect
(
_vehicle
,
&
Vehicle
::
cruiseSpeedChanged
,
this
,
&
SurveyMissionItem
::
timeBetweenShotsChanged
);
connect
(
_vehicle
,
&
Vehicle
::
hoverSpeedChanged
,
this
,
&
SurveyMissionItem
::
timeBetweenShotsChanged
);
}
}
void
SurveyMissionItem
::
_setSurveyDistance
(
double
surveyDistance
)
...
...
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