From efbcddc2e5e3e5c53675d46b856ca75eb4453741 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 8 Apr 2024 13:26:55 +0200 Subject: [PATCH] improvements for time service --- CHANGELOG.md | 3 +++ src/fsfw/pus/Service9TimeManagement.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 024903aa..44b0641b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,9 +28,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - add CFDP subsystem ID https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/742 - `PusTmZcWriter` now exposes API to set message counter field. +- Relative timeshift in the PUS time service. ## Changed +- The PUS time service now dumps the time before setting a new time and after having set the + time. - HK generation is now countdown based. - Bump ETL version to 20.35.14 https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/748 diff --git a/src/fsfw/pus/Service9TimeManagement.cpp b/src/fsfw/pus/Service9TimeManagement.cpp index 3a8341d8..cbc9bd55 100644 --- a/src/fsfw/pus/Service9TimeManagement.cpp +++ b/src/fsfw/pus/Service9TimeManagement.cpp @@ -34,11 +34,11 @@ ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) { } case Subservice::RELATIVE_TIMESHIFT: { timeval currentTime; - ReturnValue_t result = Clock::getClock_timeval(¤tTime); + ReturnValue_t result = Clock::getClock(¤tTime); if (result != returnvalue::OK) { return result; } - triggerEvent(CLOCK_DUMP, currentTime.tv_sec, currentTime.tv_usec); + reportTime(currentTime); if (currentPacket.getUserDataLen() != 8) { return AcceptsTelecommandsIF::ILLEGAL_APPLICATION_DATA; @@ -95,7 +95,7 @@ ReturnValue_t Service9TimeManagement::setTime() { void Service9TimeManagement::reportCurrentTime() { timeval currentTime{}; - Clock::getClock_timeval(¤tTime); + Clock::getClock(¤tTime); triggerEvent(CLOCK_DUMP, currentTime.tv_sec, currentTime.tv_usec); }