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

Fixed sendable logging in epilogue #7518

Closed
wants to merge 5 commits into from

Conversation

Daniel1464
Copy link
Contributor

Fixed NT-only Sendables(Field2d, Mechanism2d, etc) not being logged with epilogue's @Logged annotation.

@Daniel1464 Daniel1464 requested a review from a team as a code owner December 8, 2024 03:38
@Daniel1464
Copy link
Contributor Author

/format

@Daniel1464
Copy link
Contributor Author

/format

@Daniel1464
Copy link
Contributor Author

/cancel

@Gold856
Copy link
Contributor

Gold856 commented Dec 8, 2024

That's not a command we have...

@SamCarlberg
Copy link
Member

Unfortunately, this approach won't work. Mechanism2d and Field2d classes keep internal references to the last NTSendableBuilder they're used with, so epilogue logging calls would prevent dashboards from updating.

@Logged
Field2d field = ...;

public Robot() {
  SmartDashboard.putData("Field", field);
  Epilogue.bind(this); // Silently breaks the SD put
}

I consider this more a bug in the NTSendable-related API and how it's used

@Daniel1464 Daniel1464 closed this Dec 8, 2024
@Daniel1464 Daniel1464 deleted the fix-sendables branch December 9, 2024 20:02
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.

3 participants