mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* Save BLACK as lastLedColor during writeBlack
* Remove debug statement overhead
* Re-Add typecasting to ensure readable output
* Revert "New language support: Russian and Chinese (simplified)"
This reverts commit 5c95fab894
.
* Ignore TemporaryError
This commit is contained in:
@@ -193,8 +193,6 @@ void ProviderRs232::setInError(const QString& errorMsg)
|
||||
|
||||
int ProviderRs232::writeBytes(const qint64 size, const uint8_t *data)
|
||||
{
|
||||
DebugIf(_isInSwitchOff, _log, "_inClosing [%d], enabled [%d], _deviceReady [%d], _frameDropCounter [%d]", _isInSwitchOff, _isEnabled, _isDeviceReady, _frameDropCounter);
|
||||
|
||||
int rc = 0;
|
||||
if (!_rs232Port.isOpen())
|
||||
{
|
||||
@@ -205,9 +203,6 @@ int ProviderRs232::writeBytes(const qint64 size, const uint8_t *data)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
DebugIf( _isInSwitchOff, _log, "[%s]", QSTRING_CSTR(uint8_t_to_hex_string(data, size, 32)) );
|
||||
|
||||
qint64 bytesWritten = _rs232Port.write(reinterpret_cast<const char*>(data), size);
|
||||
if (bytesWritten == -1 || bytesWritten != size)
|
||||
{
|
||||
@@ -243,13 +238,7 @@ int ProviderRs232::writeBytes(const qint64 size, const uint8_t *data)
|
||||
rc = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugIf(_isInSwitchOff,_log, "In Closing: bytesWritten [%d], _rs232Port.error() [%d], %s", bytesWritten, _rs232Port.error(), _rs232Port.error() == QSerialPort::NoError ? "No Error" : QSTRING_CSTR(_rs232Port.errorString()) );
|
||||
}
|
||||
}
|
||||
|
||||
DebugIf(_isInSwitchOff, _log, "[%d], _inClosing[%d], enabled [%d], _deviceReady [%d]", rc, _isInSwitchOff, _isEnabled, _isDeviceReady);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user