You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nt::SetServerTeam(inst, TEAM); // where TEAM=190, 294, etc, or use inst.setServer("hostname") or similar
94
-
nt::StartDSClient(inst); // recommended if running on DS computer; this gets the robot IP from the DS
107
+
nt::SetServerTeam(inst, TEAM, 0); // where TEAM=190, 294, etc, or use inst.setServer("hostname") or similar
108
+
nt::StartDSClient(inst, 0); // recommended if running on DS computer; this gets the robot IP from the DS
95
109
while (true) {
96
110
using namespace std::chrono_literals;
97
111
std::this_thread::sleep_for(1s);
@@ -159,49 +173,30 @@ Then this instance is started as a NetworkTables client with the team number (th
159
173
160
174
Then this sample program simply loops once a second and gets the values for x and y and prints them on the console. In a more realistic program, the client might be processing or generating values for the robot to consume.
161
175
162
-
Building the program
163
-
--------------------
164
-
When building and running the program you will need some additional libraries to include with your client-side program. For Java these are:
.. note:: The desktop platform jar is for Windows, macOS, and Linux.
173
-
174
-
For Python, refer to the `RobotPy pyntcore install documentation <https://robotpy.readthedocs.io/en/stable/install/pynetworktables.html>`__.
175
-
176
176
Building using Gradle
177
177
^^^^^^^^^^^^^^^^^^^^^
178
178
179
-
The dependencies above can be added to the ``dependencies`` block in a ``build.gradle`` file. The ``ntcore-java`` and ``wpiutil-java`` libraries are required at compile-time and the JNI dependencies are required at runtime. The JNI dependencies for all supported platforms should be added to the ``build.gradle`` if cross-platform support for the application is desired.
179
+
Example build.gradle files are provided in the `StandaloneAppSamples Repository <https://github.com/wpilibsuite/StandaloneAppSamples>`__ Update the GradleRIO version to correspond to the desired WPILib version.
180
180
181
-
First, the FRC\ |reg| Maven repository should be added to the ``repositories`` block. Note that this is not required if you are using the GradleRIO plugin with your application.
Then, the dependencies can be added to the ``dependencies`` block. Here, ``VERSION`` should be replaced with the latest version number of the following dependencies. This usually corresponds to the version number of the latest WPILib release.
190
+
.. group-tab:: C++
190
191
191
-
.. code-block:: groovy
192
+
Uncomment the appropriate platform as highlighted.
0 commit comments