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
33983aa7
Commit
33983aa7
authored
May 11, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #656 from DonLakeFlyer/UASUnitTest
Fix UAS unit test for range and voltage change
parents
8f6e8117
fc369c16
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
UASUnitTest.cc
src/qgcunittest/UASUnitTest.cc
+7
-2
No files found.
src/qgcunittest/UASUnitTest.cc
View file @
33983aa7
...
@@ -73,15 +73,20 @@ void UASUnitTest::getCommunicationStatus_test()
...
@@ -73,15 +73,20 @@ void UASUnitTest::getCommunicationStatus_test()
void
UASUnitTest
::
filterVoltage_test
()
void
UASUnitTest
::
filterVoltage_test
()
{
{
float
verificar
=
uas
->
filterVoltage
(
0.4
f
);
float
verificar
=
uas
->
filterVoltage
(
0.4
f
);
// Verify that upon construction the Comm status is disconnected
QCOMPARE
(
verificar
,
8.52
f
);
// We allow the voltage returned to be within a small delta
const
float
allowedDelta
=
0.05
f
;
const
float
desiredVoltage
=
7.36
f
;
QVERIFY
(
verificar
>
(
desiredVoltage
-
allowedDelta
)
&&
verificar
<
(
desiredVoltage
+
allowedDelta
));
}
}
void
UASUnitTest
::
getAutopilotType_test
()
void
UASUnitTest
::
getAutopilotType_test
()
{
{
int
type
=
uas
->
getAutopilotType
();
int
type
=
uas
->
getAutopilotType
();
// Verify that upon construction the autopilot is set to -1
// Verify that upon construction the autopilot is set to -1
QCOMPARE
(
type
,
-
1
);
QCOMPARE
(
type
,
-
1
);
}
}
void
UASUnitTest
::
setAutopilotType_test
()
void
UASUnitTest
::
setAutopilotType_test
()
{
{
uas
->
setAutopilotType
(
2
);
uas
->
setAutopilotType
(
2
);
...
...
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