DcMotor
A wrapper class for FTC's DcMotor. This class extends BaseMotor and provides a convenient way to interact with DC motors in a robot, including handling inversion, power limits, and deadband.
Methods
DcMotor(String name, HardwareMap hardwareMap)
Constructs a new DcMotor instance with the given name and hardware map. The motor will not be inverted by default.
DcMotor(String name, HardwareMap hardwareMap, boolean isInverted)
Constructs a new DcMotor instance, allowing you to specify if the motor should be inverted for both setting and getting power.
DcMotor(String name, HardwareMap hardwareMap, boolean isSetInverted, boolean isGetInverted)
Constructs a new DcMotor instance, allowing separate inversion settings for setting and getting power.
DcMotor(String name, HardwareMap hardwareMap, boolean isSetInverted, boolean isGetInverted, double deadband)
Constructs a new DcMotor instance with full control over inversion and deadband settings.
getDcMotor()
Returns the underlying com.qualcomm.robotcore.hardware.DcMotor object.
abstractSetPower(double power)
Implements the abstract method from BaseMotor to set the power of the physical DC motor.
abstractGetPower()
Implements the abstract method from BaseMotor to get the current power of the physical DC motor.