Closed wmbelk closed 4 hours ago
The error message is hard to read, but it does tell you what the problem is. I'll reformat it here to make it more obvious (though, I can't easily fix the error message).
TypeError: setReference(): incompatible function arguments. The following argument types are supported:
1. (
self: rev._rev.SparkMaxPIDController,
value: float,
+ ctrl: rev._rev.CANSparkLowLevel.ControlType,
pidSlot: int = 0,
arbFeedforward: float = 0,
arbFFUnits: rev._rev.SparkMaxPIDController.ArbFFUnits = <ArbFFUnits.kVoltage: 0>
) -> rev._rev.REVLibError
It requires you to pass in a rev.CANSparkLowLevel.ControlType
in addition to the value.
Problem description
Getting the PID Controller creates a SparkPIDController. The setReference method expects the SparkMaxPIDController. Givving this error: TypeError: setReference(): incompatible function arguments. The following argument types are supported:
Invoked with: <rev._rev.SparkPIDController object at 0x000001E2CDFA90B0>, 0.0
Operating System
Windows
Installed Python Packages
Reproducible example code