Motor
Drop-in replacement for a DcMotor that uses custom control algorithms to operate RUN_USING_ENCODER and RUN_TO_POSITION modes. Internally integrates a gain scheduler to allow for more precise system coefficients against gravity and other external forces.
This class is designed to be down casted to a DcMotor where used, integrating with the current motor modes while providing faster, predictable control systems.
Author
Lucas Bubner, 2024
Since
4.0.0
Constructors
Types
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Note that this method will try to access the RUN_TO_POSITION controller to access information there.
Link copied to clipboard
Link copied to clipboard
Reset the encoder value without stopping the motor.
Link copied to clipboard
Call to build a list of encoder tick positions where you want your RUN_TO_POSITION system controller gains to be.
Link copied to clipboard
Call to build a list of encoder tick positions where you want your RUN_USING_ENCODER system controller gains to be.
Link copied to clipboard
Sets the maximum power magnitude (applies for both negative and positive powers) this motor can run at.
Link copied to clipboard
Set the delta in power required to propagate a hardware write.
Link copied to clipboard
Set the refresh rate of the motor that will be a minimum time between hardware writes.
Link copied to clipboard
Set a system controller to use for RUN_TO_POSITION.
Link copied to clipboard
open fun setRunUsingEncoderController(controller: SystemController, bufferFraction: Double, maxAchievableTicksPerSecond: Double)
Set a system controller to use for RUN_USING_ENCODER.
Link copied to clipboard
Note that this method will try to access the RUN_TO_POSITION controller to access information there.
Link copied to clipboard
Switches the motor to velocity control and tries to set the ticks/sec target.
Switches the motor to velocity control and tries to set the angular velocity of the motor based on the intrinsic MotorConfigurationType configuration.
Link copied to clipboard
Call to use encoder overflow (exceeding 32767 ticks/sec) correction on getVelocity.
Inherited functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard