Class QuadratureConfigs
- All Implemented Interfaces:
ParentConfiguration
,ISerializable
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 TypeFieldDescriptionint
The number of quadrature edges in one rotation for the quadrature sensor connected to the Talon data port.boolean
Direction of the quadrature sensor to determine positive rotation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(String to_deserialize) toString()
withQuadratureEdgesPerRotation
(int newQuadratureEdgesPerRotation) Modifies this configuration's QuadratureEdgesPerRotation parameter and returns itself for method-chaining and easier to use config API.withSensorDirection
(boolean newSensorDirection) Modifies this configuration's SensorDirection parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
QuadratureEdgesPerRotation
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:
-
SensorDirection
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
-
-
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
-
deserialize
- Specified by:
deserialize
in interfaceParentConfiguration
-
serialize
- Specified by:
serialize
in interfaceISerializable
-