Skip to content

REVLib 2024.1.1 (beta)

Pre-release
Pre-release
Compare
Choose a tag to compare
@REV-Bot2 REV-Bot2 released this 02 Jan 23:55
198462b

Adds support for SPARK Flex. This release is not intended for competition use in the 2024 FRC season. It is compatible with SPARK Flex firmware 23.x.x and SPARK MAX firmware 1.6.x, and requires WPILib 2024.

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

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

This update is not yet available for LabVIEW. You can continue to use the 2024.0.0 beta version. Even though the VIs are named for the SPARK MAX, they will work with the SPARK Flex as well.

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

Changelog

  • Compatible with SPARK Flex firmware 23.x.x and SPARK MAX firmware 1.6.x
  • 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