Class ModulateVBatOut
- All Implemented Interfaces:
Cloneable
Note that CANdleFeaturesConfigs.VBatOutputMode must be set to VBatOutputModeValue.Modulated.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleProportion of VBat to output in fractional units between 0.0 and 1.0.doubleThe period at which this control will update at.Fields inherited from class com.ctre.phoenix6.controls.ControlRequest
name -
Constructor Summary
ConstructorsConstructorDescriptionModulateVBatOut(double Output) Modulates the CANdle VBat output to the specified duty cycle. -
Method Summary
Modifier and TypeMethodDescriptionclone()Gets information about this control request.sendRequest(String network, int deviceHash) toString()withOutput(double newOutput) Modifies this Control Request's Output parameter and returns itself for method-chaining and easier to use request API.withUpdateFreqHz(double newUpdateFreqHz) Sets the period at which this control will update at.withUpdateFreqHz(Frequency newUpdateFreqHz) Sets the period at which this control will update at.Methods inherited from class com.ctre.phoenix6.controls.ControlRequest
getName
-
Field Details
-
Output
Proportion of VBat to output in fractional units between 0.0 and 1.0.- Units: fractional
-
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.
-
-
Constructor Details
-
ModulateVBatOut
Modulates the CANdle VBat output to the specified duty cycle. This can be used to control a single-color LED strip.Note that CANdleFeaturesConfigs.VBatOutputMode must be set to VBatOutputModeValue.Modulated.
- Parameters:
Output- Proportion of VBat to output in fractional units between 0.0 and 1.0.
-
-
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
-
withOutput
Modifies this Control Request's Output parameter and returns itself for method-chaining and easier to use request API.Proportion of VBat to output in fractional units between 0.0 and 1.0.
- Units: fractional
- Parameters:
newOutput- 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.
- Specified by:
withUpdateFreqHzin classControlRequest- Parameters:
newUpdateFreqHz- 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.
- Specified by:
withUpdateFreqHzin classControlRequest- Parameters:
newUpdateFreqHz- Parameter to modify- Returns:
- Itself
-
clone
-