Skip to content

Commit

Permalink
Fix valueNoSend: Do NOT End KO Uninitialized when Value Conversion …
Browse files Browse the repository at this point in the history
…Failed
  • Loading branch information
cornelius-koepp committed Nov 1, 2024
1 parent 3de8903 commit 483d868
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/knx/group_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,11 @@ void GroupObject::valueNoSend(const KNXValue& value)

void GroupObject::valueNoSend(const KNXValue& value, const Dpt& type)
{
if (_commFlagEx.uninitialized)
commFlag(Ok);
const bool encodingDone = KNX_Encode_Value(value, _data, _dataLength, type);

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)
Expand Down

0 comments on commit 483d868

Please sign in to comment.