From d93486a340907fb682e916ec702e1be4eb05e15f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:12:43 +0100 Subject: [PATCH 1/3] that time margin check is possible broken --- src/fsfw/pus/Service11TelecommandScheduling.tpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsfw/pus/Service11TelecommandScheduling.tpp b/src/fsfw/pus/Service11TelecommandScheduling.tpp index 540f6c689..d507e354a 100644 --- a/src/fsfw/pus/Service11TelecommandScheduling.tpp +++ b/src/fsfw/pus/Service11TelecommandScheduling.tpp @@ -160,7 +160,7 @@ inline ReturnValue_t Service11TelecommandScheduling::doInsertActivi // (See requirement for Time margin) timeval tNow = {}; Clock::getClock_timeval(&tNow); - if (timestamp - tNow.tv_sec <= RELEASE_TIME_MARGIN_SECONDS) { + if (timestamp >= tNow.tv_sec + RELEASE_TIME_MARGIN_SECONDS) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::warning << "Service11TelecommandScheduling::doInsertActivity: Release time too close to " "current time" -- 2.34.1 From b9b076aa4c08639e5a2dfb8caf0ec8cb764b048a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:13:58 +0100 Subject: [PATCH 2/3] logic error --- src/fsfw/pus/Service11TelecommandScheduling.tpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsfw/pus/Service11TelecommandScheduling.tpp b/src/fsfw/pus/Service11TelecommandScheduling.tpp index d507e354a..090d0fd62 100644 --- a/src/fsfw/pus/Service11TelecommandScheduling.tpp +++ b/src/fsfw/pus/Service11TelecommandScheduling.tpp @@ -160,7 +160,7 @@ inline ReturnValue_t Service11TelecommandScheduling::doInsertActivi // (See requirement for Time margin) timeval tNow = {}; Clock::getClock_timeval(&tNow); - if (timestamp >= tNow.tv_sec + RELEASE_TIME_MARGIN_SECONDS) { + if (timestamp < tNow.tv_sec + RELEASE_TIME_MARGIN_SECONDS) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::warning << "Service11TelecommandScheduling::doInsertActivity: Release time too close to " "current time" -- 2.34.1 From 341a66c2651b884667191b51c8246dad898d0f70 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 9 Feb 2023 18:22:00 +0100 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b77888084..7b2dcfc34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Fixes +- Bugfix in `Service11TelecommandScheduling` which allowed commands + time tagged in the past to be inserted. + PR: https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/738 - `CService200ModeManagement`: Various bugfixes which lead to now execution complete being generated on mode announcements, duplicate mode reply generated on announce commands, and the mode read subservice not working properly. -- 2.34.1