From 7e07a3036725e311aed46b2254c91c68488b7b08 Mon Sep 17 00:00:00 2001 From: David Vo Date: Sun, 5 Jan 2025 17:31:04 +1100 Subject: [PATCH] docs(urcl): Add Python setup --- docsSite/docs/more-features/urcl.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docsSite/docs/more-features/urcl.md b/docsSite/docs/more-features/urcl.md index 946a2cc6..33c109f4 100644 --- a/docsSite/docs/more-features/urcl.md +++ b/docsSite/docs/more-features/urcl.md @@ -23,7 +23,7 @@ As this library is not an official REV tool, support queries should be directed ## Setup -Install the URCL vendordep by going to "WPILib: Manage Vendor Libraries" > "Install new libraries (online)" in VSCode and pasting in the URL below. +Install the URCL vendordep by following the instructions to install [3rd party libraries](https://docs.wpilib.org/en/stable/docs/software/vscode-overview/3rd-party-libraries.html). Use the following vendor JSON URL: ``` https://raw.githubusercontent.com/Mechanical-Advantage/URCL/maven/URCL.json @@ -62,6 +62,23 @@ void Robot::RobotInit() { } ``` + + + +```python +import urcl +import wpilib + +class Robot(wpilib.TimedRobot): + def robotInit(self): + # If publishing to NetworkTables and DataLog + wpilib.DataLogManager.start() + urcl.start() + + # If logging only to DataLog + urcl.start(wpilib.DataLogManager.getLog()) +``` +