Class SparkLimitSwitch

    • Method Detail

      • 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.

        Specified by:
        isPressed in interface SparkMaxLimitSwitch
        Returns:
        true if the limit switch is pressed
      • get

        @Deprecated(forRemoval=true)
        public boolean get()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use isPressed() instead
        Returns true 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 interface CANDigitalInput
        Specified by:
        get in interface SparkMaxLimitSwitch
        Returns:
        true if the limit switch is pressed