implement relative timeshift #173

Merged
muellerr merged 10 commits from time-service-relative-timeshift into develop 2024-04-09 13:31:13 +02:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit efbcddc2e5 - Show all commits

View File

@ -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

View File

@ -34,11 +34,11 @@ ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) {
}
case Subservice::RELATIVE_TIMESHIFT: {
timeval currentTime;
ReturnValue_t result = Clock::getClock_timeval(&currentTime);
ReturnValue_t result = Clock::getClock(&currentTime);
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(&currentTime);
Clock::getClock(&currentTime);
triggerEvent(CLOCK_DUMP, currentTime.tv_sec, currentTime.tv_usec);
}