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
cc460874
Commit
cc460874
authored
Aug 20, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for cameraTrigger=true default
parent
055a51a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
ComplexMissionItemTest.cc
src/MissionManager/ComplexMissionItemTest.cc
+11
-10
No files found.
src/MissionManager/ComplexMissionItemTest.cc
View file @
cc460874
...
...
@@ -170,7 +170,7 @@ void ComplexMissionItemTest::_testClearPolygon(void)
void
ComplexMissionItemTest
::
_testCameraTrigger
(
void
)
{
Q
VERIFY
(
!
_complexItem
->
property
(
"cameraTrigger"
).
toBool
()
);
Q
COMPARE
(
_complexItem
->
property
(
"cameraTrigger"
).
toBool
(),
true
);
// Turning on/off camera triggering while there is no grid should trigger:
// cameraTriggerChanged
...
...
@@ -178,17 +178,18 @@ void ComplexMissionItemTest::_testCameraTrigger(void)
// lastSequenceNumber should not change
int
lastSeq
=
_complexItem
->
lastSequenceNumber
();
_complexItem
->
setProperty
(
"cameraTrigger"
,
true
);
_complexItem
->
setProperty
(
"cameraTrigger"
,
false
);
QVERIFY
(
_multiSpy
->
checkOnlySignalByMask
(
dirtyChangedMask
|
cameraTriggerChangedMask
));
QVERIFY
(
_multiSpy
->
pullBoolFromSignalIndex
(
cameraTriggerChangedIndex
));
QVERIFY
(
!
_multiSpy
->
pullBoolFromSignalIndex
(
cameraTriggerChangedIndex
));
QCOMPARE
(
_complexItem
->
lastSequenceNumber
(),
lastSeq
);
_complexItem
->
setDirty
(
false
);
_multiSpy
->
clearAllSignals
();
_complexItem
->
setProperty
(
"cameraTrigger"
,
fals
e
);
_complexItem
->
setProperty
(
"cameraTrigger"
,
tru
e
);
QVERIFY
(
_multiSpy
->
checkOnlySignalByMask
(
dirtyChangedMask
|
cameraTriggerChangedMask
));
QVERIFY
(
!
_multiSpy
->
pullBoolFromSignalIndex
(
cameraTriggerChangedIndex
));
QVERIFY
(
_multiSpy
->
pullBoolFromSignalIndex
(
cameraTriggerChangedIndex
));
QCOMPARE
(
_complexItem
->
lastSequenceNumber
(),
lastSeq
);
// Set up a grid
...
...
@@ -203,20 +204,20 @@ void ComplexMissionItemTest::_testCameraTrigger(void)
lastSeq
=
_complexItem
->
lastSequenceNumber
();
QVERIFY
(
lastSeq
>
0
);
// Turning o
n camera triggering should add two more
mission items, this should trigger:
// Turning o
ff camera triggering should remove two camera trigger
mission items, this should trigger:
// lastSequenceNumberChanged
// dirtyChanged
_complexItem
->
setProperty
(
"cameraTrigger"
,
tru
e
);
_complexItem
->
setProperty
(
"cameraTrigger"
,
fals
e
);
QVERIFY
(
_multiSpy
->
checkOnlySignalByMask
(
lastSequenceNumberChangedMask
|
dirtyChangedMask
|
cameraTriggerChangedMask
));
QCOMPARE
(
_multiSpy
->
pullIntFromSignalIndex
(
lastSequenceNumberChangedIndex
),
lastSeq
+
2
);
QCOMPARE
(
_multiSpy
->
pullIntFromSignalIndex
(
lastSequenceNumberChangedIndex
),
lastSeq
-
2
);
_complexItem
->
setDirty
(
false
);
_multiSpy
->
clearAllSignals
();
// Turn o
ff
camera triggering and make sure things go back to previous count
// Turn o
n
camera triggering and make sure things go back to previous count
_complexItem
->
setProperty
(
"cameraTrigger"
,
fals
e
);
_complexItem
->
setProperty
(
"cameraTrigger"
,
tru
e
);
QVERIFY
(
_multiSpy
->
checkOnlySignalByMask
(
lastSequenceNumberChangedMask
|
dirtyChangedMask
|
cameraTriggerChangedMask
));
QCOMPARE
(
_multiSpy
->
pullIntFromSignalIndex
(
lastSequenceNumberChangedIndex
),
lastSeq
);
}
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