ISSUIUC / TARS-Software

Illinois Space Society's flight software codebase for the TARS avionics system
https://issuiuc.github.io/flightcode-docs/classes.html
17 stars 4 forks source link

[AV-182] Switch thread sleep mechanism to wait for a global system time #35

Closed AyberkY closed 2 years ago

AyberkY commented 2 years ago

This PR refactors the way threads sleep. Instead of sleeping for a constant arbitrary duration, the threads are put to sleep and woken up at a particular system time.

This is a much better way to manage thread tick rates as it does not depend on how long the thread internals take to execute.

AyberkY commented 2 years ago

[AV-182] Refactor ChibiOS threads to sleep until a global system time using chThdSleepUntil()

NPIPHI commented 2 years ago

I think that changing to absolute thread timings is a good change for the future, but for this launch I don't want to be making big changes to important stuff like thread handling. Lets reopen this after the launch.