Package com.revrobotics
Interface CANDigitalInput
- All Known Implementing Classes:
SparkMaxLimitSwitch
Deprecated, for removal: This API element is subject to removal in a future version.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDeprecated, for removal: This API element is subject to removal in a future version.UseSparkMaxLimitSwitch.Typeinstead. -
Method Summary
Modifier and TypeMethodDescriptionenableLimitSwitch(boolean enable) Deprecated, for removal: This API element is subject to removal in a future version.Enables or disables controller shutdown based on limit switch.booleanget()Deprecated, for removal: This API element is subject to removal in a future version.Returnstrueif the limit switch is pressed, based on the selected polarity.booleanDeprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
get
boolean get()Deprecated, for removal: This API element is subject to removal in a future version.Returnstrueif the limit switch is pressed, based on the selected polarity.This method works even if the limit switch is not enabled.
- Returns:
trueif the limit switch is pressed
-
enableLimitSwitch
Deprecated, for removal: This API element is subject to removal in a future version.Enables or disables controller shutdown based on limit switch.- Parameters:
enable- Enable/disable motor shutdown based on limit switch state. This does not affect the result of the get() command.- Returns:
REVLibError.kOkif successful
-
isLimitSwitchEnabled
boolean isLimitSwitchEnabled()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
trueif limit switch is enabled
-
SparkMaxLimitSwitchinstead.