Improvements (#1658)

* Restart Servial Device, if write error occurred.

* Fix typos

* Fix FOUND_USER command

* Use SUDO_USER in postinst

* Align install_pr with new package names

* Package named arm64 instead of aarch64

* Update Change log

* Fix to have the architecture resolved

* All tls plugin directory for Qt6

---------

Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
LordGrey
2023-11-23 20:51:49 +01:00
committed by GitHub
parent cd1046ac1f
commit 2e0cc9cfa8
10 changed files with 129 additions and 94 deletions

View File

@@ -185,7 +185,7 @@ bool ProviderRs232::tryOpen(int delayAfterConnect_ms)
}
else
{
QString errortext = QString("Invalid serial device name: %1 %2!").arg(_deviceName, _location);
QString errortext = QString("Invalid serial device: %1 %2!").arg(_deviceName, _location);
this->setInError( errortext );
return false;
}
@@ -237,9 +237,9 @@ int ProviderRs232::writeBytes(const qint64 size, const uint8_t *data)
{
if (!_rs232Port.waitForBytesWritten(WRITE_TIMEOUT.count()))
{
if ( _rs232Port.error() == QSerialPort::TimeoutError )
if (_rs232Port.error() == QSerialPort::TimeoutError)
{
Debug(_log, "Timeout after %dms: %d frames already dropped", WRITE_TIMEOUT.count(), _frameDropCounter);
Debug(_log, "Timeout after %dms: %d frames already dropped, Rs232 SerialPortError [%d]: %s", WRITE_TIMEOUT.count(), _frameDropCounter, _rs232Port.error(), QSTRING_CSTR(_rs232Port.errorString()));
++_frameDropCounter;
@@ -258,10 +258,16 @@ int ProviderRs232::writeBytes(const qint64 size, const uint8_t *data)
}
else
{
this->setInError( QString ("Rs232 SerialPortError: %1").arg(_rs232Port.errorString()) );
this->setInError( QString ("Error writing data to %1, Error: %2").arg(_deviceName).arg(_rs232Port.error()));
rc = -1;
}
}
if (rc == -1)
{
Info(_log, "Try restarting the device %s after error occured...", QSTRING_CSTR(_activeDeviceType));
emit enable();
}
}
return rc;
}