mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
Remove some comments and unused variables
This commit is contained in:
parent
65ef8a59b4
commit
19eaa77a15
@ -103,8 +103,6 @@ bool ConnectionManager::connectDevice()
|
||||
|
||||
// check if opening the device worked
|
||||
if (!io_dev->isOpen()) {
|
||||
qDebug() << "Error: io_dev->isOpen() returned FALSE .. could not open connection to " << connection_device.devName
|
||||
<< ": " << io_dev->errorString();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -145,7 +143,7 @@ bool ConnectionManager::disconnectDevice()
|
||||
m_connectionDevice.connection->closeDevice(m_connectionDevice.getConName());
|
||||
}
|
||||
} catch (...) { // handle exception
|
||||
qDebug() << "Exception: m_connectionDevice.connection->closeDevice(" << m_connectionDevice.devName << ")";
|
||||
qDebug() << "Exception: m_connectionDevice.connection->closeDevice(" << m_connectionDevice.getConName() << ")";
|
||||
}
|
||||
|
||||
m_connectionDevice.connection = NULL;
|
||||
@ -166,9 +164,6 @@ void ConnectionManager::objectAdded(QObject *obj)
|
||||
IConnection *connection = Aggregation::query<IConnection>(obj);
|
||||
if (!connection) return;
|
||||
|
||||
//qDebug() << "Connection object registered:" << connection->connectionName();
|
||||
//qDebug() << connection->availableDevices();
|
||||
|
||||
//register devices and populate CB
|
||||
devChanged(connection);
|
||||
|
||||
@ -200,7 +195,6 @@ void ConnectionManager::aboutToRemoveObject(QObject *obj)
|
||||
void ConnectionManager::onConnectionDestroyed(QObject *obj)
|
||||
{
|
||||
Q_UNUSED(obj)
|
||||
//onConnectionClosed(obj);
|
||||
disconnectDevice();
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,6 @@ void IPConnection::onOpenDevice(QString HostName, int Port, bool UseTCP)
|
||||
{
|
||||
QAbstractSocket *ipSocket;
|
||||
const int Timeout = 5 * 1000;
|
||||
int state;
|
||||
|
||||
ipConMutex.lock();
|
||||
if (UseTCP) {
|
||||
@ -175,7 +174,7 @@ QList <Core::IConnection::device> IPconnectionConnection::availableDevices()
|
||||
return list;
|
||||
}
|
||||
|
||||
QIODevice *IPconnectionConnection::openDevice(const QString &deviceName)
|
||||
QIODevice *IPconnectionConnection::openDevice(const QString &)
|
||||
{
|
||||
QString HostName;
|
||||
int Port;
|
||||
@ -209,7 +208,7 @@ QIODevice *IPconnectionConnection::openDevice(const QString &deviceName)
|
||||
return ipSocket;
|
||||
}
|
||||
|
||||
void IPconnectionConnection::closeDevice(const QString &deviceName)
|
||||
void IPconnectionConnection::closeDevice(const QString &)
|
||||
{
|
||||
if (ipSocket){
|
||||
ipConMutex.lock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user