CANDigitalInput

class rev.CANDigitalInput(self: rev.CANDigitalInput, device: rev.CANSparkMax, limitSwitch: rev._rev.CANDigitalInput.LimitSwitch, polarity: rev._rev.CANDigitalInput.LimitSwitchPolarity) → None

Bases: pybind11_builtins.pybind11_object

class LimitSwitch(self: rev._rev.CANDigitalInput.LimitSwitch, value: int) → None

Bases: pybind11_builtins.pybind11_object

Members:

kForward

kReverse

kForward = <LimitSwitch.kForward: 0>
kReverse = <LimitSwitch.kReverse: 1>
property name
class LimitSwitchPolarity(self: rev._rev.CANDigitalInput.LimitSwitchPolarity, value: int) → None

Bases: pybind11_builtins.pybind11_object

Members:

kNormallyOpen

kNormallyClosed

kNormallyClosed = <LimitSwitchPolarity.kNormallyClosed: 1>
kNormallyOpen = <LimitSwitchPolarity.kNormallyOpen: 0>
property name
enableLimitSwitch(self: rev.CANDigitalInput, enable: bool)rev.CANError

Enables or disables controller shutdown based on limit switch.

get(self: rev.CANDigitalInput) → bool

Get the value from a digital input channel.

Retrieve the value of a single digital input channel from a motor controller. This method will return the state of the limit input based on the selected polarity, whether or not it is enabled.

isLimitSwitchEnabled(self: rev.CANDigitalInput) → bool

Returns true if limit switch is enabled.