From a8cc3cf5b4361303e2f289f3f306d5deadf78b70 Mon Sep 17 00:00:00 2001 From: thewhobox <45664417+thewhobox@users.noreply.github.com> Date: Wed, 15 Mar 2023 20:38:40 +0100 Subject: [PATCH] fixed function data length --- src/knx/application_layer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/knx/application_layer.cpp b/src/knx/application_layer.cpp index 5e5f6b5..861f4a6 100644 --- a/src/knx/application_layer.cpp +++ b/src/knx/application_layer.cpp @@ -626,7 +626,7 @@ void ApplicationLayer::propertyValueWriteRequest(AckType ack, Priority priority, void ApplicationLayer::functionPropertyStateResponse(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, const SecurityControl& secCtrl, uint8_t objectIndex, uint8_t propertyId, uint8_t* resultData, uint8_t resultLength) { - CemiFrame frame(3 + resultLength + 1); + CemiFrame frame(3 + resultLength); APDU& apdu = frame.apdu(); apdu.type(FunctionPropertyStateResponse); uint8_t* data = apdu.data() + 1; @@ -1033,10 +1033,10 @@ void ApplicationLayer::individualIndication(HopCountType hopType, Priority prior break; } case FunctionPropertyCommand: - _bau.functionPropertyCommandIndication(priority, hopType, tsap, secCtrl, data[1], data[2], &data[3], apdu.length() - 4); //TODO: check length + _bau.functionPropertyCommandIndication(priority, hopType, tsap, secCtrl, data[1], data[2], &data[3], apdu.length() - 3); //TODO: check length break; case FunctionPropertyState: - _bau.functionPropertyStateIndication(priority, hopType, tsap, secCtrl, data[1], data[2], &data[3], apdu.length() - 4); //TODO: check length + _bau.functionPropertyStateIndication(priority, hopType, tsap, secCtrl, data[1], data[2], &data[3], apdu.length() - 3); //TODO: check length break; case FunctionPropertyExtCommand: {