Package com.revrobotics.spark
Class SparkLimitSwitch
java.lang.Object
com.revrobotics.spark.SparkLimitSwitch
Get an instance of this class by using
SparkBase.getForwardLimitSwitch() or SparkBase.getReverseLimitSwitch().-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the limit switch is pressed, based on the selected polarity.
-
Method Details
-
isPressed
public boolean isPressed()Returnstrueif 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:
trueif the limit switch is pressed
-