Skip to content

Conversation

lizlooney
Copy link
Collaborator

When a blocks module is loaded, check mrc_call_python_function blocks.
For component method blocks, check whether the component has been renamed. Update the mrc_call_python_function if necessary. For robot method blocks, check whether the method has been renamed or whether its return value or arguments have changed. Update the mrc_call_python_function if possible. If not possible, add a warning on the block.

Related to #72, but not a complete fix. Changing parameter names is not fixed.

For component method blocks, check whether the component has been renamed. Update the mrc_call_python_function if necessary.
For robot method blocks, check whether the method has been renamed or whether its return value or arguments have changed. Update the mrc_call_python_function if possible. If not possible, add a warning on the block.
@lizlooney lizlooney requested a review from alan412 July 11, 2025 06:42
@lizlooney lizlooney marked this pull request as draft July 11, 2025 07:41
@lizlooney
Copy link
Collaborator Author

I need to fix a problem where if the user changes the component name (by selecting a different one from the dropdown) on a mrc_call_python_function block, it needs to change the block id that it saves in extra state.

…ged in the robot.

Fixed a problem where if the user changes the component name (by selecting a different one from the dropdown) on a mrc_call_python_function block, it needs to change the block id that it saves in extra state.
@lizlooney lizlooney marked this pull request as ready for review July 11, 2025 08:15
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.

Verified that changing the name works. If you add a parameter, it could possibly update the one in the opmode to have the additional parameter. (should be an issue, doesn't need to stop this from merging)

@alan412 alan412 merged commit c286ba1 into wpilibsuite:main Jul 11, 2025
1 check passed
@lizlooney lizlooney deleted the pr_check_call_python_function_blocks branch July 12, 2025 00:08
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