Skip to content

Commit 118b8a0

Browse files
wonder-sknyalldawson
authored andcommitted
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. (cherry picked from commit 9d22389)
1 parent 4eb407c commit 118b8a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/gps/qgsgpsdetector.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void QgsGpsDetector::advance()
175175
serial->setDataBits( DATA_8 );
176176
serial->setStopBits( STOP_1 );
177177

178-
if ( serial->open( QIODevice::ReadOnly | QIODevice::Unbuffered ) )
178+
if ( serial->open( QIODevice::ReadOnly ) )
179179
{
180180
mConn = new QgsNmeaConnection( serial );
181181
}

0 commit comments

Comments
 (0)