Northeastern-Electric-Racing / Cerberus

Our FreeRTOS-based vehicle control application
1 stars 0 forks source link

Added in initial implementation of state machine director #101

Closed nwdepatie closed 6 months ago

nwdepatie commented 7 months ago

Changes

This is implementing a task that handles directing the state machine. It will handle checking for valid transitions and actually executing the transitions.

I made a lot of the stuff static, only providing developers the functions to retrieve and queue up states. All the processing is handled internally, so the user doesn't have to worry about much.

Notes

I think that we might need to play around with message priorities inside of queues. I think that it means that a message with a higher priority is processed first, which might be really beneficial for state handling (i.e. transition to faulted is high priority). This also might be useful for other message queues like the CAN queue.

Test Cases

Made sure it built, that is essentially it sadly

To Do

Checklist

It can be helpful to check the Checks and Files changed tabs. Please reach out to your Project Lead if anything is unclear. Please request reviewers and ping on slack only after you've gone through this whole checklist.