From ef7f6002eef99ec15e9f8ed04bc5afc88cdf03c9 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 16 Oct 2016 11:37:53 -0700 Subject: [PATCH] Speed up unit testing --- src/comm/MockLink.cc | 2 +- src/qgcunittest/MavlinkLogTest.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comm/MockLink.cc b/src/comm/MockLink.cc index fce51b800..5dbec5851 100644 --- a/src/comm/MockLink.cc +++ b/src/comm/MockLink.cc @@ -143,7 +143,6 @@ void MockLink::run(void) void MockLink::_run1HzTasks(void) { if (_mavlinkStarted && _connected) { - _sendHeartBeat(); _sendVibration(); if (!qgcApp()->runningUnitTests()) { // Sending RC Channels during unit test breaks RC tests which does it's own RC simulation @@ -165,6 +164,7 @@ void MockLink::_run1HzTasks(void) void MockLink::_run10HzTasks(void) { if (_mavlinkStarted && _connected) { + _sendHeartBeat(); if (_sendGPSPositionDelayCount > 0) { // We delay gps position for better testing _sendGPSPositionDelayCount--; diff --git a/src/qgcunittest/MavlinkLogTest.cc b/src/qgcunittest/MavlinkLogTest.cc index 1953805cf..4a66ebf77 100644 --- a/src/qgcunittest/MavlinkLogTest.cc +++ b/src/qgcunittest/MavlinkLogTest.cc @@ -128,7 +128,7 @@ void MavlinkLogTest::_connectLogWorker(bool arm) if (arm) { qgcApp()->toolbox()->multiVehicleManager()->activeVehicle()->setArmed(true); - QTest::qWait(1500); // Wait long enough for heartbeat to come through + QTest::qWait(500); // Wait long enough for heartbeat to come through // On Disconnect: We should get a getSaveFileName dialog. logSaveDir.setPath(QStandardPaths::writableLocation(QStandardPaths::TempLocation)); -- 2.22.0