Skip to content

@rev-robotics/rhsplib version 2.0.0

Compare
Choose a tag to compare
@NoahAndrews NoahAndrews released this 23 Aug 00:11
· 42 commits to main since this release

If you were using a previous version of this package, we recommend migrating to @rev-robotics/expansion-hub our new high-level library for Expansion Hubs. This package will still be maintained, but the new one is much easier to use correctly.

Breaking Changes

  • Switches from being a CommonJS module to an ES6 module
  • Adds channel and rawMode parameters to the getADC() method
  • Changes type of motorMode parameters to new MotorMode enum
  • Various values are now their human-friendly versions, instead of the ones that are transmitted over-the-wire
    • Motor power levels are now in the range [-1, 1]
    • PID coefficients are now floating-point values that are typically in the range [0, 1)
  • DIODirection has been replaced by DigitalChannelDirection
  • RGB has been replaced by Rgb
  • LEDPattern has been replaced by LedPattern
  • setMotorPIDCoefficients() has been replaced by setMotorClosedLoopControlCoefficients()
    • Adds support for setting PIDF coefficients
  • getMotorPIDCoefficients() has been replaced by getMotorClosedLoopControlCoefficients()
  • Removes PWM (not servo) functions
    • These used commands that are not implemented in the Expansion Hub's firmware

New Features

  • Adds RhspLibErrorCode and SerialErrorCode enums
  • Adds support for getting and setting PIDF coefficients