ReduxLib Docs and Installation

The current version of ReduxLib is 2023.2.0.

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_2023.json

Offline installation

Download the current offline zip and extract its contents to either C:\Users\Public\wpilib\2023 on Windows or ~/wpilib/2023 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

Changelog

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.