PWMMotorController
- class wpilib.PWMMotorController(name: str, channel: SupportsInt | SupportsIndex)
Bases:
MotorController,MotorSafety,SendableCommon base class for all PWM Motor Controllers.
Constructor for a PWM Motor Controller connected via PWM.
- Parameters:
name – Name to use for SendableRegistry
channel – The SmartIO channel that the controller is attached to.
- add_follower(follower: wpilib._wpilib.PWMMotorController) None
Make the given PWM motor controller follow the output of this one.
- Parameters:
follower – The motor controller follower.
- disable() None
- enable_deadband_elimination(eliminate_deadband: bool) None
Optionally eliminate the deadband from a motor controller.
- Parameters:
eliminate_deadband – If true, set the motor curve on the motor controller to eliminate the deadband in the middle of the range. Otherwise, keep the full range without modifying any values.
- get_channel() int
- get_description() str
- get_inverted() bool
- get_throttle() float
- get_voltage() wpimath.units.volts
Gets the voltage output of the motor controller, nominally between -12 V and 12 V.
- Returns:
The voltage of the motor controller, nominally between -12 V and 12 V.
- set_inverted(is_inverted: bool) None
- set_throttle(throttle: SupportsFloat | SupportsIndex) None
- stop_motor() None