Class ToFParamsConfigs
java.lang.Object
com.ctre.phoenix6.configs.ToFParamsConfigs
- All Implemented Interfaces:
ParentConfiguration, Cloneable
Configs that affect the ToF sensor
Includes Update mode and frequency
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleRate at which the CANrange will take measurements.Update mode of the CANrange. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration group.final FrequencyHelper method to get this configuration's UpdateFrequency parameter converted to a unit type.final StringGet the serialized form of this configuration group.toString()final ToFParamsConfigswithUpdateFrequency(double newUpdateFrequency) Modifies this configuration's UpdateFrequency parameter and returns itself for method-chaining and easier to use config API.final ToFParamsConfigswithUpdateFrequency(Frequency newUpdateFrequency) Modifies this configuration's UpdateFrequency parameter and returns itself for method-chaining and easier to use config API.final ToFParamsConfigswithUpdateMode(UpdateModeValue newUpdateMode) Modifies this configuration's UpdateMode parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
UpdateMode
Update mode of the CANrange. The CANrange supports short-range and long-range detection at various update frequencies.- Default Value:
UpdateModeValue.ShortRange100Hz
- Default Value:
-
UpdateFrequency
public double UpdateFrequencyRate at which the CANrange will take measurements. A lower frequency may provide more stable readings but will reduce the data rate of the sensor.- Minimum Value: 5
- Maximum Value: 50
- Default Value: 50
- Units: Hz
-
-
Constructor Details
-
ToFParamsConfigs
public ToFParamsConfigs()
-
-
Method Details
-
withUpdateMode
Modifies this configuration's UpdateMode parameter and returns itself for method-chaining and easier to use config API.Update mode of the CANrange. The CANrange supports short-range and long-range detection at various update frequencies.
- Default Value:
UpdateModeValue.ShortRange100Hz
- Parameters:
newUpdateMode- Parameter to modify- Returns:
- Itself
- Default Value:
-
withUpdateFrequency
Modifies this configuration's UpdateFrequency parameter and returns itself for method-chaining and easier to use config API.Rate at which the CANrange will take measurements. A lower frequency may provide more stable readings but will reduce the data rate of the sensor.
- Minimum Value: 5
- Maximum Value: 50
- Default Value: 50
- Units: Hz
- Parameters:
newUpdateFrequency- Parameter to modify- Returns:
- Itself
-
withUpdateFrequency
Modifies this configuration's UpdateFrequency parameter and returns itself for method-chaining and easier to use config API.Rate at which the CANrange will take measurements. A lower frequency may provide more stable readings but will reduce the data rate of the sensor.
- Minimum Value: 5
- Maximum Value: 50
- Default Value: 50
- Units: Hz
- Parameters:
newUpdateFrequency- Parameter to modify- Returns:
- Itself
-
getUpdateFrequencyMeasure
Helper method to get this configuration's UpdateFrequency parameter converted to a unit type. If not using the Java units library,UpdateFrequencycan be accessed directly instead.Rate at which the CANrange will take measurements. A lower frequency may provide more stable readings but will reduce the data rate of the sensor.
- Minimum Value: 5
- Maximum Value: 50
- Default Value: 50
- Units: Hz
- Returns:
- UpdateFrequency
-
toString
-
serialize
Get the serialized form of this configuration group.- Specified by:
serializein interfaceParentConfiguration- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration group.- Specified by:
deserializein interfaceParentConfiguration- Parameters:
to_deserialize- The serialized configuration- Returns:
- Return code of the deserialize method
-
clone
-