Skip to content

Commit

Permalink
[ntcore] NetworkTables 4 (wpilibsuite#3217)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJohnson authored Oct 8, 2022
1 parent 90cfa00 commit 77301b1
Show file tree
Hide file tree
Showing 380 changed files with 34,085 additions and 21,607 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- name: asan
cmake-flags: "-DCMAKE_BUILD_TYPE=Asan"
ctest-env: ""
ctest-flags: "-E 'ntcore|wpilibc'"
ctest-flags: "-E 'wpilibc'"
- name: tsan
cmake-flags: "-DCMAKE_BUILD_TYPE=Tsan"
ctest-env: "TSAN_OPTIONS=second_deadlock_stack=1"
ctest-flags: "-E 'ntcore|cscore|cameraserver|wpilibc|wpilibNewCommands'"
ctest-flags: "-E 'cscore|cameraserver|wpilibc|wpilibNewCommands'"
- name: ubsan
cmake-flags: "-DCMAKE_BUILD_TYPE=Ubsan"
ctest-env: ""
Expand Down
2 changes: 1 addition & 1 deletion cameraserver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ model {
if (!it.buildable || !(it instanceof NativeBinarySpec)) {
return
}
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
project(':ntcore').addNtcoreDependency(it, 'shared')
lib project: ':cscore', library: 'cscore', linkage: 'shared'
lib project: ':wpinet', library: 'wpinet', linkage: 'shared'
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
Expand Down
2 changes: 1 addition & 1 deletion cameraserver/multiCameraServer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ model {
}
binaries.all { binary ->
lib project: ':cameraserver', library: 'cameraserver', linkage: 'static'
lib project: ':ntcore', library: 'ntcore', linkage: 'static'
project(':ntcore').addNtcoreDependency(binary, 'static')
lib project: ':cscore', library: 'cscore', linkage: 'static'
lib project: ':wpinet', library: 'wpinet', linkage: 'static'
lib project: ':wpiutil', library: 'wpiutil', linkage: 'static'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ public static void main(String... args) {
ntinst.startServer();
} else {
System.out.println("Setting up NetworkTables client for team " + team);
ntinst.startClientTeam(team);
ntinst.setServerTeam(team);
ntinst.startClient4();
}

// start cameras
Expand Down
4 changes: 3 additions & 1 deletion cameraserver/multiCameraServer/src/main/native/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <cstdio>
#include <string>
#include <string_view>
#include <thread>
#include <vector>

#include <networktables/NetworkTableInstance.h>
Expand Down Expand Up @@ -182,7 +183,8 @@ int main(int argc, char* argv[]) {
ntinst.StartServer();
} else {
fmt::print("Setting up NetworkTables client for team {}\n", team);
ntinst.StartClientTeam(team);
ntinst.StartClient4();
ntinst.SetServerTeam(team);
}

// start cameras
Expand Down
Loading

0 comments on commit 77301b1

Please sign in to comment.