robotpy / robotpy-rev

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

[BUG]: setFeedbackDevice doesn't work #47

Closed virtuald closed 1 year ago

virtuald commented 1 year ago

Problem description

Sad.

Operating System

RoboRIO

Installed Python Packages

No response

Reproducible example code

>>> import rev
>>> s = rev.CANSparkMax(1, rev.CANSparkMaxLowLevel.MotorType.kBrushless)
>>> e = s.getEncoder()
>>> p = s.getPIDController()
>>> p.setFeedbackDevice(e)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: setFeedbackDevice(): incompatible function arguments. The following argument types are supported:
    1. (self: rev._rev.SparkMaxPIDController, sensor: rev._rev.CANSensor) -> rev._rev.REVLibError

Invoked with: <rev._rev.SparkMaxPIDController object at 0x10e266670>, <rev._rev.SparkMaxRelativeEncoder object at 0x10fdffd30>