1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Please bare in mind I am not up to speed with this yet! This should fix the Windows / Linux serial stuff and I know it appears to work on Windows.

Stac, please let me know. Yeah, I should do this in a patch, but this change should do no harm as it keeps Windows working and Linux in theory. It is cosmetic for the list of ports. 

  



git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@721 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
dankers 2010-06-06 04:43:46 +00:00 committed by dankers
parent fee771fa7f
commit c35074c0f0

View File

@ -66,11 +66,7 @@ QStringList SerialConnection::availableDevices()
//sort the list by port number (nice idea from PT_Dreamer :))
qSort(ports.begin(), ports.end(),sortPorts);
foreach( QextPortInfo port, ports ) {
#ifdef Q_OS_WIN
list.append(port.portName);
#else
list.append(port.physName);
#endif
list.append(port.friendName);
}
return list;
@ -80,11 +76,7 @@ QIODevice *SerialConnection::openDevice(const QString &deviceName)
{
QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
foreach( QextPortInfo port, ports ) {
#ifdef Q_OS_WIN
if(port.portName == deviceName)
#else
if(port.physName == deviceName)
#endif
if(port.friendName == deviceName)
{
//we need to handle port settings here...
PortSettings set;