Fix #1007 - LED's retain last state after clearing a source (#1008)

* 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:
LordGrey
2020-09-25 20:33:11 +02:00
committed by GitHub
parent 730b5d5681
commit 5d5b24979d
7 changed files with 22 additions and 496 deletions

View File

@@ -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;
}