Class QuadratureConfigs
- All Implemented Interfaces:
ParentConfiguration, Cloneable
All the configs related to the quadrature interface for the CANdi™ branded device , including encoder edges per revolution and sensor direction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe number of quadrature edges in one rotation for the quadrature sensor connected to the Talon data port.booleanDirection of the quadrature sensor to determine positive rotation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration group.final StringGet the serialized form of this configuration group.toString()final QuadratureConfigswithQuadratureEdgesPerRotation(int newQuadratureEdgesPerRotation) Modifies this configuration's QuadratureEdgesPerRotation parameter and returns itself for method-chaining and easier to use config API.final QuadratureConfigswithSensorDirection(boolean newSensorDirection) Modifies this configuration's SensorDirection parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
QuadratureEdgesPerRotation
public int QuadratureEdgesPerRotationThe number of quadrature edges in one rotation for the quadrature sensor connected to the Talon data port.This is the total number of transitions from high-to-low or low-to-high across both channels per rotation of the sensor. This is also equivalent to the Counts Per Revolution when using 4x decoding.
For example, the SRX Mag Encoder has 4096 edges per rotation, and a US Digital 1024 CPR (Cycles Per Revolution) quadrature encoder has 4096 edges per rotation.
On the Talon FXS, this can be at most 2,000,000,000 / Peak RPM.
- Minimum Value: 1
- Maximum Value: 1000000
- Default Value: 4096
- Units:
-
SensorDirection
public boolean SensorDirectionDirection of the quadrature sensor to determine positive rotation. Invert this so that forward motion on the mechanism results in an increase in quadrature position.- Default Value: False
-
-
Constructor Details
-
QuadratureConfigs
public QuadratureConfigs()
-
-
Method Details
-
withQuadratureEdgesPerRotation
Modifies this configuration's QuadratureEdgesPerRotation parameter and returns itself for method-chaining and easier to use config API.The number of quadrature edges in one rotation for the quadrature sensor connected to the Talon data port.
This is the total number of transitions from high-to-low or low-to-high across both channels per rotation of the sensor. This is also equivalent to the Counts Per Revolution when using 4x decoding.
For example, the SRX Mag Encoder has 4096 edges per rotation, and a US Digital 1024 CPR (Cycles Per Revolution) quadrature encoder has 4096 edges per rotation.
On the Talon FXS, this can be at most 2,000,000,000 / Peak RPM.
- Minimum Value: 1
- Maximum Value: 1000000
- Default Value: 4096
- Units:
- Parameters:
newQuadratureEdgesPerRotation- Parameter to modify- Returns:
- Itself
-
withSensorDirection
Modifies this configuration's SensorDirection parameter and returns itself for method-chaining and easier to use config API.Direction of the quadrature sensor to determine positive rotation. Invert this so that forward motion on the mechanism results in an increase in quadrature position.
- Default Value: False
- Parameters:
newSensorDirection- Parameter to modify- Returns:
- Itself
-
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
-