Class BlankMotor
java.lang.Object
org.firstinspires.ftc.teamcode.fy23.robot.subsystems.blank.hardwaredevice.BlankHardwareDevice
org.firstinspires.ftc.teamcode.fy23.robot.subsystems.blank.hardwaredevice.BlankMotor
- All Implemented Interfaces:
com.qualcomm.robotcore.hardware.DcMotor
,com.qualcomm.robotcore.hardware.DcMotorEx
,com.qualcomm.robotcore.hardware.DcMotorSimple
,com.qualcomm.robotcore.hardware.HardwareDevice
public class BlankMotor
extends BlankHardwareDevice
implements com.qualcomm.robotcore.hardware.DcMotorEx
A blank implementation of DcMotorEx that does nothing.
Never returns null (returns blank objects instead where applicable), so hopefully no null pointers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.DcMotor
com.qualcomm.robotcore.hardware.DcMotor.RunMode, com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior
Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.DcMotorSimple
com.qualcomm.robotcore.hardware.DcMotorSimple.Direction
Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice
com.qualcomm.robotcore.hardware.HardwareDevice.Manufacturer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.qualcomm.robotcore.hardware.DcMotorController
double
getCurrent
(org.firstinspires.ftc.robotcore.external.navigation.CurrentUnit currentUnit) double
getCurrentAlert
(org.firstinspires.ftc.robotcore.external.navigation.CurrentUnit currentUnit) int
com.qualcomm.robotcore.hardware.DcMotorSimple.Direction
com.qualcomm.robotcore.hardware.DcMotor.RunMode
getMode()
com.qualcomm.robotcore.hardware.configuration.typecontainers.MotorConfigurationType
com.qualcomm.robotcore.hardware.PIDCoefficients
getPIDCoefficients
(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode) com.qualcomm.robotcore.hardware.PIDFCoefficients
getPIDFCoefficients
(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode) int
double
getPower()
boolean
int
int
double
double
getVelocity
(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior
boolean
isBusy()
boolean
boolean
void
setCurrentAlert
(double v, org.firstinspires.ftc.robotcore.external.navigation.CurrentUnit currentUnit) void
setDirection
(com.qualcomm.robotcore.hardware.DcMotorSimple.Direction direction) void
setMode
(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode) void
void
void
setMotorType
(com.qualcomm.robotcore.hardware.configuration.typecontainers.MotorConfigurationType motorConfigurationType) void
setPIDCoefficients
(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode, com.qualcomm.robotcore.hardware.PIDCoefficients pidCoefficients) void
setPIDFCoefficients
(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode, com.qualcomm.robotcore.hardware.PIDFCoefficients pidfCoefficients) void
setPositionPIDFCoefficients
(double v) void
setPower
(double v) void
void
setTargetPosition
(int i) void
setTargetPositionTolerance
(int i) void
setVelocity
(double v) void
setVelocity
(double v, org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit) void
setVelocityPIDFCoefficients
(double v, double v1, double v2, double v3) void
setZeroPowerBehavior
(com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior zeroPowerBehavior) Methods inherited from class org.firstinspires.ftc.teamcode.fy23.robot.subsystems.blank.hardwaredevice.BlankHardwareDevice
close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice
close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode
-
Constructor Details
-
BlankMotor
public BlankMotor()
-
-
Method Details
-
setMotorEnable
public void setMotorEnable()- Specified by:
setMotorEnable
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
setMotorDisable
public void setMotorDisable()- Specified by:
setMotorDisable
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
isMotorEnabled
public boolean isMotorEnabled()- Specified by:
isMotorEnabled
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
setVelocity
public void setVelocity(double v) - Specified by:
setVelocity
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
getVelocity
public double getVelocity()- Specified by:
getVelocity
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
setPIDCoefficients
public void setPIDCoefficients(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode, com.qualcomm.robotcore.hardware.PIDCoefficients pidCoefficients) - Specified by:
setPIDCoefficients
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
setPIDFCoefficients
public void setPIDFCoefficients(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode, com.qualcomm.robotcore.hardware.PIDFCoefficients pidfCoefficients) throws UnsupportedOperationException - Specified by:
setPIDFCoefficients
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
- Throws:
UnsupportedOperationException
-
setVelocityPIDFCoefficients
public void setVelocityPIDFCoefficients(double v, double v1, double v2, double v3) - Specified by:
setVelocityPIDFCoefficients
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
setPositionPIDFCoefficients
public void setPositionPIDFCoefficients(double v) - Specified by:
setPositionPIDFCoefficients
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
getPIDCoefficients
public com.qualcomm.robotcore.hardware.PIDCoefficients getPIDCoefficients(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode) - Specified by:
getPIDCoefficients
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
getPIDFCoefficients
public com.qualcomm.robotcore.hardware.PIDFCoefficients getPIDFCoefficients(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode) - Specified by:
getPIDFCoefficients
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
setTargetPositionTolerance
public void setTargetPositionTolerance(int i) - Specified by:
setTargetPositionTolerance
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
getTargetPositionTolerance
public int getTargetPositionTolerance()- Specified by:
getTargetPositionTolerance
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
isOverCurrent
public boolean isOverCurrent()- Specified by:
isOverCurrent
in interfacecom.qualcomm.robotcore.hardware.DcMotorEx
-
getMotorType
public com.qualcomm.robotcore.hardware.configuration.typecontainers.MotorConfigurationType getMotorType()- Specified by:
getMotorType
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
setMotorType
public void setMotorType(com.qualcomm.robotcore.hardware.configuration.typecontainers.MotorConfigurationType motorConfigurationType) - Specified by:
setMotorType
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
getController
public com.qualcomm.robotcore.hardware.DcMotorController getController()- Specified by:
getController
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
getPortNumber
public int getPortNumber()- Specified by:
getPortNumber
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
setZeroPowerBehavior
public void setZeroPowerBehavior(com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior zeroPowerBehavior) - Specified by:
setZeroPowerBehavior
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
getZeroPowerBehavior
public com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior getZeroPowerBehavior()- Specified by:
getZeroPowerBehavior
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
setPowerFloat
public void setPowerFloat()- Specified by:
setPowerFloat
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
getPowerFloat
public boolean getPowerFloat()- Specified by:
getPowerFloat
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
setTargetPosition
public void setTargetPosition(int i) - Specified by:
setTargetPosition
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
getTargetPosition
public int getTargetPosition()- Specified by:
getTargetPosition
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
isBusy
public boolean isBusy()- Specified by:
isBusy
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
getCurrentPosition
public int getCurrentPosition()- Specified by:
getCurrentPosition
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
setMode
public void setMode(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode) - Specified by:
setMode
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
getMode
public com.qualcomm.robotcore.hardware.DcMotor.RunMode getMode()- Specified by:
getMode
in interfacecom.qualcomm.robotcore.hardware.DcMotor
-
setDirection
public void setDirection(com.qualcomm.robotcore.hardware.DcMotorSimple.Direction direction) - Specified by:
setDirection
in interfacecom.qualcomm.robotcore.hardware.DcMotorSimple
-
getDirection
public com.qualcomm.robotcore.hardware.DcMotorSimple.Direction getDirection()- Specified by:
getDirection
in interfacecom.qualcomm.robotcore.hardware.DcMotorSimple
-
setPower
public void setPower(double v) - Specified by:
setPower
in interfacecom.qualcomm.robotcore.hardware.DcMotorSimple
-
getPower
public double getPower()- Specified by:
getPower
in interfacecom.qualcomm.robotcore.hardware.DcMotorSimple
-