# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Enums
- Deprecated Methods
- Deprecated Enum Constants

- Deprecated Classes
  Class and Description
  com.qualcomm.robotcore.eventloop.opmode.AnnotatedOpModeRegistrar The function formerly performed by this class is now automatically executed by the system

- Deprecated Enums
  Enum and Description
  com.qualcomm.robotcore.hardware.DigitalChannelController.Mode use `DigitalChannel.Mode` instead

- Deprecated Methods
  Method and Description
  org.firstinspires.ftc.robotcore.external.ClassFactory.createVuforiaLocalizer(VuforiaLocalizer.Parameters) Use `ClassFactory.createVuforia(VuforiaLocalizer.Parameters)` instead
  com.qualcomm.robotcore.hardware.I2cDeviceImpl.enableI2cReadMode(I2cAddr, int, int)
  com.qualcomm.robotcore.hardware.I2cDeviceImpl.enableI2cWriteMode(I2cAddr, int, int)
  org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.getCameraDirection() This is of little use if a non-builtin camera is in use.
  com.qualcomm.robotcore.hardware.I2cDevice.getController() Use of `I2cControllerPortDevice.getI2cController()` is suggested instead
  com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.getI2cAddr()
  com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple.getI2cAddr() Use `I2cAddressableDevice.getI2cAddress()` instead.
  org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.getLastTrackedRawPose() use `VuforiaTrackableDefaultListener.getLastTrackedPoseVuforiaCamera()` instead
  org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.getPhoneLocationOnRobot() Using `VuforiaTrackableDefaultListener.getCameraLocationOnRobot(CameraName)` is a better choice.
  com.qualcomm.robotcore.hardware.DcMotorEx.getPIDCoefficients(DcMotor.RunMode) Use `#getPIDFCoefficients(RunMode)` instead
  com.qualcomm.robotcore.hardware.DcMotorControllerEx.getPIDCoefficients(int, DcMotor.RunMode) Use `DcMotorControllerEx.getPIDFCoefficients(int, DcMotor.RunMode)` instead
  org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.getPoseCorrectionMatrix(VuforiaLocalizer.CameraDirection) These phone-based matrices are no longer of much relevance, as the correct values, when of interest, are fixed and known.
  org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.getRawPose() use `VuforiaTrackableDefaultListener.getVuforiaCameraFromTarget()` instead
  org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.getRawUpdatedPose() use `VuforiaTrackableDefaultListener.getUpdatedVuforiaCameraFromTarget()` instead
  com.qualcomm.robotcore.hardware.I2cDevice.isI2cPortActionFlagSet() this method returns a value that is rarely that which is expected
  com.qualcomm.robotcore.hardware.DcMotor.RunMode.migrate() Replace use of old constants with new
  com.qualcomm.ftccommon.SoundPlayer.play(Context, int) use `SoundPlayer.startPlaying(Context, int)` instead
  com.qualcomm.ftccommon.SoundPlayer.play(Context, int, boolean) use `#startPlaying(Context, int, PlaySoundParams, Consumer, Runnable)` instead
  com.qualcomm.robotcore.hardware.I2cDevice.readI2cCacheFromModule() Use of `I2cDevice.readI2cCacheFromController()` is suggested instead
  com.qualcomm.robotcore.hardware.I2cDeviceImpl.readI2cCacheFromModule()
  com.qualcomm.robotcore.hardware.I2cController.readI2cCacheFromModule(int)
  com.qualcomm.robotcore.eventloop.opmode.AnnotatedOpModeRegistrar.register(OpModeManager) functionality now automatically called by the system
  com.qualcomm.robotcore.hardware.DigitalChannelController.setDigitalChannelMode(int, DigitalChannelController.Mode) use `DigitalChannelController.setDigitalChannelMode(int, DigitalChannel.Mode)` instead
  com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.setI2cAddr(I2cAddr)
  com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple.setI2cAddr(I2cAddr) Use `I2cAddrConfig.setI2cAddress(I2cAddr)` instead.
  com.qualcomm.robotcore.hardware.DigitalChannel.setMode(DigitalChannelController.Mode) use `DigitalChannel.setMode(Mode)` instead
  com.qualcomm.robotcore.hardware.DigitalChannelImpl.setMode(DigitalChannelController.Mode)
  com.qualcomm.robotcore.hardware.DcMotorEx.setPIDCoefficients(DcMotor.RunMode, PIDCoefficients) Use `#setPIDFCoefficients(RunMode, PIDFCoefficients)` instead
  com.qualcomm.robotcore.hardware.DcMotorControllerEx.setPIDCoefficients(int, DcMotor.RunMode, PIDCoefficients) Use `DcMotorControllerEx.setPIDFCoefficients(int, DcMotor.RunMode, PIDFCoefficients)` instead
  org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.setPoseCorrectionMatrix(VuforiaLocalizer.CameraDirection, OpenGLMatrix)
  com.qualcomm.robotcore.hardware.DcMotor.setPowerFloat() This method is deprecated in favor of direct use of `setZeroPowerBehavior()` and `setPower()`.
  com.qualcomm.robotcore.hardware.DcMotorImpl.setPowerFloat()
  com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.waitForNextHardwareCycle() The need for user code to synchronize with the loop() thread has been obviated by improvements in the modern motor and servo controller implementations. Remaining uses of this API are likely unncessarily wasting cycles. If a simple non-zero delay is required, the `sleep()` method is a better choice. If one simply wants to allow other threads to run, `LinearOpMode.idle()` is a good choice.
  com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.waitOneFullHardwareCycle() The need for user code to synchronize with the loop() thread has been obviated by improvements in the modern motor and servo controller implementations. Remaining uses of this API are likely unncessarily wasting cycles. If a simple non-zero delay is required, the `sleep()` method is a better choice. If one simply wants to allow other threads to run, `LinearOpMode.idle()` is a good choice.
  com.qualcomm.robotcore.hardware.I2cDevice.writeI2cCacheToModule() Use of `I2cDevice.writeI2cCacheToController()` is suggested instead
  com.qualcomm.robotcore.hardware.I2cDeviceImpl.writeI2cCacheToModule()
  com.qualcomm.robotcore.hardware.I2cController.writeI2cCacheToModule(int)
  com.qualcomm.robotcore.hardware.I2cDevice.writeI2cPortFlagOnlyToModule() Use of `I2cDevice.writeI2cPortFlagOnlyToController()` is suggested instead
  com.qualcomm.robotcore.hardware.I2cDeviceImpl.writeI2cPortFlagOnlyToModule()
  com.qualcomm.robotcore.hardware.I2cController.writeI2cPortFlagOnlyToModule(int)

- Deprecated Enum Constants
  Enum Constant and Description
  com.qualcomm.robotcore.hardware.MotorControlAlgorithm.LegacyPID Switch to `MotorControlAlgorithm.PIDF` instead
  com.qualcomm.robotcore.hardware.DcMotor.RunMode.RESET_ENCODERS Use `DcMotor.RunMode.STOP_AND_RESET_ENCODER` instead
  com.qualcomm.robotcore.hardware.DcMotor.RunMode.RUN_USING_ENCODERS Use `DcMotor.RunMode.RUN_USING_ENCODER` instead
  com.qualcomm.robotcore.hardware.DcMotor.RunMode.RUN_WITHOUT_ENCODERS Use `DcMotor.RunMode.RUN_WITHOUT_ENCODER` instead