From 1299abc173efc6ccb2f68db76e16eb6db46aed6d Mon Sep 17 00:00:00 2001 From: Thad House Date: Wed, 1 Jul 2026 23:08:57 -0700 Subject: [PATCH] Remove comments and small things from repo that mention roboRIO (#9020) The RoboRIO classes need to be fixed up, those are huge. --- .github/workflows/lint-format.yml | 2 +- .../wpilib/vision/apriltag/AprilTagDetector.java | 2 +- .../include/wpi/apriltag/AprilTagDetector.hpp | 2 +- .../org/wpilib/vision/process/package-info.java | 2 +- .../org/wpilib/vision/stream/CameraServer.java | 14 +++++++------- .../wpilib/vision/stream/CameraServerShared.java | 6 +++--- .../include/wpi/cameraserver/CameraServer.hpp | 12 ++++++------ .../java/org/wpilib/hardware/hal/CANAPIJNI.java | 4 ++-- .../main/java/org/wpilib/hardware/hal/HALUtil.java | 6 +++--- .../java/org/wpilib/hardware/hal/PowerJNI.java | 6 ++---- .../org/wpilib/hardware/hal/SerialPortJNI.java | 2 +- hal/src/main/native/include/wpi/hal/HAL.h | 7 ++++--- hal/src/main/native/include/wpi/hal/Power.h | 7 ++----- hal/src/main/native/include/wpi/hal/SerialPort.h | 2 +- .../include/wpi/hal/handles/HandlesInternal.hpp | 6 +++--- .../main/java/org/wpilib/framework/RobotBase.java | 2 +- .../main/native/include/wpi/net/PortForwarder.hpp | 3 ++- 17 files changed, 41 insertions(+), 44 deletions(-) diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index e1dc37281b..9d34b6aa94 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -81,7 +81,7 @@ jobs: ${{ runner.temp }}/wpiformat/bin/pip3 install wpiformat==2026.64 - name: Create compile_commands.json run: | - ./gradlew generateCompileCommands -Ptoolchain-optional-roboRio + ./gradlew generateCompileCommands -Ptoolchain-optional-Systemcore ./.github/workflows/fix_compile_commands.py build/TargetedCompileCommands/linuxx86-64release/compile_commands.json ./.github/workflows/fix_compile_commands.py build/TargetedCompileCommands/linuxx86-64debug/compile_commands.json - name: List changed files diff --git a/apriltag/src/main/java/org/wpilib/vision/apriltag/AprilTagDetector.java b/apriltag/src/main/java/org/wpilib/vision/apriltag/AprilTagDetector.java index 22aa4f09b6..55de77e4c2 100644 --- a/apriltag/src/main/java/org/wpilib/vision/apriltag/AprilTagDetector.java +++ b/apriltag/src/main/java/org/wpilib/vision/apriltag/AprilTagDetector.java @@ -52,7 +52,7 @@ public class AprilTagDetector implements AutoCloseable { /** * Debug mode. When true, the decoder writes a variety of debugging images to the current * working directory at various stages through the detection process. This is slow and should - * *not* be used on space-limited systems such as the RoboRIO. Default is disabled (false). + * *not* be used on space-limited systems such as the Systemcore. Default is disabled (false). */ public boolean debug; diff --git a/apriltag/src/main/native/include/wpi/apriltag/AprilTagDetector.hpp b/apriltag/src/main/native/include/wpi/apriltag/AprilTagDetector.hpp index 16410c77ab..a32be2c2d3 100644 --- a/apriltag/src/main/native/include/wpi/apriltag/AprilTagDetector.hpp +++ b/apriltag/src/main/native/include/wpi/apriltag/AprilTagDetector.hpp @@ -72,7 +72,7 @@ class WPILIB_DLLEXPORT AprilTagDetector { * Debug mode. When true, the decoder writes a variety of debugging images * to the current working directory at various stages through the detection * process. This is slow and should *not* be used on space-limited systems - * such as the RoboRIO. Default is disabled (false). + * such as the Systemcore. Default is disabled (false). */ bool debug = false; }; diff --git a/cameraserver/src/main/java/org/wpilib/vision/process/package-info.java b/cameraserver/src/main/java/org/wpilib/vision/process/package-info.java index 87d73dce03..c3361da623 100644 --- a/cameraserver/src/main/java/org/wpilib/vision/process/package-info.java +++ b/cameraserver/src/main/java/org/wpilib/vision/process/package-info.java @@ -12,7 +12,7 @@ * public class Robot extends TimedRobot * implements VisionRunner.Listener<MyFindTotePipeline> { * - * // A USB camera connected to the roboRIO. + * // A USB camera connected to the Systemcore. * private {@link org.wpilib.vision.camera.VideoSource VideoSource} usbCamera; * * // A vision pipeline. This could be handwritten or generated by GRIP. diff --git a/cameraserver/src/main/java/org/wpilib/vision/stream/CameraServer.java b/cameraserver/src/main/java/org/wpilib/vision/stream/CameraServer.java index 73a3dc2101..bedd16241d 100644 --- a/cameraserver/src/main/java/org/wpilib/vision/stream/CameraServer.java +++ b/cameraserver/src/main/java/org/wpilib/vision/stream/CameraServer.java @@ -413,9 +413,9 @@ public final class CameraServer { values[j] = "mjpg:" + values[j]; } - if (CameraServerSharedStore.getCameraServerShared().isRoboRIO()) { + if (CameraServerSharedStore.getCameraServerShared().isSystemcore()) { // Look to see if we have a passthrough server for this source - // Only do this on the roboRIO + // Only do this on the Systemcore for (VideoSink i : m_sinks.values()) { int sink = i.getHandle(); int sinkSource = CameraServerJNI.getSinkSource(sink); @@ -531,7 +531,7 @@ public final class CameraServer { * Start automatically capturing images to send to the dashboard. * *

You should call this method to see a camera feed on the dashboard. If you also want to - * perform vision processing on the roboRIO, use getVideo() to get access to the camera images. + * perform vision processing on the Systemcore, use getVideo() to get access to the camera images. * *

The first time this overload is called, it calls {@link #startAutomaticCapture(int)} with * device 0, creating a camera named "USB Camera 0". Subsequent calls increment the device number @@ -621,7 +621,7 @@ public final class CameraServer { /** * Get OpenCV access to the primary camera feed. This allows you to get images from the camera for - * image processing on the roboRIO. + * image processing on the Systemcore. * *

This is only valid to call after a camera feed has been added with startAutomaticCapture() * or addServer(). @@ -644,7 +644,7 @@ public final class CameraServer { /** * Get OpenCV access to the specified camera. This allows you to get images from the camera for - * image processing on the roboRIO. + * image processing on the Systemcore. * * @param camera Camera (e.g. as returned by startAutomaticCapture). * @return OpenCV sink for the specified camera @@ -671,7 +671,7 @@ public final class CameraServer { /** * Get OpenCV access to the specified camera. This allows you to get images from the camera for - * image processing on the roboRIO. + * image processing on the Systemcore. * * @param camera Camera (e.g. as returned by startAutomaticCapture). * @param pixelFormat Desired pixelFormat of the camera @@ -699,7 +699,7 @@ public final class CameraServer { /** * Get OpenCV access to the specified camera. This allows you to get images from the camera for - * image processing on the roboRIO. + * image processing on the Systemcore. * * @param name Camera name * @return OpenCV sink for the specified camera diff --git a/cameraserver/src/main/java/org/wpilib/vision/stream/CameraServerShared.java b/cameraserver/src/main/java/org/wpilib/vision/stream/CameraServerShared.java index 4f17b54699..efa5607cdf 100644 --- a/cameraserver/src/main/java/org/wpilib/vision/stream/CameraServerShared.java +++ b/cameraserver/src/main/java/org/wpilib/vision/stream/CameraServerShared.java @@ -29,11 +29,11 @@ public interface CameraServerShared { void reportUsage(String resource, String data); /** - * Get if running on a roboRIO. + * Get if running on a Systemcore. * - * @return true if on roboRIO + * @return true if on Systemcore */ - default boolean isRoboRIO() { + default boolean isSystemcore() { return false; } } diff --git a/cameraserver/src/main/native/include/wpi/cameraserver/CameraServer.hpp b/cameraserver/src/main/native/include/wpi/cameraserver/CameraServer.hpp index fd47b5bd37..3e1f8fd491 100644 --- a/cameraserver/src/main/native/include/wpi/cameraserver/CameraServer.hpp +++ b/cameraserver/src/main/native/include/wpi/cameraserver/CameraServer.hpp @@ -30,7 +30,7 @@ class CameraServer { * Start automatically capturing images to send to the dashboard. * * You should call this method to see a camera feed on the dashboard. If you - * also want to perform vision processing on the roboRIO, use getVideo() to + * also want to perform vision processing on the Systemcore, use getVideo() to * get access to the camera images. * * The first time this overload is called, it calls StartAutomaticCapture() @@ -84,7 +84,7 @@ class CameraServer { /** * Get OpenCV access to the primary camera feed. This allows you to - * get images from the camera for image processing on the roboRIO. + * get images from the camera for image processing on the Systemcore. * *

This is only valid to call after a camera feed has been added * with startAutomaticCapture() or addServer(). @@ -93,7 +93,7 @@ class CameraServer { /** * Get OpenCV access to the specified camera. This allows you to get - * images from the camera for image processing on the roboRIO. + * images from the camera for image processing on the Systemcore. * * @param camera Camera (e.g. as returned by startAutomaticCapture). */ @@ -101,7 +101,7 @@ class CameraServer { /** * Get OpenCV access to the specified camera. This allows you to get - * images from the camera for image processing on the roboRIO. + * images from the camera for image processing on the Systemcore. * * @param camera Camera (e.g. as returned by startAutomaticCapture). * @param pixelFormat The desired pixelFormat of captured frames from the @@ -112,7 +112,7 @@ class CameraServer { /** * Get OpenCV access to the specified camera. This allows you to get - * images from the camera for image processing on the roboRIO. + * images from the camera for image processing on the Systemcore. * * @param name Camera name */ @@ -120,7 +120,7 @@ class CameraServer { /** * Get OpenCV access to the specified camera. This allows you to get - * images from the camera for image processing on the roboRIO. + * images from the camera for image processing on the Systemcore. * * @param name Camera name * @param pixelFormat The desired pixelFormat of captured frames from the diff --git a/hal/src/main/java/org/wpilib/hardware/hal/CANAPIJNI.java b/hal/src/main/java/org/wpilib/hardware/hal/CANAPIJNI.java index 71c9db1ffe..6d51c36a6a 100644 --- a/hal/src/main/java/org/wpilib/hardware/hal/CANAPIJNI.java +++ b/hal/src/main/java/org/wpilib/hardware/hal/CANAPIJNI.java @@ -55,7 +55,7 @@ public class CANAPIJNI extends JNIWrapper { * *

This ID is 10 bits. * - *

The RoboRIO will automatically repeat the packet at the specified interval + *

The Systemcore will automatically repeat the packet at the specified interval * * @param handle the CAN handle * @param apiId the ID to write (0-1023) @@ -105,7 +105,7 @@ public class CANAPIJNI extends JNIWrapper { * *

This ID is 10 bits. * - *

The RoboRIO will automatically repeat the packet at the specified interval + *

The Systemcore will automatically repeat the packet at the specified interval * * @param handle the CAN handle * @param apiId the ID to write (0-1023) diff --git a/hal/src/main/java/org/wpilib/hardware/hal/HALUtil.java b/hal/src/main/java/org/wpilib/hardware/hal/HALUtil.java index 928b751aae..4bd23b5f55 100644 --- a/hal/src/main/java/org/wpilib/hardware/hal/HALUtil.java +++ b/hal/src/main/java/org/wpilib/hardware/hal/HALUtil.java @@ -32,15 +32,15 @@ public final class HALUtil extends JNIWrapper { public static final int RUNTIME_SIMULATION = 1; /** - * Returns the roboRIO serial number. + * Returns the Systemcore serial number. * - * @return The roboRIO serial number. + * @return The Systemcore serial number. * @see "HAL_GetSerialNumber" */ public static native String getSerialNumber(); /** - * Returns the comments from the roboRIO web interface. + * Returns the comments from the Systemcore web interface. * * @return The comments string. * @see "HAL_GetComments" diff --git a/hal/src/main/java/org/wpilib/hardware/hal/PowerJNI.java b/hal/src/main/java/org/wpilib/hardware/hal/PowerJNI.java index b109803985..9d5f641949 100644 --- a/hal/src/main/java/org/wpilib/hardware/hal/PowerJNI.java +++ b/hal/src/main/java/org/wpilib/hardware/hal/PowerJNI.java @@ -11,7 +11,7 @@ package org.wpilib.hardware.hal; */ public class PowerJNI extends JNIWrapper { /** - * Gets the roboRIO input voltage. + * Gets the Systemcore input voltage. * * @return the input voltage (volts) * @see "HAL_GetVinVoltage" @@ -61,9 +61,7 @@ public class PowerJNI extends JNIWrapper { public static native void resetUserCurrentFaults(); /** - * Set the voltage the roboRIO will brownout and disable all outputs. - * - *

Note that this only does anything on the roboRIO 2. On the roboRIO it is a no-op. + * Set the voltage the Systemcore will brownout and disable all outputs. * * @param voltage The brownout voltage * @see "HAL_SetBrownoutVoltage" diff --git a/hal/src/main/java/org/wpilib/hardware/hal/SerialPortJNI.java b/hal/src/main/java/org/wpilib/hardware/hal/SerialPortJNI.java index bcadb997a8..3af241274e 100644 --- a/hal/src/main/java/org/wpilib/hardware/hal/SerialPortJNI.java +++ b/hal/src/main/java/org/wpilib/hardware/hal/SerialPortJNI.java @@ -26,7 +26,7 @@ public class SerialPortJNI extends JNIWrapper { * Initializes a serial port with a direct name. * *

This name is the /dev name for a specific port. Note these are not always consistent between - * roboRIO reboots. + * Systemcore reboots. * * @param port the serial port to initialize * @param portName the dev port name diff --git a/hal/src/main/native/include/wpi/hal/HAL.h b/hal/src/main/native/include/wpi/hal/HAL.h index ff538396f2..7c795e9964 100644 --- a/hal/src/main/native/include/wpi/hal/HAL.h +++ b/hal/src/main/native/include/wpi/hal/HAL.h @@ -57,14 +57,15 @@ const char* HAL_GetLastError(HAL_Status* status); const char* HAL_GetErrorMessage(int32_t code); /** - * Returns the roboRIO serial number. + * Returns the Systemcore serial number. * - * @param[out] serialNumber The roboRIO serial number. Free with WPI_FreeString + * @param[out] serialNumber The Systemcore serial number. Free with + * WPI_FreeString */ void HAL_GetSerialNumber(struct WPI_String* serialNumber); /** - * Returns the comments from the roboRIO web interface. + * Returns the comments from the Systemcore web interface. * * @param[out] comments The comments string. Free with WPI_FreeString */ diff --git a/hal/src/main/native/include/wpi/hal/Power.h b/hal/src/main/native/include/wpi/hal/Power.h index c249ec31f4..1bb3636db8 100644 --- a/hal/src/main/native/include/wpi/hal/Power.h +++ b/hal/src/main/native/include/wpi/hal/Power.h @@ -19,7 +19,7 @@ extern "C" { #endif /** - * Gets the roboRIO input voltage. + * Gets the Systemcore input voltage. * * @param[out] status the error code, or 0 for success * @return the input voltage (volts) @@ -81,10 +81,7 @@ void HAL_ResetUserCurrentFaults(int32_t* status); double HAL_GetBrownoutVoltage(int32_t* status); /** - * Set the voltage the roboRIO will brownout and disable all outputs. - * - * Note that this only does anything on the roboRIO 2. - * On the roboRIO it is a no-op. + * Set the voltage the Systemcore will brownout and disable all outputs. * * @param[in] voltage The brownout voltage * @param[out] status the error code, or 0 for success diff --git a/hal/src/main/native/include/wpi/hal/SerialPort.h b/hal/src/main/native/include/wpi/hal/SerialPort.h index 55ca0f1f96..2ea1c07c2a 100644 --- a/hal/src/main/native/include/wpi/hal/SerialPort.h +++ b/hal/src/main/native/include/wpi/hal/SerialPort.h @@ -42,7 +42,7 @@ HAL_SerialPortHandle HAL_InitializeSerialPort(HAL_SerialPort port, * Initializes a serial port with a direct name. * * This name is the /dev name for a specific port. - * Note these are not always consistent between roboRIO reboots. + * Note these are not always consistent between Systemcore reboots. * * @param[in] port the serial port to initialize * @param[in] portName the dev port name diff --git a/hal/src/main/native/include/wpi/hal/handles/HandlesInternal.hpp b/hal/src/main/native/include/wpi/hal/handles/HandlesInternal.hpp index f287ad9293..e54aefbafd 100644 --- a/hal/src/main/native/include/wpi/hal/handles/HandlesInternal.hpp +++ b/hal/src/main/native/include/wpi/hal/handles/HandlesInternal.hpp @@ -115,7 +115,7 @@ static inline bool isHandleType(HAL_Handle handle, HAL_HandleEnum handleType) { /** * Get if the version of the handle is correct. * - * Do not use on the roboRIO, used specifically for the sim to handle resets. + * Do not use on the Systemcore, used specifically for the sim to handle resets. * * @param handle the handle * @param version the handle version to check @@ -128,7 +128,7 @@ static inline bool isHandleCorrectVersion(HAL_Handle handle, int16_t version) { /** * Get if the handle is a correct type and version. * - * Note the version is not checked on the roboRIO. + * Note the version is not checked on the Systemcore. * * @param handle the handle * @param enumType the type to check @@ -161,7 +161,7 @@ inline int16_t getHandleTypedIndex(HAL_Handle handle, HAL_HandleEnum enumType, /** * Create a handle for a specific index, type and version. * - * Note the version is not checked on the roboRIO. + * Note the version is not checked on the Systemcore. * * @param index the index * @param handleType the handle type diff --git a/wpilibj/src/main/java/org/wpilib/framework/RobotBase.java b/wpilibj/src/main/java/org/wpilib/framework/RobotBase.java index 5d97b6a76f..4369fc8244 100644 --- a/wpilibj/src/main/java/org/wpilib/framework/RobotBase.java +++ b/wpilibj/src/main/java/org/wpilib/framework/RobotBase.java @@ -62,7 +62,7 @@ public abstract class RobotBase implements AutoCloseable { } @Override - public boolean isRoboRIO() { + public boolean isSystemcore() { return !RobotBase.isSimulation(); } }; diff --git a/wpinet/src/main/native/include/wpi/net/PortForwarder.hpp b/wpinet/src/main/native/include/wpi/net/PortForwarder.hpp index b4f228668f..37287f9349 100644 --- a/wpinet/src/main/native/include/wpi/net/PortForwarder.hpp +++ b/wpinet/src/main/native/include/wpi/net/PortForwarder.hpp @@ -11,7 +11,8 @@ namespace wpi::net { /** * Forward ports to another host. This is primarily useful for accessing - * Ethernet-connected devices from a computer tethered to the RoboRIO USB port. + * Ethernet-connected devices from a computer tethered to the Systemcore USB + * port. */ class PortForwarder { public: