changed rounding to be correct
This commit is contained in:
parent
319199cb22
commit
cf47d2079f
@ -167,7 +167,10 @@ inline ReturnValue_t Service11TelecommandScheduling<MAX_NUM_TCS>::doInsertActivi
|
|||||||
Clock::getClock_timeval(&tNow);
|
Clock::getClock_timeval(&tNow);
|
||||||
timeval timeDifference = scheduledTime - tNow;
|
timeval timeDifference = scheduledTime - tNow;
|
||||||
// round subseconds up
|
// round subseconds up
|
||||||
if (timeDifference.tv_sec + 1 <= RELEASE_TIME_MARGIN_SECONDS) {
|
if (timeDifference.tv_usec != 0) {
|
||||||
|
timeDifference.tv_sec++;
|
||||||
|
}
|
||||||
|
if (timeDifference.tv_sec <= RELEASE_TIME_MARGIN_SECONDS) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "Service11TelecommandScheduling::doInsertActivity: Release time too close to "
|
sif::warning << "Service11TelecommandScheduling::doInsertActivity: Release time too close to "
|
||||||
"current time"
|
"current time"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user