Washington-Superbike / Superbike-Firmware

2 stars 3 forks source link

User/chasearline/rtos task improvements #2

Closed Chase-Arline closed 2 years ago

Chase-Arline commented 2 years ago

Waiting to test

Chase-Arline commented 2 years ago

@s-syasir @chu6-2037514 can you do a basic skim through this and see if anything is off? don't need to check anything in the FreeRTOS folder necessarily

I haven't been able to test CAN functionality or precharge yet, but I was able to verify the display task + datalogging.

Only issue I can see is that we use a lot of shared variables so we may run into an issue there in the future. We could avoid read/write conflicts by having each struct use its own variable (not pointer) and updating the similar variables for each struct in a new task. This task would have the highest priority so it couldn't be interrupted by any others (could be relaying safety related info from CAN task to precharge for example).