mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-01 18:29:16 +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:
parent
191df1a118
commit
69b930899c
@ -74,7 +74,6 @@ void RawHIDConnection::onDeviceConnected()
|
|||||||
*/
|
*/
|
||||||
void RawHIDConnection::onDeviceDisconnected()
|
void RawHIDConnection::onDeviceDisconnected()
|
||||||
{
|
{
|
||||||
emit deviceClosed(this);
|
|
||||||
if (enablePolling)
|
if (enablePolling)
|
||||||
emit availableDevChanged(this);
|
emit availableDevChanged(this);
|
||||||
}
|
}
|
||||||
@ -86,7 +85,7 @@ QStringList RawHIDConnection::availableDevices()
|
|||||||
{
|
{
|
||||||
QStringList devices;
|
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
|
// We currently list devices by their serial number
|
||||||
foreach(USBPortInfo prt, portsList) {
|
foreach(USBPortInfo prt, portsList) {
|
||||||
devices.append(prt.serialNumber);
|
devices.append(prt.serialNumber);
|
||||||
@ -95,25 +94,6 @@ QStringList RawHIDConnection::availableDevices()
|
|||||||
return devices;
|
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)
|
QIODevice *RawHIDConnection::openDevice(const QString &deviceName)
|
||||||
{
|
{
|
||||||
//added by andrew
|
//added by andrew
|
||||||
@ -123,13 +103,6 @@ QIODevice *RawHIDConnection::openDevice(const QString &deviceName)
|
|||||||
|
|
||||||
//return new RawHID(deviceName);
|
//return new RawHID(deviceName);
|
||||||
RawHidHandle = 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;
|
return RawHidHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,8 +117,6 @@ void RawHIDConnection::closeDevice(const QString &deviceName)
|
|||||||
|
|
||||||
delete RawHidHandle;
|
delete RawHidHandle;
|
||||||
RawHidHandle = NULL;
|
RawHidHandle = NULL;
|
||||||
|
|
||||||
emit deviceClosed(this);
|
|
||||||
}
|
}
|
||||||
//end added by andrew
|
//end added by andrew
|
||||||
}
|
}
|
||||||
|
@ -66,19 +66,10 @@ public:
|
|||||||
|
|
||||||
bool deviceOpened() { return (RawHidHandle != NULL); } // Pip
|
bool deviceOpened() { return (RawHidHandle != NULL); } // Pip
|
||||||
|
|
||||||
signals:
|
|
||||||
void deviceClosed(QObject *obj); // Pip
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void onRawHidClosed();
|
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void onDeviceConnected();
|
void onDeviceConnected();
|
||||||
void onDeviceDisconnected();
|
void onDeviceDisconnected();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void onRawHidDestroyed(QObject *obj);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RawHID *RawHidHandle;
|
RawHID *RawHidHandle;
|
||||||
bool enablePolling;
|
bool enablePolling;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user