Possible bugfix in DHB #469
Reference in New Issue
Block a user
Delete Branch "eive/fsfw:mueller/dhb-periodoc-reply-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The delayCycles variables needs to be initialized differently
for periodic replies. It is initialized to the
maxDelayCyclesvalue now.enableReplyInReplyMapwas not called in my specific use case because no commands were being sent. delayCycles needs to be initiaited to a non-zero value in the case of a periodic reply because otherwise,the wrong branch inenableReplywill be taken (see line ~800).The intended design was that periodic replies could be enabled and disabled.
insertInReplyMap()is only the definition of the reply and should not enable it directly.Enabling is performed by calling
updateReplyMapEntry()and thus settingdelayCycles.If you would like to make this a bit clearer, there could be an
[en|dis]ablePeriodicReplywhich has less parameters thanupdateReplyMapEntry(). Prbably none. It only verifies that the reply is indeed periodic and then sets thedelayCycles.Sounds good. So far, I have only needed periodic replies for devices like GPS which just start talking. There should be some form of decoumentation specifying what to do for that use case as well.
I updated the PR
Looks good