Add NetworkTableSource#646
Conversation
|
|
||
| private void addListener() { | ||
| entryListenerFunctionUid = NetworkTablesJNI.addEntryListener(path, (uid, key, value, flags) | ||
| -> objectProperty.set(value), |
There was a problem hiding this comment.
Arguments should each be on their own line
Current coverage is 58.43% (diff: 70.63%)@@ master #646 diff @@
==========================================
Files 196 198 +2
Lines 6165 6282 +117
Methods 0 0
Messages 0 0
Branches 561 569 +8
==========================================
+ Hits 3578 3671 +93
- Misses 2422 2442 +20
- Partials 165 169 +4
|
|
Write tests for the network tables source |
|
|
| * @param path The path of the object to get | ||
| */ | ||
| public NetworkReceiver(String path) { | ||
| checkArgument(!path.isEmpty(), "Name cannot be an empty string"); |
There was a problem hiding this comment.
Should also add an explicit nullcheck with checkNotNull(path, ...)
|
Tests randomly fail... |
|
@SamCarlberg Can you help out Austin? |
| networkReceiver.close(); | ||
| } | ||
| } | ||
| } No newline at end of file |
|
So maybe the error was a fluke? I reran the travis tests 3 times and the build did not fail. |
| /** | ||
| * Provides a way to get a {@link Types Type} from a NetworkTable that GRIP is connected to. | ||
| */ | ||
| @XStreamAlias("grip:NetworkTableValue") |
There was a problem hiding this comment.
Do we want this to be "grip:NetworkTableEntry"?
|
I labeled this as ready for review because I have not seen the tests failing after merging master into this branch. |
|
So what I really don't want is Network Tables initialized in tests that don't need it. That's why, up until this point I've kept network tables out of tests. |
|
ummmm..... no promises but I will give it a shot |
# Conflicts: # ui/src/test/java/edu/wpi/grip/ui/pipeline/PipelineUITest.java
|
@JLLeitschuh I have no idea how to do this. If you could please lend a hand 😃 |
| */ | ||
| public abstract class NetworkReceiver implements AutoCloseable { | ||
|
|
||
| protected final String path; |
There was a problem hiding this comment.
Why is this a protected field?
There was a problem hiding this comment.
As discussed in person
closes #363
closes #572
closes #635