Package com.revrobotics.servohub.config
Class ServoChannelConfig
java.lang.Object
com.revrobotics.config.BaseConfig
com.revrobotics.servohub.config.ServoChannelConfig
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classNested classes/interfaces inherited from class com.revrobotics.config.BaseConfig
BaseConfig.CANType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ServoChannelConfig config) Applies settings from anotherServoChannelConfigto this one.Set the output power behavior when the channel is disabled.pulseRange(int minPulse_us, int centerPulse_us, int maxPulse_us) Set the min/center/max pulse widths on this channel.pulseRange(ServoChannelConfig.PulseRange pulseRange_us) Set the min/center/max pulse widths on this channel.Methods inherited from class com.revrobotics.config.BaseConfig
apply, flatten, getParameter, getParameter, putParameter, putParameter, putParameter, removeParameter, removeParameter
-
Constructor Details
-
ServoChannelConfig
-
-
Method Details
-
apply
Applies settings from anotherServoChannelConfigto this one.Settings in the provided config will overwrite existing values in this
- Parameters:
config- TheServoChannelConfigto apply settings from- Returns:
- The updated
ServoChannelConfigfor method chaining
-
pulseRange
Set the min/center/max pulse widths on this channel.- Parameters:
minPulse_us- The minimum pulse width (in us)centerPulse_us- The center pulse width (in us)maxPulse_us- The maximum pulse width (in us)- Returns:
- The modified
ServoChannelConfigobject for method chaining
-
pulseRange
Set the min/center/max pulse widths on this channel.- Parameters:
pulseRange_us- The minimum/center/max pulse widths (in microseconds)- Returns:
- The modified ServoChannelConfig object for method chaining
-
disableBehavior
Set the output power behavior when the channel is disabled.When the channel is enabled [ServoChannel.setEnabled(true)], the output power to the servo follows the channel's power setting [ServoChannel.setPowered()].
When the channel is disabled [ServoChannel.setEnabled(false)], the output power to the servo follows the channel's disableBehavior.
- Parameters:
behavior- The disable behavior as described above.- Returns:
- The modified
ServoChannelConfigobject for method chaining
-