mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Small fix to System Health gadget, to make it behave correctly when started while the connection is up already.
This commit is contained in:
parent
3a17168708
commit
2d6b4dce55
@ -151,6 +151,16 @@ void SystemHealthGadgetWidget::setSystemFile(QString dfn)
|
||||
QGraphicsScene *l_scene = scene();
|
||||
l_scene->setSceneRect(background->boundingRect());
|
||||
fitInView(background, Qt::KeepAspectRatio );
|
||||
|
||||
// Check whether the autopilot is connected already, by the way:
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
||||
TelemetryManager* telMngr = pm->getObject<TelemetryManager>();
|
||||
if (telMngr->isConnected()) {
|
||||
onAutopilotConnect();
|
||||
SystemAlarms* obj = dynamic_cast<SystemAlarms*>(objManager->getObject(QString("SystemAlarms")));
|
||||
updateAlarms(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user