Table of Contents

Class ToFParamsConfigs

Namespace
CTRE.Phoenix6.Configs
Assembly
Phoenix6.Hardware.dll

Configs that affect the ToF sensor

Includes Update mode and frequency
public class ToFParamsConfigs : IParentConfiguration, ISerializable, ICloneable
Inheritance
ToFParamsConfigs
Implements
Inherited Members

Fields

UpdateFrequency

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 Value5
  • Maximum Value50
  • Default Value50
  • UnitsHz
public double UpdateFrequency

Field Value

double

UpdateMode

Update mode of the CANrange. The CANrange supports short-range and long-range detection at various update frequencies.

public UpdateModeValue UpdateMode

Field Value

UpdateModeValue

Methods

Clone()

Creates a copy of this config group.

public ToFParamsConfigs Clone()

Returns

ToFParamsConfigs

Deserialize(string)

Deserialize string and put values into this object

public StatusCode Deserialize(string to_deserialize)

Parameters

to_deserialize string

String to deserialize

Returns

StatusCode

OK if deserialization is OK

Serialize()

Serialize this object into a string

public string Serialize()

Returns

string

This object's data serialized into a string

ToString()

Provides the string representation of this object

public override string ToString()

Returns

string

WithUpdateFrequency(double)

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 Value5
  • Maximum Value50
  • Default Value50
  • UnitsHz
public ToFParamsConfigs WithUpdateFrequency(double newUpdateFrequency)

Parameters

newUpdateFrequency double

Parameter to modify

Returns

ToFParamsConfigs

Itself

WithUpdateMode(UpdateModeValue)

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.
public ToFParamsConfigs WithUpdateMode(UpdateModeValue newUpdateMode)

Parameters

newUpdateMode UpdateModeValue

Parameter to modify

Returns

ToFParamsConfigs

Itself