You can install the C++/Java version of this library using this JSON URL in VSCode:
https://software-metadata.revrobotics.com/REVLib-2025.json
An offline installer is available here.
REVLib for LabVIEW is available to download here.
C++ docs: https://codedocs.revrobotics.com/cpp/
Java docs: https://codedocs.revrobotics.com/java/
Major Changes
- [REVLib] Requires non-prerelease versions of SPARK and Servo Hub firmware v25.0.0 or higher
- [SPARK] Java/C++: Moves to a more declarative approach for configuring devices
- Adds
SparkFlexConfig
,SparkMaxConfig
which includes settings for different aspects of each device - Adds
configure()
method to apply a config object's settings to one or more devices of the correct type - Adds
configureAsync()
to configure a device without blocking the program - Adds a
configAccessor
field to device classes for reading configuration parameters directly from the device
- Adds
- [SPARK] Java/C++: Adds better support for simulation
- Moves away from
REVPhysicsSim
to offer better support for WPILib physics simulation instead - Revamps simulation GUI data, including brand new fields for auxiliary devices
- Adds Sim classes for each auxiliary device, allowing for more thorough simulation in the WPILib injection style
- Adds
SparkSim.iterate()
method which features simulated current limits, closed-loop control, and more - Adds
SparkSimFaultManager
for throwing simulated faults
- Moves away from
- [SPARK] Adds support for MAXMotion
- Adds control types
MAXMotionPositionControl
andMAXMotionVelocityControl
- Adds
MAXMotionConfig
. Only trapezoidal profile is available at this time. - MAXMotion is not a drop-in replacement for Smart Motion, as you will need to retune PID gains.
- Adds control types
- [SPARK] Improves experience with managing status signals from SPARK devices
- Adds
SignalsConfig
to adjust signal periods and always on setting - Automatically enables relevant status frames if a signal is requested by the user
- Adds
- [Servo Hub] Java/C++: Adds initial support for Servo Hub
- Follows the same paradigms used for SPARK
- Includes basic simulation support for Servo Hub
Breaking Changes
- [SPARK] Renames
CANSparkFlex
andCANSparkMax
toSparkFlex
andSparkMax
respectively - [SPARK] Renames
SparkPIDController
toSparkClosedLoopController
- [SPARK] Removes configuration parameter setter/getter methods. Use
SparkBase.configure()
andSparkBase.configAccessor
instead. - [SPARK] Removes
burnFlash()
andrestoreFactoryDefaults()
. Use theResetMode
andPersistMode
options inSparkBase.configure()
instead. - [SPARK] Removes
REVPhysicsSim
in favor of new simulation system - [SPARK] Removes async mechanism for setting parameters by setting CAN timeout to 0 in favor of
configureAsync()
- [SPARK] Moves all SPARK related classes into a
spark
package in Java and namespace in C++ - [SPARK] LabVIEW: Reworks entire VI palette
- Improves organization of VI palette by separating VIs by configuration, device status, and utility
- Moves towards increased usage of polymorphic VIs for easier navigation of the palette
Other Changes
- [SPARK] Fixes issue where multiple setpoint commands would be sent when switching control types on a SPARK, resulting in the motor oscillating between the different setpoints
- [SPARK] Deprecates
kSmartMotion
andkSmartVelocity
control types in favor ofkMAXMotionPositionControl
andkMAXMotionVelocityControl
respectively. - [SPARK] Deprecates
SparkBase.setInverted()
andSparkBase.getInverted()
in favor of using the new configuration system - [SPARK] Updates
ClosedLoopController.setReference()
to use theClosedLoopSlot
enum instead of an int - [SPARK] Improves error description when attempting to persist parameters while the robot is enabled
- [SPARK] Improves getting faults/warnings by returning a
Faults
orWarnings
object- The raw bits of faults and warnings are available as a field in the respective struct
- [SPARK] Adds
hasActiveFault()
,hasStickyFault()
,hasActiveWarning()
, andhasStickyWarning()
to check if there is a fault/warning present at all on the SPARK device - [SPARK] Adds
pauseFollowerMode()
andresumeFollowerMode()
- [SPARK] Adds ability for follower mode to work even if the follower is not referenced in user code
- [SPARK] Adds support for specifying an absolute encoder's duty cycle start and end pulse widths in
AbsoluteEncoderConfig
- [SPARK] Adds configuration option for setting whether the absolute encoder is zero-centered
- [REVLib] Fixes potential memory leaks in string handling
- [SPARK] LabVIEW: Improves reliability of CAN transactions by adding a retry mechanism