Class DifferentialMechanism<MotorT extends CommonTalon>

java.lang.Object
com.ctre.phoenix6.mechanisms.DifferentialMechanism<MotorT>

public class DifferentialMechanism<MotorT extends CommonTalon> extends Object
Manages control of a two-axis differential mechanism.

This mechanism requires the devices to be Pro licensed and connected to a CAN FD bus. Unlicensed users and users on a CAN 2.0 bus can use the SimpleDifferentialMechanism instead with limited functionality.

A differential mechanism has two axes of motion, where the position along each axis is determined by two motors in separate gearboxes:

  • Driving both motors in a common direction causes the mechanism to move forward/reverse, up/down, etc.
    • This is the Average axis: position is determined by the average of the two motors' positions.
  • Driving the motors in opposing directions causes the mechanism to twist or rotate left/right.
    • This is the Difference axis: rotation is determined by half the difference of the two motors' positions.
  • Constructor Details

    • DifferentialMechanism

      Creates a new differential mechanism using two CommonTalon devices. The mechanism will use the average of the two Talon FX sensors on the primary axis, and half of the difference between the two Talon FX sensors on the differential axis.

      This mechanism requires the devices to be Pro licensed and connected to a CAN FD bus. Unlicensed users and users on a CAN 2.0 bus can use the SimpleDifferentialMechanism instead with limited functionality.

      Parameters:
      motorConstructor - Constructor for the motors, such as TalonFX::new
      constants - Constants used to construct the mechanism
    • DifferentialMechanism

      Creates a new differential mechanism using two CommonTalon devices and a Pigeon2. The mechanism will use the average of the two Talon FX sensors on the primary axis, and the selected Pigeon 2 sensor source on the differential axis.

      This mechanism requires the devices to be Pro licensed and connected to a CAN FD bus. Unlicensed users and users on a CAN 2.0 bus can use the SimpleDifferentialMechanism instead with limited functionality.

      Parameters:
      motorConstructor - Constructor for the motors, such as TalonFX::new
      constants - Constants used to construct the mechanism
      pigeon2 - The Pigeon 2 to use for the differential axis
      pigeonSource - The sensor source to use for the Pigeon 2 (Yaw, Pitch, or Roll)
    • DifferentialMechanism

      Creates a new differential mechanism using two CommonTalon devices and a CANcoder. The mechanism will use the average of the two Talon FX sensors on the primary axis, and the CANcoder position/velocity on the differential axis.

      This mechanism requires the devices to be Pro licensed and connected to a CAN FD bus. Unlicensed users and users on a CAN 2.0 bus can use the SimpleDifferentialMechanism instead with limited functionality.

      Parameters:
      motorConstructor - Constructor for the motors, such as TalonFX::new
      constants - Constants used to construct the mechanism
      cancoder - The CANcoder to use for the differential axis
    • DifferentialMechanism

      Creates a new differential mechanism using two CommonTalon devices and a CANdi. The mechanism will use the average of the two Talon FX sensors on the primary axis, and the selected CTR Electronics' CANdiâ„¢ branded sensor source on the differential axis.

      This mechanism requires the devices to be Pro licensed and connected to a CAN FD bus. Unlicensed users and users on a CAN 2.0 bus can use the SimpleDifferentialMechanism instead with limited functionality.

      Parameters:
      motorConstructor - Constructor for the motors, such as TalonFX::new
      constants - Constants used to construct the mechanism
      candi - The CTR Electronics' CANdiâ„¢ branded device to use for the differential axis
      candiSource - The sensor source to use for the CTR Electronics' CANdiâ„¢ branded device
  • Method Details

    • configNeutralMode

      public final StatusCode configNeutralMode(NeutralModeValue neutralMode)
      Configures the neutral mode to use for both motors in the mechanism.

      This will wait up to 0.100 seconds (100ms) by default.

      Parameters:
      neutralMode - The state of the motor controller bridge when output is neutral or disabled
      Returns:
      Status code of the first failed config call, or OK if all succeeded
    • configNeutralMode

      public final StatusCode configNeutralMode(NeutralModeValue neutralMode, double timeoutSeconds)
      Configures the neutral mode to use for both motors in the mechanism.
      Parameters:
      neutralMode - The state of the motor controller bridge when output is neutral or disabled
      timeoutSeconds - Maximum amount of time to wait when performing each configuration
      Returns:
      Status code of the first failed config call, or OK if all succeeded
    • periodic

      public final void periodic()
      Call this method periodically to automatically protect against dangerous fault conditions and keep getMechanismState() updated.
    • isDisabled

      public final boolean isDisabled()
      Get whether the mechanism is currently disabled due to an issue.
      Returns:
      true if the mechanism is temporarily disabled
    • requiresUserAction

      public final boolean requiresUserAction()
      Get whether the mechanism is currently disabled and requires user action to re-enable mechanism control.
      Returns:
      true if the mechanism is disabled and the user must manually perform an action
    • getMechanismState

      Gets the state of the mechanism.
      Returns:
      MechanismState representing the state of the mechanism
    • clearUserRequirement

      public final void clearUserRequirement()
      Indicate to the mechanism that the user has performed the required action to resume mechanism control.
    • getDisabledReason

      Returns:
      The reason for the mechanism being disabled
    • getRequiresUserReason

      Returns:
      The reason for the mechanism requiring user action to resume control
    • getAveragePosition

      Average component of the mechanism position.
      • Minimum Value: -16384.0
      • Maximum Value: 16383.999755859375
      • Default Value: 0
      • Units: rotations

      This refreshes and returns a cached StatusSignal object.

      Returns:
      DifferentialAveragePosition Status Signal Object
    • getAveragePosition

      public final StatusSignal<Angle> getAveragePosition(boolean refresh)
      Average component of the mechanism position.
      • Minimum Value: -16384.0
      • Maximum Value: 16383.999755859375
      • Default Value: 0
      • Units: rotations

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      DifferentialAveragePosition Status Signal Object
    • getAverageVelocity

      Average component of the mechanism velocity.
      • Minimum Value: -512.0
      • Maximum Value: 511.998046875
      • Default Value: 0
      • Units: rotations per second

      This refreshes and returns a cached StatusSignal object.

      Returns:
      DifferentialAverageVelocity Status Signal Object
    • getAverageVelocity

      public final StatusSignal<AngularVelocity> getAverageVelocity(boolean refresh)
      Average component of the mechanism velocity.
      • Minimum Value: -512.0
      • Maximum Value: 511.998046875
      • Default Value: 0
      • Units: rotations per second

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      DifferentialAverageVelocity Status Signal Object
    • getDifferentialPosition

      Differential component of the mechanism position.
      • Minimum Value: -16384.0
      • Maximum Value: 16383.999755859375
      • Default Value: 0
      • Units: rotations

      This refreshes and returns a cached StatusSignal object.

      Returns:
      DifferentialDifferencePosition Status Signal Object
    • getDifferentialPosition

      public final StatusSignal<Angle> getDifferentialPosition(boolean refresh)
      Differential component of the mechanism position.
      • Minimum Value: -16384.0
      • Maximum Value: 16383.999755859375
      • Default Value: 0
      • Units: rotations

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      DifferentialDifferencePosition Status Signal Object
    • getDifferentialVelocity

      Differential component of the mechanism velocity.
      • Minimum Value: -512.0
      • Maximum Value: 511.998046875
      • Default Value: 0
      • Units: rotations per second

      This refreshes and returns a cached StatusSignal object.

      Returns:
      DifferentialDifferenceVelocity Status Signal Object
    • getDifferentialVelocity

      public final StatusSignal<AngularVelocity> getDifferentialVelocity(boolean refresh)
      Differential component of the mechanism velocity.
      • Minimum Value: -512.0
      • Maximum Value: 511.998046875
      • Default Value: 0
      • Units: rotations per second

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      DifferentialDifferenceVelocity Status Signal Object
    • getAverageClosedLoopReference

      Value that the average closed loop is targeting.

      This is the value that the closed loop PID controller targets.

      This refreshes and returns a cached StatusSignal object.

      Returns:
      ClosedLoopReference Status Signal object
    • getAverageClosedLoopReference

      public final StatusSignal<Double> getAverageClosedLoopReference(boolean refresh)
      Value that the average closed loop is targeting.

      This is the value that the closed loop PID controller targets.

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      ClosedLoopReference Status Signal object
    • getAverageClosedLoopReferenceSlope

      Derivative of the target that the average closed loop is targeting.

      This is the change in the closed loop reference. This may be used in the feed-forward calculation, the derivative-error, or in application of the signage for kS. Typically, this represents the target velocity during Motion Magic®.

      This refreshes and returns a cached StatusSignal object.

      Returns:
      ClosedLoopReferenceSlope Status Signal object
    • getAverageClosedLoopReferenceSlope

      public final StatusSignal<Double> getAverageClosedLoopReferenceSlope(boolean refresh)
      Derivative of the target that the average closed loop is targeting.

      This is the change in the closed loop reference. This may be used in the feed-forward calculation, the derivative-error, or in application of the signage for kS. Typically, this represents the target velocity during Motion Magic®.

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      ClosedLoopReferenceSlope Status Signal object
    • getAverageClosedLoopError

      The difference between target average reference and current measurement.

      This is the value that is treated as the error in the PID loop.

      This refreshes and returns a cached StatusSignal object.

      Returns:
      ClosedLoopError Status Signal object
    • getAverageClosedLoopError

      public final StatusSignal<Double> getAverageClosedLoopError(boolean refresh)
      The difference between target average reference and current measurement.

      This is the value that is treated as the error in the PID loop.

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      ClosedLoopError Status Signal object
    • getDifferentialClosedLoopReference

      Value that the differential closed loop is targeting.

      This is the value that the differential closed loop PID controller targets (on the difference axis).

      This refreshes and returns a cached StatusSignal object.

      Returns:
      DifferentialClosedLoopReference Status Signal object
    • getDifferentialClosedLoopReference

      public final StatusSignal<Double> getDifferentialClosedLoopReference(boolean refresh)
      Value that the differential closed loop is targeting.

      This is the value that the differential closed loop PID controller targets (on the difference axis).

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      DifferentialClosedLoopReference Status Signal object
    • getDifferentialClosedLoopReferenceSlope

      Derivative of the target that the differential closed loop is targeting.

      This is the change in the closed loop reference (on the difference axis). This may be used in the feed-forward calculation, the derivative-error, or in application of the signage for kS. Typically, this represents the target velocity during Motion Magic®.

      This refreshes and returns a cached StatusSignal object.

      Returns:
      DifferentialClosedLoopReferenceSlope Status Signal object
    • getDifferentialClosedLoopReferenceSlope

      Derivative of the target that the differential closed loop is targeting.

      This is the change in the closed loop reference (on the difference axis). This may be used in the feed-forward calculation, the derivative-error, or in application of the signage for kS. Typically, this represents the target velocity during Motion Magic®.

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      DifferentialClosedLoopReferenceSlope Status Signal object
    • getDifferentialClosedLoopError

      The difference between target differential reference and current measurement.

      This is the value that is treated as the error in the differential PID loop (on the difference axis).

      This refreshes and returns a cached StatusSignal object.

      Returns:
      DifferentialClosedLoopError Status Signal object
    • getDifferentialClosedLoopError

      public final StatusSignal<Double> getDifferentialClosedLoopError(boolean refresh)
      The difference between target differential reference and current measurement.

      This is the value that is treated as the error in the differential PID loop (on the difference axis).

      This refreshes and returns a cached StatusSignal object.

      Parameters:
      refresh - Whether to refresh the StatusSignal before returning it; defaults to true
      Returns:
      DifferentialClosedLoopError Status Signal object
    • setPosition

      public final StatusCode setPosition(double avgPosition)
      Sets the position of the mechanism in rotations, assuming a differential position of 0 rotations.

      This will wait up to 0.100 seconds (100ms) by default.

      Parameters:
      avgPosition - The average position of the mechanism, in rotations
      Returns:
      StatusCode of the set command
    • setPosition

      public final StatusCode setPosition(double avgPosition, double diffPosition)
      Sets the position of the mechanism in rotations.

      This will wait up to 0.100 seconds (100ms) by default.

      Parameters:
      avgPosition - The average position of the mechanism, in rotations
      diffPosition - The differential position of the mechanism, in rotations
      Returns:
      StatusCode of the set command
    • setPosition

      public final StatusCode setPosition(double avgPosition, double diffPosition, double timeoutSeconds)
      Sets the position of the mechanism in rotations.
      Parameters:
      avgPosition - The average position of the mechanism, in rotations
      diffPosition - The differential position of the mechanism, in rotations
      timeoutSeconds - Maximum time to wait up to in seconds
      Returns:
      StatusCode of the set command
    • setPosition

      public final StatusCode setPosition(Angle avgPosition)
      Sets the position of the mechanism, assuming a differential position of 0 rotations.

      This will wait up to 0.100 seconds (100ms) by default.

      Parameters:
      avgPosition - The average position of the mechanism
      Returns:
      StatusCode of the set command
    • setPosition

      public final StatusCode setPosition(Angle avgPosition, Angle diffPosition)
      Sets the position of the mechanism.

      This will wait up to 0.100 seconds (100ms) by default.

      Parameters:
      avgPosition - The average position of the mechanism
      diffPosition - The differential position of the mechanism
      Returns:
      StatusCode of the set command
    • setPosition

      public final StatusCode setPosition(Angle avgPosition, Angle diffPosition, double timeoutSeconds)
      Sets the position of the mechanism.
      Parameters:
      avgPosition - The average position of the mechanism
      diffPosition - The differential position of the mechanism
      timeoutSeconds - Maximum time to wait up to in seconds
      Returns:
      StatusCode of the set command
    • getLeader

      public final MotorT getLeader()
      Get the Talon FX that is differential leader. The differential leader calculates the output for the differential follower. The differential leader is also useful for fault detection, and it reports status signals for the differential controller.
      Returns:
      Differential leader Talon FX
    • getFollower

      public final MotorT getFollower()
      Get the Talon FX that is differential follower. The differential follower's position and velocity are used by the differential leader for the differential controller.
      Returns:
      Differential follower Talon FX
    • setNeutralOut

      public final StatusCode setNeutralOut()
      Request neutral output of mechanism. The applied brake type is determined by the NeutralMode configuration of each device.

      Since the NeutralMode configuration of devices may not align, users may prefer to use the setCoastOut() or setStaticBrake() method.

      Returns:
      Status Code of the request.
    • setCoastOut

      public final StatusCode setCoastOut()
      Request coast neutral output of mechanism. The bridge is disabled and the rotor is allowed to coast.
      Returns:
      Status Code of the request.
    • setStaticBrake

      public final StatusCode setStaticBrake()
      Applies full neutral-brake on the mechanism by shorting motor leads together.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(DutyCycleOut AverageRequest, PositionDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average DutyCycleOut request of the mechanism.
      DifferentialRequest - Differential PositionDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionDutyCycle request of the mechanism.
      DifferentialRequest - Differential PositionDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityDutyCYcle request of the mechanism.
      DifferentialRequest - Differential PositionDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicDutyCycle request of the mechanism.
      DifferentialRequest - Differential PositionDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoDutyCycle request of the mechanism.
      DifferentialRequest - Differential PositionDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityDutyCycle request of the mechanism.
      DifferentialRequest - Differential PositionDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(DutyCycleOut AverageRequest, VelocityDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average DutyCycleOut request of the mechanism.
      DifferentialRequest - Differential VelocityDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionDutyCycle request of the mechanism.
      DifferentialRequest - Differential VelocityDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityDutyCycle request of the mechanism.
      DifferentialRequest - Differential VelocityDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicDutyCycle request of the mechanism.
      DifferentialRequest - Differential VelocityDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoDutyCycle request of the mechanism.
      DifferentialRequest - Differential VelocityDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityDutyCycle request of the mechanism.
      DifferentialRequest - Differential VelocityDutyCycle request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(DutyCycleOut AverageRequest, DutyCycleOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average DutyCycleOut request of the mechanism.
      DifferentialRequest - Differential DutyCycleOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionDutyCycle AverageRequest, DutyCycleOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionDutyCycle request of the mechanism.
      DifferentialRequest - Differential DutyCycleOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityDutyCycle AverageRequest, DutyCycleOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityDutyCYcle request of the mechanism.
      DifferentialRequest - Differential DutyCycleOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicDutyCycle AverageRequest, DutyCycleOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicDutyCycle request of the mechanism.
      DifferentialRequest - Differential DutyCycleOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoDutyCycle AverageRequest, DutyCycleOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoDutyCycle request of the mechanism.
      DifferentialRequest - Differential DutyCycleOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityDutyCycle AverageRequest, DutyCycleOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityDutyCycle request of the mechanism.
      DifferentialRequest - Differential DutyCycleOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VoltageOut AverageRequest, PositionVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VoltageOut request of the mechanism.
      DifferentialRequest - Differential PositionVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionVoltage AverageRequest, PositionVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionVoltage request of the mechanism.
      DifferentialRequest - Differential PositionVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityVoltage AverageRequest, PositionVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityVoltage request of the mechanism.
      DifferentialRequest - Differential PositionVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVoltage AverageRequest, PositionVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVoltage request of the mechanism.
      DifferentialRequest - Differential PositionVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoVoltage AverageRequest, PositionVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoVoltage request of the mechanism.
      DifferentialRequest - Differential PositionVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityVoltage AverageRequest, PositionVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityVoltage request of the mechanism.
      DifferentialRequest - Differential PositionVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VoltageOut AverageRequest, VelocityVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VoltageOut request of the mechanism.
      DifferentialRequest - Differential VelocityVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionVoltage AverageRequest, VelocityVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionVoltage request of the mechanism.
      DifferentialRequest - Differential VelocityVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityVoltage AverageRequest, VelocityVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityVoltage request of the mechanism.
      DifferentialRequest - Differential VelocityVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVoltage AverageRequest, VelocityVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVoltage request of the mechanism.
      DifferentialRequest - Differential VelocityVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoVoltage AverageRequest, VelocityVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoVoltage request of the mechanism.
      DifferentialRequest - Differential VelocityVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityVoltage AverageRequest, VelocityVoltage DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityVoltage request of the mechanism.
      DifferentialRequest - Differential VelocityVoltage request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VoltageOut AverageRequest, VoltageOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VoltageOut request of the mechanism.
      DifferentialRequest - Differential VoltageOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionVoltage AverageRequest, VoltageOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionVoltage request of the mechanism.
      DifferentialRequest - Differential VoltageOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityVoltage AverageRequest, VoltageOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityVoltage request of the mechanism.
      DifferentialRequest - Differential VoltageOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVoltage AverageRequest, VoltageOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVoltage request of the mechanism.
      DifferentialRequest - Differential VoltageOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoVoltage AverageRequest, VoltageOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoVoltage request of the mechanism.
      DifferentialRequest - Differential VoltageOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityVoltage AverageRequest, VoltageOut DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityVoltage request of the mechanism.
      DifferentialRequest - Differential VoltageOut request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(TorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average TorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential PositionTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential PositionTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential PositionTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential PositionTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential PositionTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential PositionTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(TorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average TorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential VelocityTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential VelocityTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential VelocityTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential VelocityTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential VelocityTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential VelocityTorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(TorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average TorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential TorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(PositionTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average PositionTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential TorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(VelocityTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average VelocityTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential TorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential TorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicExpoTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicExpoTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential TorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.
    • setControl

      public final StatusCode setControl(MotionMagicVelocityTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest)
      Sets the control request for this mechanism.
      Parameters:
      AverageRequest - Average MotionMagicVelocityTorqueCurrentFOC request of the mechanism.
      DifferentialRequest - Differential TorqueCurrentFOC request of the mechanism. Note: The UpdateFreqHz parameter for this control request will be ignored by the control frame.
      Returns:
      Status Code of the request.