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 TypeMethodDescriptionboolean
Returnstrue
if the limit switch is pressed, based on the selected polarity.
-
Method Details
-
isPressed
public boolean isPressed()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
-