Class Diff_VelocityDutyCycle_PositionDutyCycle
java.lang.Object
com.ctre.phoenix6.controls.ControlRequest
com.ctre.phoenix6.controls.compound.Diff_VelocityDutyCycle_PositionDutyCycle
public class Diff_VelocityDutyCycle_PositionDutyCycle extends ControlRequest
Requires Phoenix Pro;
Differential control with velocity average target and position difference
target using dutycycle control.
-
Field Summary
Fields Modifier and Type Field Description VelocityDutyCycleAverageRequestAverage VelocityDutyCYcle request of the mechanism.doubleconfigTimeoutThe timeout when sending configs associated with this controlPositionDutyCycleDifferentialRequestDifferential PositionDutyCycle request of the mechanism.doubleUpdateFreqHzThe period at which this control will update at. -
Constructor Summary
Constructors Constructor Description Diff_VelocityDutyCycle_PositionDutyCycle(VelocityDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest)Requires Phoenix Pro; Differential control with velocity average target and position difference target using dutycycle control. -
Method Summary
Modifier and Type Method Description voidforceApplyConfigs()Forces configs to be applied the next time this is used in a setControl.Map<String,String>getControlInfo()Gets information about this control request.StatusCodesendRequest(String network, int deviceHash, boolean cancelOtherRequests)StringtoString()Diff_VelocityDutyCycle_PositionDutyCyclewithAverageRequest(VelocityDutyCycle newAverageRequest)Modifies this Control Request's AverageRequest parameter and returns itself for method-chaining and easier to use request API.Diff_VelocityDutyCycle_PositionDutyCyclewithDifferentialRequest(PositionDutyCycle newDifferentialRequest)Modifies this Control Request's DifferentialRequest parameter and returns itself for method-chaining and easier to use request API.Diff_VelocityDutyCycle_PositionDutyCyclewithUpdateFreqHz(double newUpdateFreqHz)Sets the period at which this control will update at.
-
Field Details
-
AverageRequest
Average VelocityDutyCYcle request of the mechanism. -
DifferentialRequest
Differential PositionDutyCycle request of the mechanism. -
UpdateFreqHz
The period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
-
configTimeout
The timeout when sending configs associated with this control
-
-
Constructor Details
-
Diff_VelocityDutyCycle_PositionDutyCycle
public Diff_VelocityDutyCycle_PositionDutyCycle(VelocityDutyCycle AverageRequest, PositionDutyCycle DifferentialRequest)Requires Phoenix Pro; Differential control with velocity average target and position difference target using dutycycle control.- Parameters:
AverageRequest- Average VelocityDutyCYcle request of the mechanism.DifferentialRequest- Differential PositionDutyCycle request of the mechanism.
-
-
Method Details
-
toString
-
sendRequest
- Specified by:
sendRequestin classControlRequest
-
getControlInfo
Gets information about this control request.- Specified by:
getControlInfoin classControlRequest- Returns:
- Map of control parameter names and corresponding applied values
-
withAverageRequest
public Diff_VelocityDutyCycle_PositionDutyCycle withAverageRequest(VelocityDutyCycle newAverageRequest)Modifies this Control Request's AverageRequest parameter and returns itself for method-chaining and easier to use request API.- Parameters:
newAverageRequest- Parameter to modify- Returns:
- Itself
-
withDifferentialRequest
public Diff_VelocityDutyCycle_PositionDutyCycle withDifferentialRequest(PositionDutyCycle newDifferentialRequest)Modifies this Control Request's DifferentialRequest parameter and returns itself for method-chaining and easier to use request API.- Parameters:
newDifferentialRequest- Parameter to modify- Returns:
- Itself
-
withUpdateFreqHz
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
newUpdateFreqHz- Parameter to modify- Returns:
- Itself
-
forceApplyConfigs
Forces configs to be applied the next time this is used in a setControl.This is not necessary in the majority of cases, because Phoenix will make sure configs are properly set when they are not already set
-