mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
gcs serial: fix for serial ports on linux (try #2)
This change adds '/dev' to the beginning of the portName on Linux. This doesn't seem quite right but using physName breaks serial port functionality on Windows. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@714 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
4615047608
commit
207e4b6a75
@ -49,7 +49,7 @@ QList<QextPortInfo> QextSerialEnumerator::getPorts()
|
||||
foreach (QString str , portNameList) {
|
||||
QextPortInfo inf;
|
||||
inf.physName = "/dev/"+str;
|
||||
inf.portName = str;
|
||||
inf.portName = "/dev/"+str;
|
||||
|
||||
if (str.contains("ttyS")) {
|
||||
inf.friendName = "Serial port "+str.remove(0, 4);
|
||||
|
@ -64,7 +64,7 @@ QStringList SerialConnection::availableDevices()
|
||||
//sort the list by port number (nice idea from PT_Dreamer :))
|
||||
qSort(ports.begin(), ports.end());
|
||||
foreach( QextPortInfo port, ports ) {
|
||||
list.append(port.portName);
|
||||
list.append(port.friendName);
|
||||
}
|
||||
|
||||
return list;
|
||||
@ -74,7 +74,7 @@ QIODevice *SerialConnection::openDevice(const QString &deviceName)
|
||||
{
|
||||
QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
|
||||
foreach( QextPortInfo port, ports ) {
|
||||
if(port.portName == deviceName)
|
||||
if(port.friendName == deviceName)
|
||||
{
|
||||
//we need to handle port settings here...
|
||||
PortSettings set;
|
||||
|
Loading…
x
Reference in New Issue
Block a user