Skip to content

REVLib 2025.0.0

Latest
Compare
Choose a tag to compare
@REV-Bot2 REV-Bot2 released this 04 Jan 02:40
e5d1504

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
  • [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
  • [SPARK] Adds support for MAXMotion
    • Adds control types MAXMotionPositionControl and MAXMotionVelocityControl
    • 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.
  • [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
  • [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 and CANSparkMax to SparkFlex and SparkMax respectively
  • [SPARK] Renames SparkPIDController to SparkClosedLoopController
  • [SPARK] Removes configuration parameter setter/getter methods. Use SparkBase.configure() and SparkBase.configAccessor instead.
  • [SPARK] Removes burnFlash() and restoreFactoryDefaults(). Use the ResetMode and PersistMode options in SparkBase.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 and kSmartVelocity control types in favor of kMAXMotionPositionControl and kMAXMotionVelocityControl respectively.
  • [SPARK] Deprecates SparkBase.setInverted() and SparkBase.getInverted() in favor of using the new configuration system
  • [SPARK] Updates ClosedLoopController.setReference() to use the ClosedLoopSlot 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 or Warnings object
    • The raw bits of faults and warnings are available as a field in the respective struct
  • [SPARK] Adds hasActiveFault(), hasStickyFault(), hasActiveWarning(), and hasStickyWarning() to check if there is a fault/warning present at all on the SPARK device
  • [SPARK] Adds pauseFollowerMode() and resumeFollowerMode()
  • [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