Skip to content

Conversation

lizlooney
Copy link
Collaborator

Added moduleId to Module and ModuleContent.
Updated mrc_mechanism to find the mechanism by its module id.

Updated mrc_mechanism to find the mechanism by its module id.
@lizlooney lizlooney requested a review from alan412 August 12, 2025 05:47
Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

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

This has a bug. If you create a mechanism (say "Arm"), and add it to your robot and then move away from that tab to another and come back it tells you that that mechanism no longer exists.

@lizlooney
Copy link
Collaborator Author

This has a bug. If you create a mechanism (say "Arm"), and add it to your robot and then move away from that tab to another and come back it tells you that that mechanism no longer exists.

Good find! There was a bug in the code that recognizes that a module doesn't yet have a module id and it assigns one. But that code might be executed more than once before the mechanism is saved, resulting the the mechanism temporarily being assigned multiple different module ids.

@lizlooney lizlooney requested a review from alan412 August 12, 2025 23:10
Copy link
Collaborator

@alan412 alan412 left a comment

Choose a reason for hiding this comment

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

LGTM

@alan412 alan412 merged commit ce167c1 into wpilibsuite:main Aug 13, 2025
1 check passed
@lizlooney lizlooney deleted the pr_module_id branch August 13, 2025 20:01
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.

2 participants