mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user