Possible bugfix in DHB #469

Merged
muellerr merged 7 commits from eive/fsfw:mueller/dhb-periodoc-reply-fix into development 2021-09-13 10:58:34 +02:00
Owner

The delayCycles variables needs to be initialized differently
for periodic replies. It is initialized to the maxDelayCycles value now.

enableReplyInReplyMap was 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 in enableReply will be taken (see line ~800).

The delayCycles variables needs to be initialized differently for periodic replies. It is initialized to the `maxDelayCycles` value now. `enableReplyInReplyMap` was 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 in `enableReply` will be taken (see line ~800).
muellerr added 1 commit 2021-09-06 12:10:05 +02:00
The delayCycles variables needs to be initialized differently
for periodic replies.
It is initialized to the maxDelayCycles value now
muellerr added 1 commit 2021-09-06 12:10:28 +02:00
muellerr added the
bug
label 2021-09-06 12:11:29 +02:00
muellerr added this to the v2.0.0 milestone 2021-09-06 18:48:44 +02:00
muellerr added 1 commit 2021-09-06 18:52:00 +02:00
Owner

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 setting delayCycles.
If you would like to make this a bit clearer, there could be an [en|dis]ablePeriodicReply which has less parameters than updateReplyMapEntry(). Prbably none. It only verifies that the reply is indeed periodic and then sets the delayCycles.

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 setting `delayCycles`. If you would like to make this a bit clearer, there could be an `[en|dis]ablePeriodicReply` which has less parameters than `updateReplyMapEntry()`. Prbably none. It only verifies that the reply is indeed periodic and then sets the `delayCycles`.
Author
Owner

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.

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.
muellerr added 1 commit 2021-09-11 17:15:31 +02:00
muellerr added 1 commit 2021-09-11 17:40:11 +02:00
Author
Owner

I updated the PR

I updated the PR
muellerr added 1 commit 2021-09-11 17:42:41 +02:00
muellerr added 1 commit 2021-09-11 17:44:11 +02:00
mohr approved these changes 2021-09-13 10:43:58 +02:00
mohr left a comment
Owner

Looks good

Looks good
muellerr merged commit af133a2928 into development 2021-09-13 10:58:34 +02:00
muellerr deleted branch mueller/dhb-periodoc-reply-fix 2021-09-13 10:58:44 +02:00
Sign in to join this conversation.
No description provided.