Skip to content
Snippets Groups Projects
Commit 4a359234 authored by Don Gagne's avatar Don Gagne
Browse files

Make sure pluginReady before creating rc cal widget

parent 8b47c541
Branches
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment