Skip to content


Fix connection to GPS using serial port
Browse files Browse the repository at this point in the history
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):

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)
  • Loading branch information
wonder-sk authored and nyalldawson committed Sep 14, 2018
1 parent 4eb407c commit 118b8a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/gps/qgsgpsdetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void QgsGpsDetector::advance()
serial->setDataBits( DATA_8 );
serial->setStopBits( STOP_1 );

if ( serial->open( QIODevice::ReadOnly | QIODevice::Unbuffered ) )
if ( serial->open( QIODevice::ReadOnly ) )
mConn = new QgsNmeaConnection( serial );
Expand Down

0 comments on commit 118b8a0

Please sign in to comment.