improvements for time service

This commit is contained in:
Robin Müller 2024-04-08 13:26:55 +02:00
parent 31d4b85523
commit efbcddc2e5
2 changed files with 6 additions and 3 deletions

View File

@ -28,9 +28,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- add CFDP subsystem ID - add CFDP subsystem ID
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/742 https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/742
- `PusTmZcWriter` now exposes API to set message counter field. - `PusTmZcWriter` now exposes API to set message counter field.
- Relative timeshift in the PUS time service.
## Changed ## 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. - HK generation is now countdown based.
- Bump ETL version to 20.35.14 - Bump ETL version to 20.35.14
https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/748 https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/748

View File

@ -34,11 +34,11 @@ ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) {
} }
case Subservice::RELATIVE_TIMESHIFT: { case Subservice::RELATIVE_TIMESHIFT: {
timeval currentTime; timeval currentTime;
ReturnValue_t result = Clock::getClock_timeval(&currentTime); ReturnValue_t result = Clock::getClock(&currentTime);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
triggerEvent(CLOCK_DUMP, currentTime.tv_sec, currentTime.tv_usec); reportTime(currentTime);
if (currentPacket.getUserDataLen() != 8) { if (currentPacket.getUserDataLen() != 8) {
return AcceptsTelecommandsIF::ILLEGAL_APPLICATION_DATA; return AcceptsTelecommandsIF::ILLEGAL_APPLICATION_DATA;
@ -95,7 +95,7 @@ ReturnValue_t Service9TimeManagement::setTime() {
void Service9TimeManagement::reportCurrentTime() { void Service9TimeManagement::reportCurrentTime() {
timeval currentTime{}; timeval currentTime{};
Clock::getClock_timeval(&currentTime); Clock::getClock(&currentTime);
triggerEvent(CLOCK_DUMP, currentTime.tv_sec, currentTime.tv_usec); triggerEvent(CLOCK_DUMP, currentTime.tv_sec, currentTime.tv_usec);
} }