Possible bugfix in DHB

The delayCycles variables needs to be initialized differently
for periodic replies.
It is initialized to the maxDelayCycles value now
This commit is contained in:
Robin Müller 2021-09-06 12:05:30 +02:00
parent 2d667cfb95
commit a6d744c9c8

View File

@ -430,7 +430,12 @@ ReturnValue_t DeviceHandlerBase::insertInReplyMap(DeviceCommandId_t replyId,
DeviceReplyInfo info; DeviceReplyInfo info;
info.maxDelayCycles = maxDelayCycles; info.maxDelayCycles = maxDelayCycles;
info.periodic = periodic; info.periodic = periodic;
if(info.periodic) {
info.delayCycles = info.maxDelayCycles;
}
else {
info.delayCycles = 0; info.delayCycles = 0;
}
info.replyLen = replyLen; info.replyLen = replyLen;
info.dataSet = dataSet; info.dataSet = dataSet;
info.command = deviceCommandMap.end(); info.command = deviceCommandMap.end();