ReduxLib Docs and Installation

The current version of ReduxLib is 2024.3.2.

The current beta version of ReduxLib is 2025.0.0-beta2.

Current Java/C++ documentation

LabVIEW is not supported at this time.

Vendordep installation

Tip

For more detailed information, see WPILib’s documentation on 3rd party libraries

Online installation

In your robot project in WPILib VSCode, press Ctrl+Shift+P and select WPILib: Manage Vendor Libraries. When prompted for a JSON url, paste in https://frcsdk.reduxrobotics.com/ReduxLib_2024.json

Offline installation

Download the current offline zip and extract its contents to either C:\Users\Public\wpilib\2024 on Windows or ~/wpilib/2024 on Linux/MacOS

In your robot project in WPILib VSCode, press Ctrl+Shift+P and select WPILib: Manage Vendor Libraries. Select Install new libraries (offline) and then select ReduxLib

2025 Beta installation

2025 current beta offline zip

2025 current beta vendordep JSON

Changelog

2025.0.0-beta2

December 18, 2024

Adds Canandcolor

2025.0.0-beta0

November 3, 2024

This release is identical to v2024.3.2 with the patches required to build against WPILib v2025.1.1-beta1.

It should function identically but breakage may still happen (this is a beta after all); use at your own risk.

2024.3.2

November 3, 2024

This release adds support for WPILib struct serialization for a few classes.

New Features

  • [Java/C++] wpistruct support for Canandgyro and Canandmag status and faults classes

  • C++ also gets support for angular velocity and acceleration data classes

  • [Java/C++] New getStatus allows for fetching of Canandgyro.Status and Canandmag.Status objects directly

  • [Java] faultBitfield() method for faults classes, for those who prefer bit flags

  • [Java] Javadoc syntax highlighting and quality improvements

Bug fixes

  • [Java] Add getStatusFrame() for Canandgyro and Canandmag

Known issues

  • The current 2024 and 2025 beta release of Glass and other utilities do not unpack nested wpistruct schemas correctly. This is expected to be fixed soon.

2024.3.1

October 18, 2024

We are proud to present the first release with Canandgyro support.

This requires WPILib version 2024.3.2. If you have compilation issues with C++, make sure to update WPILib in your robot project!

This is also paired with a new v2024.2.0 firmware release for Canandmags being used over CAN. You must update your Canandmag to v2024.2.0 for it to work properly with this vendordep!

New Features

  • [Java/C++] add Canandgyro support

  • [Driver] Support for a new, faster OTA algorithm

  • [Java] Added Frame.hasData() as part of the abstract Frame class definition

Breaking API changes

  • [Java/C++] Slight change to definition of CAN id layout; does not affect existing products

  • [Java/C++] Reduce default settings timeouts to 20 ms across the board

  • [Java] Frame callbacks now call on the Frame object itself rather than the FrameData as the argument, allowing for code that avoids pressuring GC

  • [Java] Settings objects now return java.util.Optional instead of null on the getters, as NPEs on settings fetch is undesirable behavior

  • [Java] CanandDeviceDetails uses a different set of autogenerated definitions

Bug fixes

  • [Java] Fix AdvantageKit messing with Timer.getFPGATimestamp()

  • [Java/C++] Fix settings operations timing out when they shouldn’t

  • [Java/C++] Fix isConnected() functionality

  • [Java] Fix Frame.removeCallback adding the callback instead

  • [Java] Tweaks across the board to reduce object allocation

  • [Driver] Fix Windows MSVC support

We would like to thank everyone who reported these bugs.

2024.2.0

June 5, 2024

Notable Breaking Changes

  • [Java/C++] Branding updates; Canandcoder renamed to Canandmag

Bug fixes

  • [Driver] Increase robustness to HAL_CAN_OpenStreamSession not succeeding immidiately

2024.1.2

February 19, 2024

Bugfixes

  • [Java] Fix an NPE in the firmware version checker

2024.1.1

January 11, 2024

