robotpy / robotpy-rev

RobotPy bindings for REV Robotics' REVLib
Other
8 stars 13 forks source link

[BUG]: __init__ doesn't include AbsoluteEncoder or SparkMaxAbsoluteEncoder #45

Closed isubsmith closed 1 year ago

isubsmith commented 1 year ago

Problem description

We're working on porting the Java code from REV for their new swerve modules and noticed the Python bindings for revlib seem to lack the AbsoluteEncoder and SparkMaxAbsoluteEncoder that the swerve modules utilize.

dir(rev) ['AnalogInput', 'CANSensor', 'CANSparkMax', 'CANSparkMaxLowLevel', 'CIEColor', 'ColorMatch', 'ColorSensorV3', 'MotorFeedbackSensor', 'REVLibError', 'RelativeEncoder', 'SparkMaxAlternateEncoder', 'SparkMaxAnalogSensor', 'SparkMaxLimitSwitch', 'SparkMaxPIDController', 'SparkMaxRelativeEncoder', 'all', 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec', 'version', '_rev', 'version'] rev.version '2023.1.2'

grepping around in the site-packages, it looks like the C++ code is there and it looks like it's in the rev._rev package -

import rev._rev dir(rev._rev) ['AbsoluteEncoder', 'AnalogInput', 'CANSensor', 'CANSparkMax', 'CANSparkMaxLowLevel', 'CIEColor', 'ColorMatch', 'ColorSensorV3', 'MotorFeedbackSensor', 'REVLibError', 'RelativeEncoder', 'SparkMaxAbsoluteEncoder', 'SparkMaxAlternateEncoder', 'SparkMaxAnalogSensor', 'SparkMaxLimitSwitch', 'SparkMaxPIDController', 'SparkMaxRelativeEncoder', 'doc', 'file', 'loader', 'name', 'package', 'spec']

So, I think it's just missing from the rev init.py perhaps?

Thanks -Brian

Operating System

Windows

Installed Python Packages

No response

Reproducible example code

No response