Package com.revrobotics.servohub
Class ServoChannel
java.lang.Object
com.revrobotics.servohub.ServoChannel
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
int
boolean
setEnabled
(boolean enabled) Enables/Disables the servosetPowered
(boolean powered) Turns on/off the power to the servosetPulseWidth
(int pulseWidth_us) Sets the servo to the desired location based on the pulse width (in microseconds)
-
Field Details
-
kNumServoChannels
public static final int kNumServoChannels- See Also:
-
-
Method Details
-
getChannelId
-
getPulseWidth
public int getPulseWidth()- Returns:
- The pulse width applied to this channel in microseconds.
-
isEnabled
public boolean isEnabled()- Returns:
- true if the channel is enabled; false, otherwise
-
getCurrent
public double getCurrent()- Returns:
- The channel's output current in Amps.
-
setPulseWidth
Sets the servo to the desired location based on the pulse width (in microseconds)- Parameters:
pulseWidth_us
- The desired pulse width in microseconds
-
setEnabled
Enables/Disables the servo- Parameters:
enabled
- true = enabled, false = disabled
-
setPowered
Turns on/off the power to the servo- Parameters:
powered
- true = powered on, false = powered off
-