Package com.revrobotics
Interface SparkMaxLimitSwitch
-
- All Superinterfaces:
CANDigitalInput
- All Known Implementing Classes:
SparkLimitSwitch
@Deprecated(forRemoval=true) public interface SparkMaxLimitSwitch extends CANDigitalInput
Deprecated, for removal: This API element is subject to removal in a future version.UseSparkLimitSwitch
insteadGet an instance of this class by usingCANSparkBase.getForwardLimitSwitch(Type)
orCANSparkBase.getReverseLimitSwitch(Type)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SparkMaxLimitSwitch.Direction
Deprecated, for removal: This API element is subject to removal in a future version.static class
SparkMaxLimitSwitch.Type
Deprecated, for removal: This API element is subject to removal in a future version.UseSparkLimitSwitch.Type
instead-
Nested classes/interfaces inherited from interface com.revrobotics.CANDigitalInput
CANDigitalInput.LimitSwitchPolarity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description REVLibError
enableLimitSwitch(boolean enable)
Deprecated, for removal: This API element is subject to removal in a future version.Enables or disables controller shutdown based on the limit switch.boolean
get()
Deprecated, for removal: This API element is subject to removal in a future version.UseisPressed()
insteadboolean
isLimitSwitchEnabled()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isPressed()
Deprecated, for removal: This API element is subject to removal in a future version.Returnstrue
if the limit switch is pressed, based on the selected polarity.
-
-
-
Method Detail
-
isPressed
boolean isPressed()
Deprecated, for removal: This API element is subject to removal in a future version.Returnstrue
if the limit switch is pressed, based on the selected polarity.This method works even if the limit switch is not enabled for controller shutdown.
- Returns:
true
if the limit switch is pressed
-
get
@Deprecated(forRemoval=true) boolean get()
Deprecated, for removal: This API element is subject to removal in a future version.UseisPressed()
insteadReturnstrue
if the limit switch is pressed, based on the selected polarity.This method works even if the limit switch is not enabled.
- Specified by:
get
in interfaceCANDigitalInput
- Returns:
true
if the limit switch is pressed
-
enableLimitSwitch
REVLibError enableLimitSwitch(boolean enable)
Deprecated, for removal: This API element is subject to removal in a future version.Enables or disables controller shutdown based on the limit switch.- Specified by:
enableLimitSwitch
in interfaceCANDigitalInput
- Parameters:
enable
- Enable/disable motor shutdown based on the limit switch state. This does not affect the result of the get() command.- Returns:
REVLibError.kOk
if successful
-
isLimitSwitchEnabled
boolean isLimitSwitchEnabled()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isLimitSwitchEnabled
in interfaceCANDigitalInput
- Returns:
true
if the limit switch is enabled
-
-