From c1588e12d501f639516e23036fa4a84a5ec9d01e Mon Sep 17 00:00:00 2001 From: Ing-Dom Date: Mon, 23 Dec 2024 22:11:34 +0100 Subject: [PATCH] fix Bau091A:IsAckRequired for Broadcasts --- src/knx/bau091A.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/knx/bau091A.cpp b/src/knx/bau091A.cpp index 430f2e62..e828035d 100644 --- a/src/knx/bau091A.cpp +++ b/src/knx/bau091A.cpp @@ -175,17 +175,25 @@ TPAckType Bau091A::isAckRequired(uint16_t address, bool isGrpAddr) { // ACK for broadcasts if (address == 0) + { ack = TPAckType::AckReqAck; - - if(lcconfig & LCCONFIG::GROUP_IACK_ROUT) - // is group address in filter table? ACK if yes, No if not - if(_netLayer.isRoutedGroupAddress(address, 1)) - ack = TPAckType::AckReqAck; - else - ack = TPAckType::AckReqNone; + } else - // all are ACKED - ack = TPAckType::AckReqAck; + { + if(lcconfig & LCCONFIG::GROUP_IACK_ROUT) + { + // is group address in filter table? ACK if yes, No if not + if(_netLayer.isRoutedGroupAddress(address, 1)) + ack = TPAckType::AckReqAck; + else + ack = TPAckType::AckReqNone; + } + else + { + // all are ACKED + ack = TPAckType::AckReqAck; + } + } #ifdef KNX_TUNNELING if(_dlLayerPrimary.isSentToTunnel(address, isGrpAddr)) ack = TPAckType::AckReqAck; @@ -209,7 +217,7 @@ TPAckType Bau091A::isAckRequired(uint16_t address, bool isGrpAddr) #endif } - + printf("ack %u\n", ack); return ack; }