Skip to content

Commit 2d79961

Browse files
committed
Merge pull request #292 from JLLeitschuh/fix/ntManagerBrokenOnWindows
Fix/nt manager broken on windows
2 parents 1fa9ee4 + 2901009 commit 2d79961

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/src/main/java/edu/wpi/grip/core/ProjectSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public enum NetworkProtocol {
2121
NONE
2222
}
2323

24-
private NetworkProtocol networkProtocol = NetworkProtocol.NETWORK_TABLES;
24+
private NetworkProtocol networkProtocol = NetworkProtocol.NONE;
2525
private int teamNumber = 0;
2626
private String networkTablesServer = "";
2727

core/src/main/java/edu/wpi/grip/core/operations/networktables/NTManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public class NTManager {
3838

3939
@Inject
4040
public NTManager(Logger logger) {
41+
// We may have another instance of this method lying around
42+
NetworkTable.shutdown();
4143
// Redirect NetworkTables log messages to our own log files. This gets rid of console spam, and it also lets
4244
// us grep through NetworkTables messages just like any other messages.
4345
NetworkTablesJNI.setLogger((level, file, line, msg) -> {
@@ -48,6 +50,7 @@ public NTManager(Logger logger) {
4850
NetworkTable.setClientMode();
4951
}
5052

53+
5154
/**
5255
* Change the server address according to the project setting.
5356
*/

0 commit comments

Comments
 (0)