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

Fix network tables #815

Merged
merged 6 commits into from
Nov 13, 2024
Merged

Fix network tables #815

merged 6 commits into from
Nov 13, 2024

Conversation

SamCarlberg
Copy link
Member

@SamCarlberg SamCarlberg commented Oct 26, 2024

Overview

Fixes several bugs related to networktables:

Was relying on the main plugin's subscribe-all behavior
Prevents data type issues where topic ordering is nondeterministic and type information could arrive after sources are set up
Was based on NT table structures, which weren't returning correct data
Shuffleboard historically relied on the assumption that a leading slash was optional for paths in networktables. NT4 changed that by making topic names exact (so two topic names only differing by the presence or absence of a leading slash would be two unique topics), which broke NT data sources for topics without leading slashes
@SamCarlberg SamCarlberg added bugfix Fixes one or more bugs plugin: networktables labels Oct 26, 2024
@Martysh12 Martysh12 mentioned this pull request Oct 29, 2024
Copy link
Member

@rzblue rzblue left a comment

Choose a reason for hiding this comment

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

Everything is working how I'd expect, thanks!

@@ -102,12 +102,12 @@ public void start() {
});

metadataSubscriber =
new MultiSubscriber(inst, new String[] {METADATA_TABLE_NAME + "/"}, PubSubOption.hidden(true));
new MultiSubscriber(inst, new String[] {METADATA_TABLE_NAME + "/"}, PubSubOption.sendAll(true));
Copy link
Member

Choose a reason for hiding this comment

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

What’s the reason for the sendAll()?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, good catch, this was copied at one point from the NetworkTableSource code. The metadata table is read-only from the dashboard side so this isn't needed

We don't write to the metadata topics, it's all sent over from the server
@PeterJohnson PeterJohnson merged commit 60e3ba1 into wpilibsuite:main Nov 13, 2024
9 checks passed
@tom131313
Copy link

On WPILib 2025-Beta-1 Alert messages do not display in ShuffleBoard with their special widget - they do display with regular data widget. [SmartDashboard doesn't display anything for Alert class messages.]

Note that the robot program is running in Simulate Robot Code mode and the data in the NT looks correct. Everything is running on Windows 11.

Does this fix the lack of special Alert widget behavior or is a problem with the Alert widget a new issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes one or more bugs plugin: networktables
Projects
None yet
4 participants