Skip to content

Commit 9d22389

Browse files
committed
Fix connection to GPS using serial port
It was impossible to start GPS live tracking when connecting via a serial port rather than gpsd. QSerialPort in Qt5 does not support Unbuffered open mode and will just fail (around line 545): https://github.com/qt/qtserialport/blob/5.11/src/serialport/qserialport.cpp This was not a problem in QGIS 2.x / Qt4 where we used QextSerialPort which did not have such test.
1 parent 0865297 commit 9d22389

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/gps/qgsgpsdetector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void QgsGpsDetector::advance()
124124
serial->setDataBits( QSerialPort::Data8 );
125125
serial->setStopBits( QSerialPort::OneStop );
126126

127-
if ( serial->open( QIODevice::ReadOnly | QIODevice::Unbuffered ) )
127+
if ( serial->open( QIODevice::ReadOnly ) )
128128
{
129129
mConn = new QgsNmeaConnection( serial );
130130
}

0 commit comments

Comments
 (0)