Class DifferentialMechanism<MotorT extends CommonTalon>
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface for device constructors.static enumPossible reasons for the mechanism to disable.static enumPossible reasons for the mechanism to require user action to resume control. -
Constructor Summary
ConstructorsConstructorDescriptionDifferentialMechanism(DifferentialMechanism.DeviceConstructor<MotorT> motorConstructor, DifferentialMotorConstants<?> constants) Creates a new differential mechanism using twoCommonTalondevices.DifferentialMechanism(DifferentialMechanism.DeviceConstructor<MotorT> motorConstructor, DifferentialMotorConstants<?> constants, CANcoder cancoder) Creates a new differential mechanism using twoCommonTalondevices and aCANcoder.DifferentialMechanism(DifferentialMechanism.DeviceConstructor<MotorT> motorConstructor, DifferentialMotorConstants<?> constants, CANdi candi, DifferentialMotorConstants.DifferentialCANdiSource candiSource) Creates a new differential mechanism using twoCommonTalondevices and aCANdi.DifferentialMechanism(DifferentialMechanism.DeviceConstructor<MotorT> motorConstructor, DifferentialMotorConstants<?> constants, Pigeon2 pigeon2, DifferentialMotorConstants.DifferentialPigeon2Source pigeonSource) Creates a new differential mechanism using twoCommonTalondevices and aPigeon2. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidIndicate to the mechanism that the user has performed the required action to resume mechanism control.final StatusCodeconfigNeutralMode(NeutralModeValue neutralMode) Configures the neutral mode to use for both motors in the mechanism.final StatusCodeconfigNeutralMode(NeutralModeValue neutralMode, double timeoutSeconds) Configures the neutral mode to use for both motors in the mechanism.final StatusSignal<Double>The difference between target average reference and current measurement.final StatusSignal<Double>getAverageClosedLoopError(boolean refresh) The difference between target average reference and current measurement.final StatusSignal<Double>Value that the average closed loop is targeting.final StatusSignal<Double>getAverageClosedLoopReference(boolean refresh) Value that the average closed loop is targeting.final StatusSignal<Double>Derivative of the target that the average closed loop is targeting.final StatusSignal<Double>getAverageClosedLoopReferenceSlope(boolean refresh) Derivative of the target that the average closed loop is targeting.final StatusSignal<Angle>Average component of the mechanism position.final StatusSignal<Angle>getAveragePosition(boolean refresh) Average component of the mechanism position.final StatusSignal<AngularVelocity>Average component of the mechanism velocity.final StatusSignal<AngularVelocity>getAverageVelocity(boolean refresh) Average component of the mechanism velocity.final StatusSignal<Double>The difference between target differential reference and current measurement.final StatusSignal<Double>getDifferentialClosedLoopError(boolean refresh) The difference between target differential reference and current measurement.final StatusSignal<Double>Value that the differential closed loop is targeting.final StatusSignal<Double>getDifferentialClosedLoopReference(boolean refresh) Value that the differential closed loop is targeting.final StatusSignal<Double>Derivative of the target that the differential closed loop is targeting.final StatusSignal<Double>getDifferentialClosedLoopReferenceSlope(boolean refresh) Derivative of the target that the differential closed loop is targeting.final StatusSignal<Angle>Differential component of the mechanism position.final StatusSignal<Angle>getDifferentialPosition(boolean refresh) Differential component of the mechanism position.final StatusSignal<AngularVelocity>Differential component of the mechanism velocity.final StatusSignal<AngularVelocity>getDifferentialVelocity(boolean refresh) Differential component of the mechanism velocity.final MotorTGet the Talon FX that is differential follower.final MotorTGet the Talon FX that is differential leader.final MechanismStateGets the state of the mechanism.final booleanGet whether the mechanism is currently disabled due to an issue.final voidperiodic()Call this method periodically to automatically protect against dangerous fault conditions and keepgetMechanismState()updated.final booleanGet whether the mechanism is currently disabled and requires user action to re-enable mechanism control.final StatusCodeRequest coast neutral output of mechanism.final StatusCodesetControl(DutyCycleOut AverageRequest, DutyCycleOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(DutyCycleOut AverageRequest, PositionDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(DutyCycleOut AverageRequest, VelocityDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicDutyCycle AverageRequest, DutyCycleOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoDutyCycle AverageRequest, DutyCycleOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoVoltage AverageRequest, PositionVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoVoltage AverageRequest, VelocityVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicExpoVoltage AverageRequest, VoltageOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityDutyCycle AverageRequest, DutyCycleOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityVoltage AverageRequest, PositionVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityVoltage AverageRequest, VelocityVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVelocityVoltage AverageRequest, VoltageOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVoltage AverageRequest, PositionVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVoltage AverageRequest, VelocityVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(MotionMagicVoltage AverageRequest, VoltageOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionDutyCycle AverageRequest, DutyCycleOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionVoltage AverageRequest, PositionVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionVoltage AverageRequest, VelocityVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(PositionVoltage AverageRequest, VoltageOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(TorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(TorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(TorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityDutyCycle AverageRequest, DutyCycleOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityDutyCycle AverageRequest, VelocityDutyCycle DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityTorqueCurrentFOC AverageRequest, PositionTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityTorqueCurrentFOC AverageRequest, TorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityTorqueCurrentFOC AverageRequest, VelocityTorqueCurrentFOC DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityVoltage AverageRequest, PositionVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityVoltage AverageRequest, VelocityVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VelocityVoltage AverageRequest, VoltageOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VoltageOut AverageRequest, PositionVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VoltageOut AverageRequest, VelocityVoltage DifferentialRequest) Sets the control request for this mechanism.final StatusCodesetControl(VoltageOut AverageRequest, VoltageOut DifferentialRequest) Sets the control request for this mechanism.final StatusCodeRequest neutral output of mechanism.final StatusCodesetPosition(double avgPosition) Sets the position of the mechanism in rotations, assuming a differential position of 0 rotations.final StatusCodesetPosition(double avgPosition, double diffPosition) Sets the position of the mechanism in rotations.final StatusCodesetPosition(double avgPosition, double diffPosition, double timeoutSeconds) Sets the position of the mechanism in rotations.final StatusCodesetPosition(Angle avgPosition) Sets the position of the mechanism, assuming a differential position of 0 rotations.final StatusCodesetPosition(Angle avgPosition, Angle diffPosition) Sets the position of the mechanism.final StatusCodesetPosition(Angle avgPosition, Angle diffPosition, double timeoutSeconds) Sets the position of the mechanism.final StatusCodeApplies full neutral-brake on the mechanism by shorting motor leads together.
-
Constructor Details
-
DifferentialMechanism
public DifferentialMechanism(DifferentialMechanism.DeviceConstructor<MotorT> motorConstructor, DifferentialMotorConstants<?> constants) Creates a new differential mechanism using twoCommonTalondevices. 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
SimpleDifferentialMechanisminstead with limited functionality.- Parameters:
motorConstructor- Constructor for the motors, such asTalonFX::newconstants- Constants used to construct the mechanism
-
DifferentialMechanism
public DifferentialMechanism(DifferentialMechanism.DeviceConstructor<MotorT> motorConstructor, DifferentialMotorConstants<?> constants, Pigeon2 pigeon2, DifferentialMotorConstants.DifferentialPigeon2Source pigeonSource) Creates a new differential mechanism using twoCommonTalondevices and aPigeon2. 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
SimpleDifferentialMechanisminstead with limited functionality.- Parameters:
motorConstructor- Constructor for the motors, such asTalonFX::newconstants- Constants used to construct the mechanismpigeon2- The Pigeon 2 to use for the differential axispigeonSource- The sensor source to use for the Pigeon 2 (Yaw, Pitch, or Roll)
-
DifferentialMechanism
public DifferentialMechanism(DifferentialMechanism.DeviceConstructor<MotorT> motorConstructor, DifferentialMotorConstants<?> constants, CANcoder cancoder) Creates a new differential mechanism using twoCommonTalondevices and aCANcoder. 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
SimpleDifferentialMechanisminstead with limited functionality.- Parameters:
motorConstructor- Constructor for the motors, such asTalonFX::newconstants- Constants used to construct the mechanismcancoder- The CANcoder to use for the differential axis
-
DifferentialMechanism
public DifferentialMechanism(DifferentialMechanism.DeviceConstructor<MotorT> motorConstructor, DifferentialMotorConstants<?> constants, CANdi candi, DifferentialMotorConstants.DifferentialCANdiSource candiSource) Creates a new differential mechanism using twoCommonTalondevices and aCANdi. 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
SimpleDifferentialMechanisminstead with limited functionality.- Parameters:
motorConstructor- Constructor for the motors, such asTalonFX::newconstants- Constants used to construct the mechanismcandi- The CTR Electronics' CANdiâ„¢ branded device to use for the differential axiscandiSource- The sensor source to use for the CTR Electronics' CANdiâ„¢ branded device
-
-
Method Details
-
configNeutralMode
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
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 disabledtimeoutSeconds- 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
Call this method periodically to automatically protect against dangerous fault conditions and keepgetMechanismState()updated. -
isDisabled
Get whether the mechanism is currently disabled due to an issue.- Returns:
- true if the mechanism is temporarily disabled
-
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
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
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
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
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
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
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
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
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
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
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
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
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 rotationsdiffPosition- The differential position of the mechanism, in rotations- Returns:
- StatusCode of the set command
-
setPosition
Sets the position of the mechanism in rotations.- Parameters:
avgPosition- The average position of the mechanism, in rotationsdiffPosition- The differential position of the mechanism, in rotationstimeoutSeconds- Maximum time to wait up to in seconds- Returns:
- StatusCode of the set command
-
setPosition
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
Sets the position of the mechanism.This will wait up to 0.100 seconds (100ms) by default.
- Parameters:
avgPosition- The average position of the mechanismdiffPosition- The differential position of the mechanism- Returns:
- StatusCode of the set command
-
setPosition
Sets the position of the mechanism.- Parameters:
avgPosition- The average position of the mechanismdiffPosition- The differential position of the mechanismtimeoutSeconds- Maximum time to wait up to in seconds- Returns:
- StatusCode of the set command
-
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
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
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()orsetStaticBrake()method.- Returns:
- Status Code of the request.
-
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
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
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
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
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
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
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
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.
-