Class SparkLimitSwitch

java.lang.Object
com.revrobotics.spark.SparkLimitSwitch

public class SparkLimitSwitch extends Object
Get an instance of this class by using SparkBase.getForwardLimitSwitch() or SparkBase.getReverseLimitSwitch().
  • Method Details

    • isPressed

      public boolean isPressed()
      Returns true 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