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

Removed un-needed signals.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3002 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2011-03-07 22:06:57 +00:00 committed by pip
parent 191df1a118
commit 69b930899c
2 changed files with 1 additions and 39 deletions

View File

@ -74,7 +74,6 @@ void RawHIDConnection::onDeviceConnected()
*/
void RawHIDConnection::onDeviceDisconnected()
{
emit deviceClosed(this);
if (enablePolling)
emit availableDevChanged(this);
}
@ -86,7 +85,7 @@ QStringList RawHIDConnection::availableDevices()
{
QStringList devices;
QList<USBPortInfo> portsList = m_usbMonitor.availableDevices(0x20a0, -1, -1);
QList<USBPortInfo> portsList = m_usbMonitor.availableDevices(USB_VID, -1, -1);
// We currently list devices by their serial number
foreach(USBPortInfo prt, portsList) {
devices.append(prt.serialNumber);
@ -95,25 +94,6 @@ QStringList RawHIDConnection::availableDevices()
return devices;
}
/// TODO: still needed ???
void RawHIDConnection::onRawHidDestroyed(QObject *obj) // Pip
{
if (!RawHidHandle || RawHidHandle != obj)
return;
RawHidHandle = NULL;
}
/// TODO: still needed ???
void RawHIDConnection::onRawHidClosed()
{
if (RawHidHandle)
{
emit deviceClosed(this);
}
}
QIODevice *RawHIDConnection::openDevice(const QString &deviceName)
{
//added by andrew
@ -123,13 +103,6 @@ QIODevice *RawHIDConnection::openDevice(const QString &deviceName)
//return new RawHID(deviceName);
RawHidHandle = new RawHID(deviceName);
if (RawHidHandle)
{
connect(RawHidHandle, SIGNAL(closed()), this, SLOT(onRawHidClosed()), Qt::QueuedConnection);
connect(RawHidHandle, SIGNAL(destroyed(QObject *)), this, SLOT(onRawHidDestroyed(QObject *)), Qt::QueuedConnection);
}
return RawHidHandle;
}
@ -144,8 +117,6 @@ void RawHIDConnection::closeDevice(const QString &deviceName)
delete RawHidHandle;
RawHidHandle = NULL;
emit deviceClosed(this);
}
//end added by andrew
}

View File

@ -66,19 +66,10 @@ public:
bool deviceOpened() { return (RawHidHandle != NULL); } // Pip
signals:
void deviceClosed(QObject *obj); // Pip
public slots:
void onRawHidClosed();
protected slots:
void onDeviceConnected();
void onDeviceDisconnected();
private slots:
void onRawHidDestroyed(QObject *obj);
private:
RawHID *RawHidHandle;
bool enablePolling;