Update networktables to ntcore 2019.2.1#916
Update networktables to ntcore 2019.2.1#916SamCarlberg merged 9 commits intoWPIRoboticsProjects:masterfrom
Conversation
Removes dependency on old networktables Increase update rate to 100Hz (from 10Hz) to keep latencies low Call flush after entire pipeline runs to keep all published values synchronized as much as possible
e7c1bd8 to
30564d8
Compare
30564d8 to
63797a9
Compare
| jobs: | ||
| - job: Linux | ||
| pool: | ||
| vmImage: 'Ubuntu 16.04' |
There was a problem hiding this comment.
It was. Azure pipelines only has Ubuntu 16.04, not 18.04
|
This totally cans Travis CI right? |
core/src/main/java/edu/wpi/grip/core/operations/network/networktables/NTManager.java
Outdated
Show resolved
Hide resolved
| /* | ||
| * Nasty hack that is unavoidable because of how NetworkTables works. | ||
| */ | ||
| private static final AtomicInteger count = new AtomicInteger(0); |
There was a problem hiding this comment.
I forget why this was required. Can you remind me why we had it?
There was a problem hiding this comment.
Basically, just tracking usages of the NetworkTables connection. The client would only run if there was at least one source or one publishing operation that used it - if not, then the client would be shut down. I believe this was to prevent GRIP from keeping old entries around, but ntcore makes it so that clients only keep around entries that they have written to (the old library would make the client keep around all entries and re-send them to a server on a reconnect).
|
What do you want to do with Travis CI at this point? |
|
I think Travis can be removed now. It's just doing the javadoc push to the github site, but I think that's broken anyway. Azure has everything else. There has been some chatter about compiling ntcore with compatibility for 14.04 or 16.04... I'm tempted to hold out to see if that goes anywhere - or maybe wait until Azure has an 18.04 image (issue here) instead of mucking around with Docker |
JLLeitschuh
left a comment
There was a problem hiding this comment.
@SamCarlberg I'm going to leave this up to you to either wait on or merge.
Totally up to you.
7895462 to
32330e1
Compare
Codecov Report
@@ Coverage Diff @@
## master #916 +/- ##
============================================
+ Coverage 52.75% 52.82% +0.07%
Complexity 1 1
============================================
Files 327 327
Lines 8853 8852 -1
Branches 564 560 -4
============================================
+ Hits 4670 4676 +6
+ Misses 3980 3972 -8
- Partials 203 204 +1 |
This reverts commit 90d0f0d.
Instead of catchall 0xFF
| ntInstance.deleteAllEntries(); | ||
| ntInstance.startClient(); | ||
| ntInstance.setServer(projectSettings.getPublishAddress()); | ||
| } |
There was a problem hiding this comment.
Is there any chance that any of these things could hang?
| testTable.putBoolean(BOOLEAN_PATH, true); | ||
| testTable.putDouble(NUMBER_PATH, TEST_NUMBER); | ||
| testTable.putString(STRING_PATH, TEST_STRING); | ||
| ntInstance = NetworkTableInstance.create(); |
There was a problem hiding this comment.
Hate this dam singleton pattern.
There was a problem hiding this comment.
It's not a singleton? There's a default instance, but create() will return a new instance. Makes it useful for tests since there's no global state
Removes dependency on old networktables
Call flush after entire pipeline runs to keep all published values synchronized as much as possible - old behavior was to flush for every publisher (before the publisher would make its changes)
Removes the auto-shutdown behavior for NTHandler since clients now only maintain entries set on them (eg from publishers). I believe this behavior was present to prevent GRIP from keeping phantom entries around that it had no business using.
Since NetworkTables now requires libc 2.2.7, GRIP will not run on Ubuntu-based distros older than 18.04.