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 469eba3ce2
commit 924c150af2
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -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();