Notable Breaking Changes

  • Canandcoder.getSettings() and Canandcolor.getSettings() no longer return null/nullopt! They will always return a Settings object with the set of settings received.

  • To check if all settings have been received, use allSettingsReceived (e.g. Canandcoder.Settings.allSettingsReceived())

  • Many settings, faults and status classes are now inner classes of their associated object in Java only.

  • Basically, one writes Canandcoder.Settings instead of CanandcoderSettings.

  • Canandcoder.isPresent and Canandcolor.isPresent have been renamed to isConnected and moved to CanandDevice (for consistency with WPILib’s similar function)

  • [Java] New overloads for .getSettings() and .setSettings() have been added to acccomodate retries.

  • [C++] GetSettings() and SetSettings have had their original function signatures have been changed, in particular the return type of .SetSettings().

  • The vendordep now sends 8-byte settings sets. Canandcoders with firmwares older than v2024.1.0 will need a firwmare update for settings to work correctly. – This is especially important for the original pre-October run (green Canandcoders), as settings will not set at all for their factory-flashed firmware.

  • The Canandcolor API in general had large revisions from the preview in v2023.2.0.

New Features

  • Settings have been overhauled with a focus on reliability. getSettings() and setSettings() for both Canandcoder and Canandcolor now retry failed operations by default, and will (by default) inform the driver station if ReduxLib is not absolutely sure settings have not been written successfully.

  • Ephemeral settings writes are now supported in many places, allowing for changing device configuration without wearing down flash.

  • Introduced firmware version checking on device instantiation, which produces errors on out-of-date firmware.

  • Driver station errors/warnings are also logged for devices with instantiated objects that have been disconnected from the CAN bus.

  • The Canandcolor API has been more or less rewritten from the preview in v2023.2.0, with many functions and classes renamed for clarity. These names are final for the 2024 season.

  • The Canandcoder zero offset is now directly settable with CanandcoderSettings.SetZeroOffset

2023.2.0

October 14, 2023

Notable Breaking Changes

  • All instances of “CANand” have been changed to “Canand” for consistency with everything that’s not ReduxLib. Our apologies for the breakage this will cause.

  • Switching current code should be as simple as using the VSCode search and replace to change “CANand” (with Match Case selected) with “Canand”

New Features

  • Canandcolor CAN color/proximity sensor suppport added

  • CAN timestamps now use FPGA time rather than CLOCK_MONOTONIC

  • Linux arm32/arm64 standalone builds are now provided

Bug fixes

  • [Java] Fix hang on sim exit due to unterminated CanandEventLoop

  • [Java] Fix crashes due to mutation of the listener list with CanandEventLoop

  • [Java] Removed heap allocations from handleMessage() updates to reduce GC load

  • [Java] CanandUtils.bytesToLong(byte[] data) now actually works

  • [C++] Fix C++ crash on simulation init due to uninitialized HAL

  • [Java/C++] Blocking settings operations reworked to be thread safe

  • [Java/C++] Use the FPGA timestamp for all timediffs internally (it’s faster than the standard CLOCK_MONOTONIC/System.nanoTime for 2024)

  • [Java/C++] CAN timestamps are now relative to the FPGA timestamp rather than CLOCK_MONOTONIC

  • [Java/C++] Various doc comment fixes

API changes

  • [Java] CAN/Setting/Setting command constants are now in Details-type classes, similar to the details namespace in C++

  • [Java] Frames have been reworked to avoid heap (de)allocation on update – the base class is abstract and implementing classes are backed by a primitive (or array of primitives)

  • [Java] CanandMessage now has a copy constructor and is mutable to avoid heap allocation

  • [C++] Source files have been internally reorganized – side classes for devices are now distributed in different headers that the main device header imports

  • [C++] Canandcoder::kCountsPerRotation and Canandcoder::kCountsPerRotationPerSecond are now public

  • [Java/C++] Constants are changed to fit the WPILib Hungarian notation

  • [Java/C++] Support for the FETCH_SETTING_VALUE setting command has been added

  • [Java/C++] ReduxCore version is now checked

  • [Core] ReduxCore_WaitForCANMessage now returns an int (-1 means CANLink is exiting)

  • [Core] ReduxCore_GetVersion now exists

  • [Core] ReduxCore_CANMessage has been rearranged to account for 64-bit microsecond-resolution timestamps, and all timestamps are retimed to the FPGA timestamp

2023.1.0

June 4, 2023

  • The Canandcoder can now have its on-board zeroing button disabled at runtime via getDisableZeroButton(boolean) and setDisableZeroButton(boolean)

  • Several fields relating to Canandcoder-related constants have been made public rather than protected or private.

  • The faultsValid field for CANandcoderFaults now functions as intended.

  • C++ can now manually start the Redux CANLink server via redux::canand::EnsureCANLinkServer()

  • CANandMessage uses timestamps in seconds now.

  • Various docs typos

2023.0.1

May 11, 2023

Builds using simulation should run without crashing. Proper simulation support is planned for later this year.

2023.0.0

May 10, 2023

Initial release.