-
Notifications
You must be signed in to change notification settings - Fork 0
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
Convert Shepherd to an RTOS #115
base: develop
Are you sure you want to change the base?
Conversation
* | ||
* @param pv_params Pointer to acc_data_t struct containing BMS data | ||
*/ | ||
void vGetSegmentData(void *pv_params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would seperate getting therms from getting voltages. big enough items on thier own
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to make sure that therm and volt data is from the same point in time though?
calc_cell_temps(); | ||
calc_pack_temps(); | ||
calc_pack_voltage_stats(); | ||
calc_open_cell_voltage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i still think one thread that does all of this is best. Time sync becomes really hard to follow. We poll data rarely enough (every 500 ms) that we arent at risk of starving that thread if we let this be one thread calcualting all of it. By mkaing it differernt threads, you run the risk of having some calculations done on data pulled at one time, and then some calcs done after the next reading. We dont want that; keep this simple and do all simple calcs that involve very little processing together
acc_data_t *bmsdata = (acc_data_t *)pv_params; | ||
|
||
for (;;) { | ||
osThreadFlagsWait(CALC_CCL_FLAG, osFlagsWaitAny, osWaitForever); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have made many comments at thi spoint but i just wanna hammer it - this is so much context switching for simple calculations. i dont think it helps anything
Changes
Shepherd converted to an RTOS with little or no behavior changes (extent of behavior change should be limited to bugs and logic mistakes).
To Do
Checklist
It can be helpful to check the
Checks
andFiles 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.
Closes #108