NidecBrushless
- class wpilib.NidecBrushless(pwmChannel: int, dioChannel: int)
Bases:
MotorController
,MotorSafety
,Sendable
Nidec Brushless Motor.
Constructor.
- Parameters:
pwmChannel – The PWM channel that the Nidec Brushless controller is attached to. 0-9 are on-board, 10-19 are on the MXP port.
dioChannel – The DIO channel that the Nidec Brushless controller is attached to. 0-9 are on-board, 10-25 are on the MXP port.
- disable() None
Disable the motor. The Enable() function must be called to re-enable the motor.
- enable() None
Re-enable the motor after Disable() has been called. The Set() function must be called to set a new motor speed.
- get() float
Get the recently set value of the PWM.
- Returns:
The most recently set value for the PWM between -1.0 and 1.0.
- getChannel() int
Gets the channel number associated with the object.
- Returns:
The channel number.
- getDescription() str
- getInverted() bool
- initSendable(builder: wpiutil._wpiutil.SendableBuilder) None
- set(speed: float) None
Set the PWM value.
The PWM value is set using a range of -1.0 to 1.0, appropriately scaling the value for the FPGA.
- Parameters:
speed – The speed value between -1.0 and 1.0 to set.
- setInverted(isInverted: bool) None
- stopMotor() None