REVLib 2024.2.0
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 FlexCanSparkFlex
has agetExternalEncoder()
method that returns aSparkFlexExternalEncoder
instead of agetAlternateEncoder()
method that returns aSparkMaxAlternateEncoder
.- 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
, useCANSparkLowLevel
- Instead of
SparkMaxAbsoluteEncoder
, useSparkAbsoluteEncoder
- Instead of
SparkMaxAnalogSensor
, useSparkAnalogSensor
- Instead of
SparkMaxLimitSwitch
, useSparkLimitSwitch
- Instead of
SparkMaxPIDController
, useSparkPIDController
- Instead of
SparkMaxRelativeEncoder
, useSparkRelativeEncoder
- Instead of
ExternalFollower.kFollowerSparkMax
, useExternalFollower.kFollowerSpark
- The
ExternalFollower
enum can be accessed atCANSparkMax.ExternalFollower
,CANSparkFlex.ExternalFollower
, orCANSparkBase.ExternalFollower
- The
- Instead of
- Adds a
CANSparkBase.getSparkModel()
method that returns aSparkModel
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