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.
  • Constructor Details

    • BlankMotor

      public BlankMotor()
  • Method Details

    • setMotorEnable

      public void setMotorEnable()
      Specified by:
      setMotorEnable in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • setMotorDisable

      public void setMotorDisable()
      Specified by:
      setMotorDisable in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • isMotorEnabled

      public boolean isMotorEnabled()
      Specified by:
      isMotorEnabled in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • setVelocity

      public void setVelocity(double v)
      Specified by:
      setVelocity in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • setVelocity

      public void setVelocity(double v, org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
      Specified by:
      setVelocity in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • getVelocity

      public double getVelocity()
      Specified by:
      getVelocity in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • getVelocity

      public double getVelocity(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
      Specified by:
      getVelocity in interface com.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 interface com.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 interface com.qualcomm.robotcore.hardware.DcMotorEx
      Throws:
      UnsupportedOperationException
    • setVelocityPIDFCoefficients

      public void setVelocityPIDFCoefficients(double v, double v1, double v2, double v3)
      Specified by:
      setVelocityPIDFCoefficients in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • setPositionPIDFCoefficients

      public void setPositionPIDFCoefficients(double v)
      Specified by:
      setPositionPIDFCoefficients in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • getPIDCoefficients

      public com.qualcomm.robotcore.hardware.PIDCoefficients getPIDCoefficients(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode)
      Specified by:
      getPIDCoefficients in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • getPIDFCoefficients

      public com.qualcomm.robotcore.hardware.PIDFCoefficients getPIDFCoefficients(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode)
      Specified by:
      getPIDFCoefficients in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • setTargetPositionTolerance

      public void setTargetPositionTolerance(int i)
      Specified by:
      setTargetPositionTolerance in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • getTargetPositionTolerance

      public int getTargetPositionTolerance()
      Specified by:
      getTargetPositionTolerance in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • getCurrent

      public double getCurrent(org.firstinspires.ftc.robotcore.external.navigation.CurrentUnit currentUnit)
      Specified by:
      getCurrent in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • getCurrentAlert

      public double getCurrentAlert(org.firstinspires.ftc.robotcore.external.navigation.CurrentUnit currentUnit)
      Specified by:
      getCurrentAlert in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • setCurrentAlert

      public void setCurrentAlert(double v, org.firstinspires.ftc.robotcore.external.navigation.CurrentUnit currentUnit)
      Specified by:
      setCurrentAlert in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • isOverCurrent

      public boolean isOverCurrent()
      Specified by:
      isOverCurrent in interface com.qualcomm.robotcore.hardware.DcMotorEx
    • getMotorType

      public com.qualcomm.robotcore.hardware.configuration.typecontainers.MotorConfigurationType getMotorType()
      Specified by:
      getMotorType in interface com.qualcomm.robotcore.hardware.DcMotor
    • setMotorType

      public void setMotorType(com.qualcomm.robotcore.hardware.configuration.typecontainers.MotorConfigurationType motorConfigurationType)
      Specified by:
      setMotorType in interface com.qualcomm.robotcore.hardware.DcMotor
    • getController

      public com.qualcomm.robotcore.hardware.DcMotorController getController()
      Specified by:
      getController in interface com.qualcomm.robotcore.hardware.DcMotor
    • getPortNumber

      public int getPortNumber()
      Specified by:
      getPortNumber in interface com.qualcomm.robotcore.hardware.DcMotor
    • setZeroPowerBehavior

      public void setZeroPowerBehavior(com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior zeroPowerBehavior)
      Specified by:
      setZeroPowerBehavior in interface com.qualcomm.robotcore.hardware.DcMotor
    • getZeroPowerBehavior

      public com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior getZeroPowerBehavior()
      Specified by:
      getZeroPowerBehavior in interface com.qualcomm.robotcore.hardware.DcMotor
    • setPowerFloat

      public void setPowerFloat()
      Specified by:
      setPowerFloat in interface com.qualcomm.robotcore.hardware.DcMotor
    • getPowerFloat

      public boolean getPowerFloat()
      Specified by:
      getPowerFloat in interface com.qualcomm.robotcore.hardware.DcMotor
    • setTargetPosition

      public void setTargetPosition(int i)
      Specified by:
      setTargetPosition in interface com.qualcomm.robotcore.hardware.DcMotor
    • getTargetPosition

      public int getTargetPosition()
      Specified by:
      getTargetPosition in interface com.qualcomm.robotcore.hardware.DcMotor
    • isBusy

      public boolean isBusy()
      Specified by:
      isBusy in interface com.qualcomm.robotcore.hardware.DcMotor
    • getCurrentPosition

      public int getCurrentPosition()
      Specified by:
      getCurrentPosition in interface com.qualcomm.robotcore.hardware.DcMotor
    • setMode

      public void setMode(com.qualcomm.robotcore.hardware.DcMotor.RunMode runMode)
      Specified by:
      setMode in interface com.qualcomm.robotcore.hardware.DcMotor
    • getMode

      public com.qualcomm.robotcore.hardware.DcMotor.RunMode getMode()
      Specified by:
      getMode in interface com.qualcomm.robotcore.hardware.DcMotor
    • setDirection

      public void setDirection(com.qualcomm.robotcore.hardware.DcMotorSimple.Direction direction)
      Specified by:
      setDirection in interface com.qualcomm.robotcore.hardware.DcMotorSimple
    • getDirection

      public com.qualcomm.robotcore.hardware.DcMotorSimple.Direction getDirection()
      Specified by:
      getDirection in interface com.qualcomm.robotcore.hardware.DcMotorSimple
    • setPower

      public void setPower(double v)
      Specified by:
      setPower in interface com.qualcomm.robotcore.hardware.DcMotorSimple
    • getPower

      public double getPower()
      Specified by:
      getPower in interface com.qualcomm.robotcore.hardware.DcMotorSimple