Interface SparkMaxLimitSwitch

    • Method Detail

      • isPressed

        boolean isPressed()
        Deprecated, for removal: This API element is subject to removal in a future version.
        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
      • get

        @Deprecated(forRemoval=true)
        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
        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 interface CANDigitalInput
        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 interface CANDigitalInput
        Returns:
        true if the limit switch is enabled