more fixes
This commit is contained in:
parent
0e2fa8dc83
commit
f8e3777c43
@ -27,9 +27,7 @@ ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
uint32_t subsecondMs =
|
||||
static_cast<uint32_t>(std::floor(static_cast<double>(newTime.tv_usec) / 1000.0));
|
||||
triggerEvent(CLOCK_DUMP, newTime.tv_sec, subsecondMs);
|
||||
triggerEvent(CLOCK_DUMP, newTime.tv_sec, newTime.tv_usec);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
case Subservice::RELATIVE_TIMESHIFT: {
|
||||
@ -63,7 +61,12 @@ ReturnValue_t Service9TimeManagement::handleRequest(uint8_t subservice) {
|
||||
} else {
|
||||
newTime = currentTime - offset;
|
||||
}
|
||||
return Clock::setClock(&newTime);
|
||||
result = Clock::setClock(&newTime);
|
||||
if (result == returnvalue::OK) {
|
||||
// Report new time as event.
|
||||
triggerEvent(CLOCK_DUMP, newTime.tv_sec, newTime.tv_usec);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
default:
|
||||
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
|
||||
|
Loading…
Reference in New Issue
Block a user