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:
parent
ca7827e0cd
commit
13e631a2e4
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user