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

refactor!: wrap module states in context structs #163

Open
3 of 9 tasks
t-bre opened this issue Oct 11, 2022 · 1 comment
Open
3 of 9 tasks

refactor!: wrap module states in context structs #163

t-bre opened this issue Oct 11, 2022 · 1 comment
Assignees
Labels
refactor Rewriting/restructuring code without changing behaviour
Milestone

Comments

@t-bre
Copy link
Member

t-bre commented Oct 11, 2022

Current Implementation

Currently, each module has single, static instances of its data (threads, semaphores, variables, etc).

Proposed Improvement

For modularity, it would be better to wrap the context for a module into a struct (similar to the way the STM32 HAL does handles for CAN, I2C, etc). This has been done for some newer modules already, but old modules don't follow this style and should be refactored to do so.

Tasks

  • Top level VCU.
  • Control thread.
  • Sensor thread.
  • APPS.
  • BPS.
  • Ready-to-drive.
  • Shutdown.
  • Watchdog.
  • Fault monitor / handler.
@t-bre t-bre added the refactor Rewriting/restructuring code without changing behaviour label Oct 11, 2022
@t-bre t-bre added this to the STAG 9 milestone Oct 11, 2022
@t-bre t-bre self-assigned this Oct 11, 2022
@t-bre t-bre changed the title refactor: wrap module states in context structs refactor!: wrap module states in context structs Oct 12, 2022
@t-bre
Copy link
Member Author

t-bre commented Oct 12, 2022

This is going to be a bit of a monstrosity when it becomes a PR, but nobody else is working on VCU at the moment so it should be fine...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Rewriting/restructuring code without changing behaviour
Projects
None yet
Development

No branches or pull requests

1 participant