Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freerb/tms #344

Draft
wants to merge 18 commits into
base: dev/can
Choose a base branch
from
Draft

Freerb/tms #344

wants to merge 18 commits into from

Conversation

BlakeFreer
Copy link
Contributor

@BlakeFreer BlakeFreer commented Nov 30, 2024

Move TMS to the new CAN system. I wanted to simplify the app objects and overall system to reduce the amount of abstractions which we make. Did this by removing the TempSensorManager and BmsBroadcaster objects and inlining their behaviour.

The other big change is I removed FreeRTOS and now use a baremetal loop. TMS is a very simple project - it runs a single deterministic task every 100ms. There is no synchronization or scheduling, so an RTOS is not a good fit. Further, removing the RTOS means we can debug in the CLI, so I added that platform folder as well

Expand the commit messages ... below for more details.

Remove the TempSensorManager class since all it did was run a loop over the temp sensors. This loop is now in main. Moves the temperature sensor calculations to a separate header file. Simplifies the TemperatureSensor class.
Create the BmsBroadcast message in a standalone function so that we don't need to maintain another class. Moves the avg / low / high temperature calculations into this Pack() method to cut down the number of arguments.
The step size in FanController is now determined by the task rate. FreeRTOS has been disabled. There was only a single task so an RTOS was unnecessary complexity.
@BlakeFreer BlakeFreer changed the base branch from main to freerb/mcal-can November 30, 2024 07:06
Base automatically changed from freerb/mcal-can to dev/can December 11, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant