Skip to content

Timer: Create task scheduler #133

Description

@ETSells

Version: v2.7.0

Describe the feature you'd like
We can use a timer to periodically generate interrupt signals (think ~every 10 ms or so) that goes through a table of actions and performs a task if the current systick is greater than or equal to the scheduled systick. This table should be of known size at compile time with an entry for every task that may be scheduled. On duplicate entries, the scheduled systick should be overwritten, requiring scheduled tasks to check if there's already something scheduled before doing so.

This kind of system could be great for scheduling specific telemetry or CAN messages going forward, but the initial application would be for SunDevilRocketry/Flight-Computer-Firmware#266. We could schedule a task a certain number of milliseconds after starting parachute deployment to de-assert the deployment pin.

Describe alternatives you've considered
The alternative for the immediate application (#266) is to check the ignition pin assertion synchronously in the flight loop. I would be okay with this implementation, it's up to @NArmistead if he wants to overcomplicate it a bit in the name of SDR OS (lmao).

Alternative (mutually exclusive): SunDevilRocketry/driver#37

Additional context
N/A

Points of Contact
FC Rev. 2 Project Lead: @NArmistead
Mod Library Maintainer: @ETSells

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions