Merge pull request #991 from Lord-Grey/Fix_#903

Fix #903 - Adalight
This commit is contained in:
LordGrey 2020-09-05 15:11:23 +02:00 committed by GitHub
commit 24b861d3b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ bool ProviderRs232::tryOpen(int delayAfterConnect_ms)
_rs232Port.setBaudRate( _baudRate_Hz ); _rs232Port.setBaudRate( _baudRate_Hz );
Debug(_log, "_rs232Port.open(QIODevice::WriteOnly): %s, Baud rate [%d]bps", QSTRING_CSTR(_deviceName), _baudRate_Hz); Debug(_log, "_rs232Port.open(QIODevice::ReadWrite): %s, Baud rate [%d]bps", QSTRING_CSTR(_deviceName), _baudRate_Hz);
QSerialPortInfo serialPortInfo(_deviceName); QSerialPortInfo serialPortInfo(_deviceName);
@ -153,7 +153,7 @@ bool ProviderRs232::tryOpen(int delayAfterConnect_ms)
if (!serialPortInfo.isNull() ) if (!serialPortInfo.isNull() )
{ {
if ( !_rs232Port.open(QIODevice::WriteOnly) ) if ( !_rs232Port.open(QIODevice::ReadWrite) )
{ {
this->setInError(_rs232Port.errorString()); this->setInError(_rs232Port.errorString());
return false; return false;