1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

ConnectionManager: add connect/reconnect timer management into telemetryconnect/disconnect slots

This commit is contained in:
Mike LaBranche 2012-08-16 21:13:07 -07:00
parent ca7827e0cd
commit 13e631a2e4

View File

@ -262,6 +262,9 @@ void ConnectionManager::telemetryConnected()
{
qDebug() << "TelemetryMonitor: connected";
if(reconnectCheck->isActive())
reconnectCheck->stop();
//tell the monitor we're connected
m_monitorWidget->connect();
}
@ -273,6 +276,13 @@ void ConnectionManager::telemetryDisconnected()
{
qDebug() << "TelemetryMonitor: disconnected";
if (m_ioDev){
if(m_connectionDevice.connection->shortName()=="Serial") {
if(!reconnect->isActive())
reconnect->start(1000);
}
}
//tell the monitor we're disconnected
m_monitorWidget->disconnect();
}