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

Add NetworkTable Source. #572

Closed
wants to merge 1 commit into from
Closed

Add NetworkTable Source. #572

wants to merge 1 commit into from

Conversation

PeterJohnson
Copy link
Contributor

This reads a boolean, number, or string value from a NetworkTable key and
makes it available to GRIP.

This reads a boolean, number, or string value from a NetworkTable key and
makes it available to GRIP.
@PeterJohnson
Copy link
Contributor Author

Note: I didn't create a new source icon for this so that should be changed before merging.

return true;
} else {
return false; // No output sockets were updated
}
Copy link
Member

Choose a reason for hiding this comment

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

There is a lot of duplicate code here. Is there any way to generify it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking of refactoring the type-specific handling to an internal class to make it a bit cleaner and get rid of the null assignments, but I don't know how much code can be deduplicated because fundamentally there are different types and thus different function calls required in this section in particular.

@JLLeitschuh
Copy link
Member

The thing that I dislike about this PR is that network tables creates static state which can cause cascading test failures that are really hard to debug/track down.

I've been working on trying to isolate network tables from our class hierarchy by exclusively having any reference to it in our NTManager class.

This means that I can provide a mock NTManager to any test that needs it. I don't know if you think that this is possible.
Please feel free to come chat with us/me in Gitter about this.

@PeterJohnson
Copy link
Contributor Author

I'm certainly okay with changing this to use NTManager, although the amount of introspection used there means it may take me a bit to do it. Will you be at champs this week? We can discuss in person too.

@JLLeitschuh
Copy link
Member

I will not. I have to submit my MQP paper by Thursday and have several other projects I need to finish up before the end of the term. I'm open to a hangouts call or similar at any point. Send me a message on Gitter and we can chat.

}

@Override
public void initialize() {

Choose a reason for hiding this comment

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

JLLeitschuh pushed a commit that referenced this pull request Jul 8, 2016
* Add operation to save image snapshots to local disk.

The period and path prefix and suffix can be set, and the operation enabled
and disabled at will (this is particularly useful in combination with PR #572).
@AustinShalit AustinShalit modified the milestone: v2.0.0 Jul 29, 2016
@AustinShalit
Copy link
Member

Closing in favor of #646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants