From 924c150af27484f9eb4439ec80c048b46c226890 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 6 Sep 2021 12:05:30 +0200 Subject: [PATCH] Possible bugfix in DHB The delayCycles variables needs to be initialized differently for periodic replies. It is initialized to the maxDelayCycles value now --- src/fsfw/devicehandlers/DeviceHandlerBase.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp index 478fc0416..dcce736ec 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp @@ -430,7 +430,12 @@ ReturnValue_t DeviceHandlerBase::insertInReplyMap(DeviceCommandId_t replyId, DeviceReplyInfo info; info.maxDelayCycles = maxDelayCycles; info.periodic = periodic; - info.delayCycles = 0; + if(info.periodic) { + info.delayCycles = info.maxDelayCycles; + } + else { + info.delayCycles = 0; + } info.replyLen = replyLen; info.dataSet = dataSet; info.command = deviceCommandMap.end();