1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

OP-255 Only listen to autopilot connection/disconnection events, not to user disconnect events. There is a (by default) 8 second delay between a user disconnect and an autopilot connection lost event.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2370 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
edouard 2011-01-10 09:00:44 +00:00 committed by edouard
parent 3abcfc9608
commit e6cf9bfece

View File

@ -43,9 +43,12 @@ UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent)
connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect())); connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect()));
connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect())); connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect()));
// Note: remove listening to the connection manager, it overlaps with
// listening to the telemetry manager, we should only listen to one, not both.
// Also listen to disconnect actions from the user: // Also listen to disconnect actions from the user:
Core::ConnectionManager *cm = Core::ICore::instance()->connectionManager(); // Core::ConnectionManager *cm = Core::ICore::instance()->connectionManager();
connect(cm, SIGNAL(deviceDisconnected()), this, SLOT(onAutopilotDisconnect())); // connect(cm, SIGNAL(deviceDisconnected()), this, SLOT(onAutopilotDisconnect()));
connect(m_config->haltButton, SIGNAL(clicked()), this, SLOT(goToBootloader())); connect(m_config->haltButton, SIGNAL(clicked()), this, SLOT(goToBootloader()));