Package com.revrobotics.encoder.config
Class DetachedSignalsConfig
java.lang.Object
com.revrobotics.config.BaseConfig
com.revrobotics.encoder.config.DetachedSignalsConfig
-
Nested Class Summary
Nested classes/interfaces inherited from class com.revrobotics.config.BaseConfig
BaseConfig.CANType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(DetachedSignalsConfig config) Applies settings from anotherDetachedSignalsConfigto this one.encoderAnglePeriodMs(int periodMs) Set the period (ms) of the status frame that provides the signal returned byDetachedEncoder.getAngle().encoderPositionPeriodMs(int periodMs) Set the period (ms) of the status frame that provides the signal returned byDetachedEncoder.getPosition().encoderVelocityPeriodMs(int periodMs) Set the period (ms) of the status frame that provides the signal returned byDetachedEncoder.getVelocity().Methods inherited from class com.revrobotics.config.BaseConfig
apply, flatten, getParameter, getParameter, putParameter, putParameter, putParameter, removeParameter, removeParameter
-
Constructor Details
-
DetachedSignalsConfig
public DetachedSignalsConfig()Create a new object to configure Signals.
-
-
Method Details
-
apply
Applies settings from anotherDetachedSignalsConfigto this one.Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.
- Parameters:
config- TheDetachedSignalsConfigto copy settings from- Returns:
- The updated
DetachedSignalsConfigfor method chaining
-
encoderPositionPeriodMs
Set the period (ms) of the status frame that provides the signal returned byDetachedEncoder.getPosition(). The default period is 50ms.If multiple periods are set for signals within the same status frame, the minimum given value will be used.
- Parameters:
periodMs- The period in milliseconds- Returns:
- The modified
DetachedSignalsConfigobject for method chaining
-
encoderVelocityPeriodMs
Set the period (ms) of the status frame that provides the signal returned byDetachedEncoder.getVelocity(). The default period is 50ms.If multiple periods are set for signals within the same status frame, the minimum given value will be used.
- Parameters:
periodMs- The period in milliseconds- Returns:
- The modified
DetachedSignalsConfigobject for method chaining
-
encoderAnglePeriodMs
Set the period (ms) of the status frame that provides the signal returned byDetachedEncoder.getAngle(). The default period is 50ms.If multiple periods are set for signals within the same status frame, the minimum given value will be used.
- Parameters:
periodMs- The period in milliseconds- Returns:
- The modified
DetachedSignalsConfigobject for method chaining
-