Fix valueNoSend: Do NOT End KO Uninitialized when Value Conversion Failed

This commit is contained in:
Cornelius Köpp 2024-11-01 20:22:16 +01:00
parent 3de8903b52
commit 483d868dac

View File

@ -282,10 +282,11 @@ void GroupObject::valueNoSend(const KNXValue& value)
void GroupObject::valueNoSend(const KNXValue& value, const Dpt& type) void GroupObject::valueNoSend(const KNXValue& value, const Dpt& type)
{ {
if (_commFlagEx.uninitialized) const bool encodingDone = KNX_Encode_Value(value, _data, _dataLength, type);
commFlag(Ok);
KNX_Encode_Value(value, _data, _dataLength, type); // initialize on succesful conversion only
if (encodingDone && _commFlagEx.uninitialized)
commFlag(Ok);
} }
bool GroupObject::valueNoSendCompare(const KNXValue& value, const Dpt& type) bool GroupObject::valueNoSendCompare(const KNXValue& value, const Dpt& type)