moved TCScheduling Service to use timeval internally #735
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#735
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mohr/timetag_fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Compiler was warning about comparisons between signed and unsigned so I just used timeval internally to be safe (and exact).
In the future we could think about moving to 64 bit in the TC as well...
@ -163,1 +168,3 @@
if (timestamp - tNow.tv_sec <= RELEASE_TIME_MARGIN_SECONDS) {
timeval timeDifference = scheduledTime - tNow;
// round subseconds up
if (timeDifference.tv_sec + 1 <= RELEASE_TIME_MARGIN_SECONDS) {
Is timeval guaranteed to be signed?
This also rounds up when subsecond micros are 0, is this intended?
Can we use
timestamp <= tNow.tv_sec + RELEASE_TIME_MARGIN_SECONDS
compare logic instead?That is a bit more readable in my opinion.
Changed rounding to be correct.
The unreadable comparison is removed with this PR.
Checkout
From your project repository, check out a new branch and test the changes.