Skip to content

REVLib 2024.2.0

Compare
Choose a tag to compare
@REV-Bot2 REV-Bot2 released this 06 Jan 11:37
· 1 commit to main since this release
198462b

Official 2024 FRC kickoff release for REVLib, with full support for SPARK Flex. Requires WPILib 2024 and SPARK Flex/SPARK MAX firmware 24.x.x.

You can install the C++/Java version of this library using this JSON URL in VSCode:

https://software-metadata.revrobotics.com/REVLib-2024.json

The REVLib LabVIEW package is available to download here.

C++ docs: https://codedocs.revrobotics.com/cpp/
Java docs: https://codedocs.revrobotics.com/java/

Changes to C++, Java, and LabVIEW

  • Throws an error if firmware version is less than 24.0.0
  • Throws an error if the motor type is set to Brushed on a SPARK Flex while a SPARK Flex Dock is not connected
  • Gets main encoder position with enhanced precision

Changes to C++ and Java

  • Sends a warning to the Driver Station if the wrong class is used for the type of SPARK that is connected
  • Adds CanSparkBase class that exposes functionality that is common to both the SPARK MAX and the SPARK Flex
  • Adds CanSparkFlex class that exposes all functionality of the SPARK Flex
    • CanSparkFlex has a getExternalEncoder() method that returns a SparkFlexExternalEncoder instead of a getAlternateEncoder() method that returns a SparkMaxAlternateEncoder.
    • This is because Alternate Encoder Mode is not necessary for SPARK Flex, and has been replaced by the External Encoder Data Port feature:
      • Can be used simultaneously with the internal encoders in NEO class motors
      • Can be used simultaneously with an absolute encoder and limit switches
      • Virtually no RPM limit
      • No special configuration
  • The following items have been deprecated in favor of new equivalents:
    • Instead of CANSparkMaxLowLevel, use CANSparkLowLevel
    • Instead of SparkMaxAbsoluteEncoder, use SparkAbsoluteEncoder
    • Instead of SparkMaxAnalogSensor, use SparkAnalogSensor
    • Instead of SparkMaxLimitSwitch, use SparkLimitSwitch
    • Instead of SparkMaxPIDController, use SparkPIDController
    • Instead of SparkMaxRelativeEncoder, use SparkRelativeEncoder
    • Instead of ExternalFollower.kFollowerSparkMax, use ExternalFollower.kFollowerSpark
      • The ExternalFollower enum can be accessed at CANSparkMax.ExternalFollower, CANSparkFlex.ExternalFollower, or CANSparkBase.ExternalFollower
  • Adds a CANSparkBase.getSparkModel() method that returns a SparkModel enum

Changes to LabVIEW

  • Deprecates old VIs that are prefixed with "Spark MAX" and replaces them with VIs prefixed with "SPARK"
    • Deprecated icons are "grayed out"
    • Help context (documentation) for deprecated VIs point the user to the equivalent new VI
    • New icons say "SPARK" instead of "REV MAX"
  • Adds SPARK Get Model.vi
  • Fixes SPARK Get Analog Sensor Voltage.vi when used with a SPARK Flex
  • Updates SPARK Get I Accum.vi to get I Accum from status 7 instead of status 2
  • Updates "Alternate Encoder" VIs to be "Alternate or External Encoder"
    • Only throw the data port config warnings when the device is a SPARK MAX