From 8e2facbb9d2654ef615ca6820c97d15f46906502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20K=C3=B6pp?= Date: Fri, 1 Nov 2024 20:22:16 +0100 Subject: [PATCH] (Prepare for devel) Fix: Do NOT Send when Updating KO Failed on Value Conversion - Change Signature of all Set-Methods --- src/knx/group_object/group_object.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/knx/group_object/group_object.h b/src/knx/group_object/group_object.h index 4caa44c..09fa81a 100644 --- a/src/knx/group_object/group_object.h +++ b/src/knx/group_object/group_object.h @@ -534,7 +534,15 @@ namespace Knx // convert new value to given dtp uint8_t newData[_dataLength]; memset(newData, 0, _dataLength); + + const bool encodingDone = true; // TODO FIXME for devel! value.encode needs success indicator value.encode(newData); + if (!encodingDone) + { + // value conversion to DPT failed + // do NOT update the value of the KO! + return false; + } // check for change in converted value / update value on change only const bool dataChanged = memcmp(_data, newData, _dataLength);