dhb multiple replies support #416

Merged
gaisser merged 3 commits from eive/fsfw:meier/multipleRepliesDhb into development 2021-04-27 14:18:15 +02:00
Showing only changes of commit 054de9781b - Show all commits

View File

@ -308,11 +308,11 @@ void DeviceHandlerBase::doStateMachine() {
uint32_t currentUptime;
Clock::getUptime(&currentUptime);
if (currentUptime - timeoutStart >= childTransitionDelay) {
#if FSFW_VERBOSE_LEVEL >= 1
#if FSFW_VERBOSE_LEVEL >= 1 && FSFW_OBJ_EVENT_TRANSLATION == 0
char printout[60];
gaisser marked this conversation as resolved
Review

This information is part of the event below (Line 319), which is printed as debug output as well. Is there a special reason to print it twice?

This information is part of the event below (Line 319), which is printed as debug output as well. Is there a special reason to print it twice?
Review

It is not printed if FSFW_OBJ_EVENT_TRANSLATION == 0 . I suggest to change
#if FSFW_VERBOSE_LEVEL >= 1 to #if FSFW_VERBOSE_LEVEL >= 1 && FSFW_OBJ_EVENT_TRANSLATION == 0

It is not printed if `FSFW_OBJ_EVENT_TRANSLATION == 0` . I suggest to change `#if FSFW_VERBOSE_LEVEL >= 1` to `#if FSFW_VERBOSE_LEVEL >= 1 && FSFW_OBJ_EVENT_TRANSLATION == 0`
Review

This is something I wrote and we decided to keep it in there because it's a useful printout

This is something I wrote and we decided to keep it in there because it's a useful printout
Review

Ok, than we keep it but I disagree with the comment:

/* Very common configuration error, so print it */

This happens in flight as well if your device does not respond, which happens from time to time for radiation.

It is not printed if FSFW_OBJ_EVENT_TRANSLATION == 0 . I suggest to change
#if FSFW_VERBOSE_LEVEL >= 1 to #if FSFW_VERBOSE_LEVEL >= 1 && FSFW_OBJ_EVENT_TRANSLATION == 0

I think the second one is a good idea. Otherwise you will just spam your console with duplicate information.

Ok, than we keep it but I disagree with the comment: /* Very common configuration error, so print it */ This happens in flight as well if your device does not respond, which happens from time to time for radiation. > It is not printed if `FSFW_OBJ_EVENT_TRANSLATION == 0` . I suggest to change > `#if FSFW_VERBOSE_LEVEL >= 1` to `#if FSFW_VERBOSE_LEVEL >= 1 && FSFW_OBJ_EVENT_TRANSLATION == 0` I think the second one is a good idea. Otherwise you will just spam your console with duplicate information.
sprintf(printout, "Transition timeout (%lu) occured !",
static_cast<unsigned long>(childTransitionDelay));
/* Very common configuration error, so print it */
/* Common configuration error for development, so print it */
printWarningOrError(sif::OutputTypes::OUT_WARNING, "doStateMachine",
RETURN_FAILED, printout);
#endif