Browse Source

Make sure pluginReady before creating rc cal widget

QGC4.4
Don Gagne 10 years ago
parent
commit
4a35923473
  1. 6
      src/qgcunittest/PX4RCCalibrationTest.cc

6
src/qgcunittest/PX4RCCalibrationTest.cc

@ -154,6 +154,12 @@ void PX4RCCalibrationTest::init(void) @@ -154,6 +154,12 @@ void PX4RCCalibrationTest::init(void)
_autopilot = AutoPilotPluginManager::instance()->getInstanceForAutoPilotPlugin(UASManager::instance()->getActiveUAS());
Q_ASSERT(_autopilot);
QSignalSpy spyPlugin(_autopilot, SIGNAL(pluginReadyChanged(bool)));
if (!_autopilot->pluginReady()) {
QCOMPARE(spyPlugin.wait(10000), true);
}
Q_ASSERT(_autopilot->pluginReady());
// This will instatiate the widget with an active uas with ready parameters
_calWidget = new PX4RCCalibration();
Q_CHECK_PTR(_calWidget);

Loading…
Cancel
Save