Class SoftwareLimitSwitchConfigs
- All Implemented Interfaces:
ParentConfiguration
,ISerializable
Includes enabling software-limit switches and the threshold at which they are tripped.
-
Field Summary
Modifier and TypeFieldDescriptionboolean
If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested.double
Position threshold for forward soft limit features.boolean
If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested.double
Position threshold for reverse soft limit features. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(String to_deserialize) Helper method to get this configuration's ForwardSoftLimitThreshold parameter converted to a unit type.Helper method to get this configuration's ReverseSoftLimitThreshold parameter converted to a unit type.toString()
withForwardSoftLimitEnable
(boolean newForwardSoftLimitEnable) Modifies this configuration's ForwardSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API.withForwardSoftLimitThreshold
(double newForwardSoftLimitThreshold) Modifies this configuration's ForwardSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.withForwardSoftLimitThreshold
(Angle newForwardSoftLimitThreshold) Modifies this configuration's ForwardSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.withReverseSoftLimitEnable
(boolean newReverseSoftLimitEnable) Modifies this configuration's ReverseSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API.withReverseSoftLimitThreshold
(double newReverseSoftLimitThreshold) Modifies this configuration's ReverseSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.withReverseSoftLimitThreshold
(Angle newReverseSoftLimitThreshold) Modifies this configuration's ReverseSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
ForwardSoftLimitEnable
If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested.- Default Value: False
-
ReverseSoftLimitEnable
If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested.- Default Value: False
-
ForwardSoftLimitThreshold
Position threshold for forward soft limit features. ForwardSoftLimitEnable must be enabled for this to take effect.- Minimum Value: -3.4e+38
- Maximum Value: 3.4e+38
- Default Value: 0
- Units: rotations
-
ReverseSoftLimitThreshold
Position threshold for reverse soft limit features. ReverseSoftLimitEnable must be enabled for this to take effect.- Minimum Value: -3.4e+38
- Maximum Value: 3.4e+38
- Default Value: 0
- Units: rotations
-
-
Constructor Details
-
SoftwareLimitSwitchConfigs
public SoftwareLimitSwitchConfigs()
-
-
Method Details
-
withForwardSoftLimitEnable
Modifies this configuration's ForwardSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API.If enabled, the motor output is set to neutral if position exceeds ForwardSoftLimitThreshold and forward output is requested.
- Default Value: False
- Parameters:
newForwardSoftLimitEnable
- Parameter to modify- Returns:
- Itself
-
withReverseSoftLimitEnable
Modifies this configuration's ReverseSoftLimitEnable parameter and returns itself for method-chaining and easier to use config API.If enabled, the motor output is set to neutral if position exceeds ReverseSoftLimitThreshold and reverse output is requested.
- Default Value: False
- Parameters:
newReverseSoftLimitEnable
- Parameter to modify- Returns:
- Itself
-
withForwardSoftLimitThreshold
public SoftwareLimitSwitchConfigs withForwardSoftLimitThreshold(double newForwardSoftLimitThreshold) Modifies this configuration's ForwardSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.Position threshold for forward soft limit features. ForwardSoftLimitEnable must be enabled for this to take effect.
- Minimum Value: -3.4e+38
- Maximum Value: 3.4e+38
- Default Value: 0
- Units: rotations
- Parameters:
newForwardSoftLimitThreshold
- Parameter to modify- Returns:
- Itself
-
withForwardSoftLimitThreshold
Modifies this configuration's ForwardSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.Position threshold for forward soft limit features. ForwardSoftLimitEnable must be enabled for this to take effect.
- Minimum Value: -3.4e+38
- Maximum Value: 3.4e+38
- Default Value: 0
- Units: rotations
- Parameters:
newForwardSoftLimitThreshold
- Parameter to modify- Returns:
- Itself
-
getForwardSoftLimitThresholdMeasure
Helper method to get this configuration's ForwardSoftLimitThreshold parameter converted to a unit type. If not using the Java units library,ForwardSoftLimitThreshold
can be accessed directly instead.Position threshold for forward soft limit features. ForwardSoftLimitEnable must be enabled for this to take effect.
- Minimum Value: -3.4e+38
- Maximum Value: 3.4e+38
- Default Value: 0
- Units: rotations
- Returns:
- ForwardSoftLimitThreshold
-
withReverseSoftLimitThreshold
public SoftwareLimitSwitchConfigs withReverseSoftLimitThreshold(double newReverseSoftLimitThreshold) Modifies this configuration's ReverseSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.Position threshold for reverse soft limit features. ReverseSoftLimitEnable must be enabled for this to take effect.
- Minimum Value: -3.4e+38
- Maximum Value: 3.4e+38
- Default Value: 0
- Units: rotations
- Parameters:
newReverseSoftLimitThreshold
- Parameter to modify- Returns:
- Itself
-
withReverseSoftLimitThreshold
Modifies this configuration's ReverseSoftLimitThreshold parameter and returns itself for method-chaining and easier to use config API.Position threshold for reverse soft limit features. ReverseSoftLimitEnable must be enabled for this to take effect.
- Minimum Value: -3.4e+38
- Maximum Value: 3.4e+38
- Default Value: 0
- Units: rotations
- Parameters:
newReverseSoftLimitThreshold
- Parameter to modify- Returns:
- Itself
-
getReverseSoftLimitThresholdMeasure
Helper method to get this configuration's ReverseSoftLimitThreshold parameter converted to a unit type. If not using the Java units library,ReverseSoftLimitThreshold
can be accessed directly instead.Position threshold for reverse soft limit features. ReverseSoftLimitEnable must be enabled for this to take effect.
- Minimum Value: -3.4e+38
- Maximum Value: 3.4e+38
- Default Value: 0
- Units: rotations
- Returns:
- ReverseSoftLimitThreshold
-
toString
-
deserialize
- Specified by:
deserialize
in interfaceParentConfiguration
-
serialize
- Specified by:
serialize
in interfaceISerializable
-