Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
5040e3d9
Commit
5040e3d9
authored
Dec 26, 2016
by
Don Gagne
Browse files
Use ArduPilot for testing
PX4 doesn't retry commands by default
parent
e4f91c4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Vehicle/SendMavCommandTest.cc
View file @
5040e3d9
...
...
@@ -14,7 +14,7 @@
void
SendMavCommandTest
::
_noFailure
(
void
)
{
_connectMockLink
();
_connectMockLink
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
MultiVehicleManager
*
vehicleMgr
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
();
Vehicle
*
vehicle
=
vehicleMgr
->
activeVehicle
();
...
...
@@ -37,7 +37,7 @@ void SendMavCommandTest::_failureShowError(void)
// Will pop error about request failure
setExpectedMessageBox
(
QMessageBox
::
Ok
);
_connectMockLink
();
_connectMockLink
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
MultiVehicleManager
*
vehicleMgr
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
();
Vehicle
*
vehicle
=
vehicleMgr
->
activeVehicle
();
...
...
@@ -60,7 +60,7 @@ void SendMavCommandTest::_failureShowError(void)
void
SendMavCommandTest
::
_failureNoShowError
(
void
)
{
_connectMockLink
();
_connectMockLink
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
MultiVehicleManager
*
vehicleMgr
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
();
Vehicle
*
vehicle
=
vehicleMgr
->
activeVehicle
();
...
...
@@ -80,7 +80,7 @@ void SendMavCommandTest::_failureNoShowError(void)
void
SendMavCommandTest
::
_noFailureAfterRetry
(
void
)
{
_connectMockLink
();
_connectMockLink
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
MultiVehicleManager
*
vehicleMgr
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
();
Vehicle
*
vehicle
=
vehicleMgr
->
activeVehicle
();
...
...
@@ -103,7 +103,7 @@ void SendMavCommandTest::_failureAfterRetry(void)
// Will pop error about request failure
setExpectedMessageBox
(
QMessageBox
::
Ok
);
_connectMockLink
();
_connectMockLink
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
MultiVehicleManager
*
vehicleMgr
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
();
Vehicle
*
vehicle
=
vehicleMgr
->
activeVehicle
();
...
...
@@ -129,7 +129,7 @@ void SendMavCommandTest::_failureAfterNoReponse(void)
// Will pop error about request failure
setExpectedMessageBox
(
QMessageBox
::
Ok
);
_connectMockLink
();
_connectMockLink
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
MultiVehicleManager
*
vehicleMgr
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
();
Vehicle
*
vehicle
=
vehicleMgr
->
activeVehicle
();
...
...
@@ -138,7 +138,7 @@ void SendMavCommandTest::_failureAfterNoReponse(void)
vehicle
->
sendMavCommand
(
MAV_COMP_ID_ALL
,
MAV_CMD_USER_5
,
true
/* showError */
);
QSignalSpy
spyResult
(
vehicle
,
SIGNAL
(
mavCommandResult
(
int
,
int
,
int
,
int
,
bool
)));
QCOMPARE
(
spyResult
.
wait
(
1
0000
),
true
);
QCOMPARE
(
spyResult
.
wait
(
2
0000
),
true
);
QList
<
QVariant
>
arguments
=
spyResult
.
takeFirst
();
QCOMPARE
(
arguments
.
count
(),
5
);
QCOMPARE
(
arguments
.
at
(
0
).
toInt
(),
vehicle
->
id
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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