setStopPowerOnZeroVelocity

open fun setStopPowerOnZeroVelocity(stopPowerOnZeroVelocity: Boolean)

Sets the zero power behaviour of the motor in the RUN_USING_ENCODER mode. Stop power on zero velocity will cut all power to the motor if a desired velocity of zero is requested, allowing it to naturally decelerate.

This is enabled by default. With this functionality disabled, the system controller will supply active inputs to bring the motor to a stop treating 0 as a setpoint. This behaviour may be unsafe and caution should be taken if this mode is disabled.

Parameters

stopPowerOnZeroVelocity

whether to stop motor output when the desired velocity is 0. Default is true.