Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Conversation

@Yaremadzulynsky
Copy link
Contributor

@Yaremadzulynsky Yaremadzulynsky commented Oct 27, 2024

Description

What was completed, changed, or updated?

All dependency objects used by TelemetryManager (e.g. GroundStationCommunication) are now created in SystemManager before the TM object. Dependencies are passed directly to the TM constructor.

All state data pointers used by TM have been organized to a struct.


Why was this done (if applicable)?

TM can now be created from mock instances for testing.
The order of object construction can be changed, so we can wait until we have all dependencies ready before initializing a TM object.
TM objects can potentially be made outside of SystemManager


Testing

What unit tests were used to validate the code?

  • tools.ps1 compile test

Documentation

Milestone number and name:
M3

Link to Asana task: https://app.asana.com/0/1203458353737758/1208312402823490/f

Reminders

  • Add reviewers to the PR

  • Mention the PR in the appropriate discord channel

Copy link
Contributor Author

@Yaremadzulynsky Yaremadzulynsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. One note I have is that the SM constructor is starting to look a little cluttered with TM stuff. What we could do is make a function in the SM cpp file called something like setupTM() which will do the TM setup stuff, then call tm->init() after everything is set up.

@larry-pan larry-pan force-pushed the Dependency-Injection branch from d728939 to 58ebab6 Compare November 3, 2024 21:48
Copy link
Contributor Author

@Yaremadzulynsky Yaremadzulynsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😃

Copy link
Contributor

@larry-pan larry-pan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Contributor

@HardyYu HardyYu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@larry-pan larry-pan merged commit 501aaa7 into main Nov 4, 2024
2 checks passed
@larry-pan larry-pan deleted the Dependency-Injection branch November 4, 2024 21:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants