Interface ChickenController

  • All Superinterfaces:
    com.ctre.phoenix.motorcontrol.IFollower, com.ctre.phoenix.signals.IInvertable, com.ctre.phoenix.motorcontrol.IMotorController, com.ctre.phoenix.signals.IOutputSignal
    All Known Implementing Classes:
    ChickenTalon, ChickenVictor

    public interface ChickenController
    extends com.ctre.phoenix.motorcontrol.IMotorController
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      com.ctre.phoenix.ErrorCode clearMotionProfileHasUnderrun()  
      com.ctre.phoenix.ErrorCode clearStickyFaults()  
      com.ctre.phoenix.ErrorCode config_IntegralZone​(int slotIdx, int izone)
      Sets the Integral Zone constant in the given parameter slot.
      com.ctre.phoenix.ErrorCode config_kD​(int slotIdx, double value)
      Sets the 'D' constant in the given parameter slot.
      com.ctre.phoenix.ErrorCode config_kF​(int slotIdx, double value)
      Sets the 'F' constant in the given parameter slot.
      com.ctre.phoenix.ErrorCode config_kI​(int slotIdx, double value)
      Sets the 'I' constant in the given parameter slot.
      com.ctre.phoenix.ErrorCode config_kP​(int slotIdx, double value)
      Sets the 'P' constant in the given parameter slot.
      com.ctre.phoenix.ErrorCode configAllowableClosedloopError​(int slotIdx, int allowableClosedLoopError)
      Sets the allowable closed-loop error in the given parameter slot.
      com.ctre.phoenix.ErrorCode configClosedloopRamp​(double secondsFromNeutralToFull)
      Configures the closed-loop ramp rate of throttle output.
      com.ctre.phoenix.ErrorCode configForwardLimitSwitchSource​(com.ctre.phoenix.motorcontrol.LimitSwitchSource type, com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose)  
      com.ctre.phoenix.ErrorCode configForwardLimitSwitchSource​(com.ctre.phoenix.motorcontrol.RemoteLimitSwitchSource type, com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose, int deviceID)
      Configures the forward limit switch for a remote source.
      com.ctre.phoenix.ErrorCode configForwardSoftLimitEnable​(boolean enable)
      Configures the forward soft limit enable.
      com.ctre.phoenix.ErrorCode configForwardSoftLimitThreshold​(int forwardSensorLimit)
      Configures the forward soft limit threhold.
      int configGetCustomParam​(int paramIndex)
      Gets the value of a custom parameter.
      double configGetParameter​(int param, int ordinal)
      Gets a parameter.
      double configGetParameter​(com.ctre.phoenix.ParamEnum param, int ordinal)
      Gets a parameter.
      com.ctre.phoenix.ErrorCode configMaxIntegralAccumulator​(int slotIdx, double iaccum)
      Sets the maximum integral accumulator in the given parameter slot.
      com.ctre.phoenix.ErrorCode configMotionAcceleration​(int sensorUnitsPer100msPerSec)
      Sets the Motion Magic Acceleration.
      com.ctre.phoenix.ErrorCode configMotionCruiseVelocity​(int sensorUnitsPer100ms)
      Sets the Motion Magic Cruise Velocity.
      com.ctre.phoenix.ErrorCode configNeutralDeadband​(double percentDeadband)
      Configures the output deadband percentage.
      com.ctre.phoenix.ErrorCode configNominalOutputForward​(double percentOut)
      Configures the forward nominal output percentage.
      com.ctre.phoenix.ErrorCode configNominalOutputReverse​(double percentOut)
      Configures the reverse nominal output percentage.
      com.ctre.phoenix.ErrorCode configOpenloopRamp​(double secondsFromNeutralToFull)
      Configures the open-loop ramp rate of throttle output.
      com.ctre.phoenix.ErrorCode configPeakOutputForward​(double percentOut)
      Configures the forward peak output percentage.
      com.ctre.phoenix.ErrorCode configPeakOutputReverse​(double percentOut)
      Configures the reverse peak output percentage.
      com.ctre.phoenix.ErrorCode configRemoteFeedbackFilter​(int deviceID, com.ctre.phoenix.motorcontrol.RemoteSensorSource remoteSensorSource, int remoteOrdinal)  
      com.ctre.phoenix.ErrorCode configReverseLimitSwitchSource​(com.ctre.phoenix.motorcontrol.RemoteLimitSwitchSource type, com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose, int deviceID)
      Configures the reverse limit switch for a remote source.
      com.ctre.phoenix.ErrorCode configReverseSoftLimitEnable​(boolean enable)
      Configures the reverse soft limit enable.
      com.ctre.phoenix.ErrorCode configReverseSoftLimitThreshold​(int reverseSensorLimit)
      Configures the reverse soft limit threshold.
      com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.FeedbackDevice feedbackDevice)
      Select the feedback device for the motor controller.
      com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.FeedbackDevice feedbackDevice, int pidIdx)
      Select the feedback device for the motor controller.
      com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.RemoteFeedbackDevice feedbackDevice)
      Select the remote feedback device for the motor controller.
      com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.RemoteFeedbackDevice feedbackDevice, int pidIdx)
      Select the remote feedback device for the motor controller.
      com.ctre.phoenix.ErrorCode configSensorTerm​(com.ctre.phoenix.motorcontrol.SensorTerm sensorTerm, com.ctre.phoenix.motorcontrol.FeedbackDevice feedbackDevice)  
      com.ctre.phoenix.ErrorCode configSetCustomParam​(int newValue, int paramIndex)
      Sets the value of a custom parameter.
      com.ctre.phoenix.ErrorCode configSetParameter​(int param, double value, int subValue, int ordinal)
      Sets a parameter.
      com.ctre.phoenix.ErrorCode configSetParameter​(com.ctre.phoenix.ParamEnum param, double value, int subValue, int ordinal)
      Sets a parameter.
      com.ctre.phoenix.ErrorCode configVelocityMeasurementPeriod​(int period)
      Sets the period over which velocity measurements are taken.
      com.ctre.phoenix.ErrorCode configVelocityMeasurementWindow​(int windowSize)  
      com.ctre.phoenix.ErrorCode configVoltageCompSaturation​(double voltage)
      Configures the Voltage Compensation saturation voltage.
      com.ctre.phoenix.ErrorCode configVoltageMeasurementFilter​(int filterWindowSamples)
      Configures the voltage measurement filter.
      int getClosedLoopError()
      Gets the closed-loop error.
      com.ctre.phoenix.motorcontrol.ControlMode getControlMode()
      Note that this does not return the currently set control mode in the talon wrapper and may be different than the control mode set using setControlMode(ControlMode).
      int getDefaultPidIdx()  
      int getDefaultTimeoutMs()  
      double getEncoderCodesPerRev()
      Deprecated.
      This no longer has any effect as natural units functionality has been removed.
      double getErrorDerivative()
      Gets the derivative of the closed-loop error.
      double getIntegralAccumulator()
      Gets the iaccum value.
      double getPeakOutputForward()
      Gets the forward peak output percentage.
      double getPeakOutputReverse()
      Gets the reverse peak output percentage.
      int getSelectedSensorPosition()
      Get the selected sensor position.
      int getSelectedSensorVelocity()
      Get the selected sensor velocity.
      int getStatusFramePeriod​(int frame)
      Gets the period of the given status frame.
      int getStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrame frame)
      Gets the period of the given status frame.
      int getStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrameEnhanced frame)  
      void selectProfileSlot​(int slotIdx)
      Selects which profile slot to use for closed-loop control.
      void set​(double outputValue)
      Sets the appropriate output on the talon, depending on the mode.
      void setBrake​(boolean brake)
      Sets the mode of operation during neutral throttle output.
      void setControlMode​(com.ctre.phoenix.motorcontrol.ControlMode controlMode)  
      void setDefaultPidIdx​(int defaultPidIdx)  
      void setDefaultTimeoutMs​(int defaultTimeoutMs)  
      void setEncoderCodesPerRev​(double encoderCodesPerRev)
      Deprecated.
      This no longer has any effect as natural units functionality has been removed.
      com.ctre.phoenix.ErrorCode setIntegralAccumulator​(double iaccum)
      Sets the integral accumulator.
      com.ctre.phoenix.ErrorCode setIntegralAccumulator​(double iaccum, int pidIdx)
      Sets the integral accumulator.
      com.ctre.phoenix.ErrorCode setSelectedSensorPosition​(int sensorPos)
      Sets the sensor position to the given value.
      com.ctre.phoenix.ErrorCode setSelectedSensorPosition​(int sensorPos, int pidIdx)
      Sets the sensor position to the given value.
      com.ctre.phoenix.ErrorCode setStatusFramePeriod​(int frameValue, int periodMs)
      Sets the period of the given status frame.
      com.ctre.phoenix.ErrorCode setStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrame frame, int periodMs)
      Sets the period of the given status frame.
      • Methods inherited from interface com.ctre.phoenix.motorcontrol.IFollower

        follow, valueUpdated
      • Methods inherited from interface com.ctre.phoenix.motorcontrol.IMotorController

        changeMotionControlFramePeriod, clearMotionProfileHasUnderrun, clearMotionProfileTrajectories, clearStickyFaults, config_IntegralZone, config_kD, config_kF, config_kI, config_kP, configAllowableClosedloopError, configAuxPIDPolarity, configClosedLoopPeakOutput, configClosedLoopPeriod, configClosedloopRamp, configForwardLimitSwitchSource, configForwardSoftLimitEnable, configForwardSoftLimitThreshold, configGetCustomParam, configGetParameter, configGetParameter, configMaxIntegralAccumulator, configMotionAcceleration, configMotionCruiseVelocity, configMotionProfileTrajectoryPeriod, configMotionSCurveStrength, configNeutralDeadband, configNominalOutputForward, configNominalOutputReverse, configOpenloopRamp, configPeakOutputForward, configPeakOutputReverse, configRemoteFeedbackFilter, configReverseLimitSwitchSource, configReverseSoftLimitEnable, configReverseSoftLimitThreshold, configSelectedFeedbackCoefficient, configSelectedFeedbackSensor, configSensorTerm, configSetCustomParam, configSetParameter, configSetParameter, configVoltageCompSaturation, configVoltageMeasurementFilter, enableVoltageCompensation, getActiveTrajectoryHeading, getActiveTrajectoryPosition, getActiveTrajectoryVelocity, getBaseID, getBusVoltage, getClosedLoopError, getClosedLoopTarget, getDeviceID, getErrorDerivative, getFaults, getFirmwareVersion, getIntegralAccumulator, getInverted, getLastError, getMotionProfileStatus, getMotionProfileTopLevelBufferCount, getMotorOutputPercent, getMotorOutputVoltage, getSelectedSensorPosition, getSelectedSensorVelocity, getStatusFramePeriod, getStickyFaults, getTemperature, hasResetOccurred, isMotionProfileTopLevelBufferFull, neutralOutput, overrideLimitSwitchesEnable, overrideSoftLimitsEnable, processMotionProfileBuffer, pushMotionProfileTrajectory, selectProfileSlot, set, set, set, setControlFramePeriod, setIntegralAccumulator, setInverted, setNeutralMode, setSelectedSensorPosition, setSensorPhase, setStatusFramePeriod
    • Method Detail

      • clearMotionProfileHasUnderrun

        com.ctre.phoenix.ErrorCode clearMotionProfileHasUnderrun()
      • clearStickyFaults

        com.ctre.phoenix.ErrorCode clearStickyFaults()
      • configAllowableClosedloopError

        com.ctre.phoenix.ErrorCode configAllowableClosedloopError​(int slotIdx,
                                                                  int allowableClosedLoopError)
        Sets the allowable closed-loop error in the given parameter slot.
        Parameters:
        slotIdx - Parameter slot for the constant.
        allowableClosedLoopError - Value of the allowable closed-loop error.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configClosedloopRamp

        com.ctre.phoenix.ErrorCode configClosedloopRamp​(double secondsFromNeutralToFull)
        Configures the closed-loop ramp rate of throttle output.
        Parameters:
        secondsFromNeutralToFull - Minimum desired time to go from neutral to full throttle. A value of '0' will disable the ramp.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configForwardLimitSwitchSource

        com.ctre.phoenix.ErrorCode configForwardLimitSwitchSource​(com.ctre.phoenix.motorcontrol.LimitSwitchSource type,
                                                                  com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose)
      • configForwardLimitSwitchSource

        com.ctre.phoenix.ErrorCode configForwardLimitSwitchSource​(com.ctre.phoenix.motorcontrol.RemoteLimitSwitchSource type,
                                                                  com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose,
                                                                  int deviceID)
        Configures the forward limit switch for a remote source.
        Parameters:
        type - Remote limit switch source. @see #LimitSwitchSource
        normalOpenOrClose - Setting for normally open or normally closed.
        deviceID - Device ID of remote source.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configForwardSoftLimitEnable

        com.ctre.phoenix.ErrorCode configForwardSoftLimitEnable​(boolean enable)
        Configures the forward soft limit enable.
        Parameters:
        enable - Forward Sensor Position Limit Enable.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configForwardSoftLimitThreshold

        com.ctre.phoenix.ErrorCode configForwardSoftLimitThreshold​(int forwardSensorLimit)
        Configures the forward soft limit threhold.
        Parameters:
        forwardSensorLimit - Forward Sensor Position Limit (in Raw Sensor Units).
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configGetCustomParam

        int configGetCustomParam​(int paramIndex)
        Gets the value of a custom parameter.
        Parameters:
        paramIndex - Index of custom parameter.
        Returns:
        Value of the custom param.
      • configGetParameter

        double configGetParameter​(com.ctre.phoenix.ParamEnum param,
                                  int ordinal)
        Gets a parameter.
        Parameters:
        param - Parameter enumeration.
        ordinal - Ordinal of parameter.
        Returns:
        Value of parameter.
      • configGetParameter

        double configGetParameter​(int param,
                                  int ordinal)
        Gets a parameter.
        Parameters:
        param - Parameter enumeration.
        ordinal - Ordinal of parameter.
        Returns:
        Value of parameter.
      • configMaxIntegralAccumulator

        com.ctre.phoenix.ErrorCode configMaxIntegralAccumulator​(int slotIdx,
                                                                double iaccum)
        Sets the maximum integral accumulator in the given parameter slot.
        Parameters:
        slotIdx - Parameter slot for the constant.
        iaccum - Value of the maximum integral accumulator.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configMotionAcceleration

        com.ctre.phoenix.ErrorCode configMotionAcceleration​(int sensorUnitsPer100msPerSec)
        Sets the Motion Magic Acceleration.
        Parameters:
        sensorUnitsPer100msPerSec - Motion Magic Acceleration (in Raw Sensor Units per 100 ms per second).
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configMotionCruiseVelocity

        com.ctre.phoenix.ErrorCode configMotionCruiseVelocity​(int sensorUnitsPer100ms)
        Sets the Motion Magic Cruise Velocity.
        Parameters:
        sensorUnitsPer100ms - Motion Magic Cruise Velocity (in Raw Sensor Units per 100 ms).
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configNeutralDeadband

        com.ctre.phoenix.ErrorCode configNeutralDeadband​(double percentDeadband)
        Configures the output deadband percentage.
        Parameters:
        percentDeadband - Desired deadband percentage. Minimum is 0.1%, Maximum is 25%. Pass 0.04 for 4%.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configNominalOutputForward

        com.ctre.phoenix.ErrorCode configNominalOutputForward​(double percentOut)
        Configures the forward nominal output percentage.
        Parameters:
        percentOut - Nominal (minimum) percent output.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configNominalOutputReverse

        com.ctre.phoenix.ErrorCode configNominalOutputReverse​(double percentOut)
        Configures the reverse nominal output percentage.
        Parameters:
        percentOut - Nominal (minimum) percent output.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configOpenloopRamp

        com.ctre.phoenix.ErrorCode configOpenloopRamp​(double secondsFromNeutralToFull)
        Configures the open-loop ramp rate of throttle output.
        Parameters:
        secondsFromNeutralToFull - Minimum desired time to go from neutral to full throttle. A value of '0' will disable the ramp.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configPeakOutputForward

        com.ctre.phoenix.ErrorCode configPeakOutputForward​(double percentOut)
        Configures the forward peak output percentage.
        Parameters:
        percentOut - Desired peak output percentage.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configPeakOutputReverse

        com.ctre.phoenix.ErrorCode configPeakOutputReverse​(double percentOut)
        Configures the reverse peak output percentage.
        Parameters:
        percentOut - Desired peak output percentage.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • getPeakOutputForward

        double getPeakOutputForward()
        Gets the forward peak output percentage.
        Returns:
        Double from -1 to 1 inclusive.
      • getPeakOutputReverse

        double getPeakOutputReverse()
        Gets the reverse peak output percentage.
        Returns:
        Double from -1 to 1 inclusive.
      • configRemoteFeedbackFilter

        com.ctre.phoenix.ErrorCode configRemoteFeedbackFilter​(int deviceID,
                                                              com.ctre.phoenix.motorcontrol.RemoteSensorSource remoteSensorSource,
                                                              int remoteOrdinal)
      • configReverseLimitSwitchSource

        com.ctre.phoenix.ErrorCode configReverseLimitSwitchSource​(com.ctre.phoenix.motorcontrol.RemoteLimitSwitchSource type,
                                                                  com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose,
                                                                  int deviceID)
        Configures the reverse limit switch for a remote source.
        Parameters:
        type - Remote limit switch source. @see #LimitSwitchSource
        normalOpenOrClose - Setting for normally open or normally closed.
        deviceID - Device ID of remote source.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configReverseSoftLimitEnable

        com.ctre.phoenix.ErrorCode configReverseSoftLimitEnable​(boolean enable)
        Configures the reverse soft limit enable.
        Parameters:
        enable - Reverse Sensor Position Limit Enable.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configReverseSoftLimitThreshold

        com.ctre.phoenix.ErrorCode configReverseSoftLimitThreshold​(int reverseSensorLimit)
        Configures the reverse soft limit threshold.
        Parameters:
        reverseSensorLimit - Reverse Sensor Position Limit (in Raw Sensor Units).
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configSelectedFeedbackSensor

        com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.RemoteFeedbackDevice feedbackDevice,
                                                                int pidIdx)
        Select the remote feedback device for the motor controller.
        Parameters:
        feedbackDevice - Remote Feedback Device to select.
        pidIdx - 0 for Primary closed-loop. 1 for cascaded closed-loop.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configSelectedFeedbackSensor

        com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.RemoteFeedbackDevice feedbackDevice)
        Select the remote feedback device for the motor controller.
        Parameters:
        feedbackDevice - Remote Feedback Device to select.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configSelectedFeedbackSensor

        com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.FeedbackDevice feedbackDevice,
                                                                int pidIdx)
        Select the feedback device for the motor controller.
        Parameters:
        feedbackDevice - Feedback Device to select.
        pidIdx - The PID IDX to use.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configSelectedFeedbackSensor

        com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.FeedbackDevice feedbackDevice)
        Select the feedback device for the motor controller.
        Parameters:
        feedbackDevice - Feedback Device to select.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configSensorTerm

        com.ctre.phoenix.ErrorCode configSensorTerm​(com.ctre.phoenix.motorcontrol.SensorTerm sensorTerm,
                                                    com.ctre.phoenix.motorcontrol.FeedbackDevice feedbackDevice)
      • configSetCustomParam

        com.ctre.phoenix.ErrorCode configSetCustomParam​(int newValue,
                                                        int paramIndex)
        Sets the value of a custom parameter.
        Parameters:
        newValue - Value for custom parameter.
        paramIndex - Index of custom parameter.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configSetParameter

        com.ctre.phoenix.ErrorCode configSetParameter​(com.ctre.phoenix.ParamEnum param,
                                                      double value,
                                                      int subValue,
                                                      int ordinal)
        Sets a parameter.
        Parameters:
        param - Parameter enumeration.
        value - Value of parameter.
        subValue - Subvalue for parameter. Maximum value of 255.
        ordinal - Ordinal of parameter.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configSetParameter

        com.ctre.phoenix.ErrorCode configSetParameter​(int param,
                                                      double value,
                                                      int subValue,
                                                      int ordinal)
        Sets a parameter.
        Parameters:
        param - Parameter enumeration.
        value - Value of parameter.
        subValue - Subvalue for parameter. Maximum value of 255.
        ordinal - Ordinal of parameter.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configVelocityMeasurementPeriod

        com.ctre.phoenix.ErrorCode configVelocityMeasurementPeriod​(int period)
        Sets the period over which velocity measurements are taken.
        Parameters:
        period - Desired period for the velocity measurement. @see #VelocityMeasPeriod
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configVelocityMeasurementWindow

        com.ctre.phoenix.ErrorCode configVelocityMeasurementWindow​(int windowSize)
      • configVoltageCompSaturation

        com.ctre.phoenix.ErrorCode configVoltageCompSaturation​(double voltage)
        Configures the Voltage Compensation saturation voltage.
        Parameters:
        voltage - TO-DO: Comment me!
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configVoltageMeasurementFilter

        com.ctre.phoenix.ErrorCode configVoltageMeasurementFilter​(int filterWindowSamples)
        Configures the voltage measurement filter.
        Parameters:
        filterWindowSamples - Number of samples in the rolling average of voltage measurement.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • config_IntegralZone

        com.ctre.phoenix.ErrorCode config_IntegralZone​(int slotIdx,
                                                       int izone)
        Sets the Integral Zone constant in the given parameter slot.
        Parameters:
        slotIdx - Parameter slot for the constant.
        izone - Value of the Integral Zone constant.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • config_kD

        com.ctre.phoenix.ErrorCode config_kD​(int slotIdx,
                                             double value)
        Sets the 'D' constant in the given parameter slot.
        Parameters:
        slotIdx - Parameter slot for the constant.
        value - Value of the D constant.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • config_kF

        com.ctre.phoenix.ErrorCode config_kF​(int slotIdx,
                                             double value)
        Sets the 'F' constant in the given parameter slot.
        Parameters:
        slotIdx - Parameter slot for the constant.
        value - Value of the F constant.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • config_kI

        com.ctre.phoenix.ErrorCode config_kI​(int slotIdx,
                                             double value)
        Sets the 'I' constant in the given parameter slot.
        Parameters:
        slotIdx - Parameter slot for the constant.
        value - Value of the I constant.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • config_kP

        com.ctre.phoenix.ErrorCode config_kP​(int slotIdx,
                                             double value)
        Sets the 'P' constant in the given parameter slot.
        Parameters:
        slotIdx - Parameter slot for the constant.
        value - Value of the P constant.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • getClosedLoopError

        int getClosedLoopError()
        Gets the closed-loop error.
        Returns:
        Closed-loop error value.
      • getControlMode

        com.ctre.phoenix.motorcontrol.ControlMode getControlMode()
        Note that this does not return the currently set control mode in the talon wrapper and may be different than the control mode set using setControlMode(ControlMode).
        Specified by:
        getControlMode in interface com.ctre.phoenix.motorcontrol.IMotorController
        Returns:
        The current control mode in the motor controller.
      • setControlMode

        void setControlMode​(com.ctre.phoenix.motorcontrol.ControlMode controlMode)
      • getDefaultPidIdx

        int getDefaultPidIdx()
      • setDefaultPidIdx

        void setDefaultPidIdx​(int defaultPidIdx)
      • getDefaultTimeoutMs

        int getDefaultTimeoutMs()
      • setDefaultTimeoutMs

        void setDefaultTimeoutMs​(int defaultTimeoutMs)
      • getEncoderCodesPerRev

        @Deprecated
        double getEncoderCodesPerRev()
        Deprecated.
        This no longer has any effect as natural units functionality has been removed.
        Gets the encoder codes per revolution.
        Returns:
        0.
      • setEncoderCodesPerRev

        @Deprecated
        void setEncoderCodesPerRev​(double encoderCodesPerRev)
        Deprecated.
        This no longer has any effect as natural units functionality has been removed.
        Sets the encoder codes per revolution for getting and setting velocity and position.
        Parameters:
        encoderCodesPerRev - The encoder codes per revolution to set.
      • getErrorDerivative

        double getErrorDerivative()
        Gets the derivative of the closed-loop error.
        Returns:
        The error derivative value.
      • getIntegralAccumulator

        double getIntegralAccumulator()
        Gets the iaccum value.
        Returns:
        Integral accumulator value.
      • getSelectedSensorPosition

        int getSelectedSensorPosition()
        Get the selected sensor position.
        Returns:
        Position of selected sensor in raw sensor units.
      • getSelectedSensorVelocity

        int getSelectedSensorVelocity()
        Get the selected sensor velocity.
        Returns:
        Velocity of selected sensor in raw sensor units per decisecond.
      • getStatusFramePeriod

        int getStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrameEnhanced frame)
      • getStatusFramePeriod

        int getStatusFramePeriod​(int frame)
        Gets the period of the given status frame.
        Parameters:
        frame - Frame to get the period of.
        Returns:
        Period of the given status frame.
      • getStatusFramePeriod

        int getStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrame frame)
        Gets the period of the given status frame.
        Parameters:
        frame - Frame to get the period of.
        Returns:
        Period of the given status frame.
      • selectProfileSlot

        void selectProfileSlot​(int slotIdx)
        Selects which profile slot to use for closed-loop control.
        Parameters:
        slotIdx - Profile slot to select.
      • set

        void set​(double outputValue)
        Sets the appropriate output on the talon, depending on the mode.

        In PercentOutput, the output is between -1.0 and 1.0, with 0.0 as stopped. In Voltage mode, output value is in volts. In Current mode, output value is in amperes. In Speed mode, output value is in position change / 100ms. In Position mode, output value is in native sensor units. In Velocity mode, output value is in native units per decisecond. In Follower mode, the output value is the integer device ID of the talon to duplicate.

        Parameters:
        outputValue - The setpoint value, as described above.
      • setBrake

        void setBrake​(boolean brake)
        Sets the mode of operation during neutral throttle output.
        Parameters:
        brake - Whether or not to brake.
      • setIntegralAccumulator

        com.ctre.phoenix.ErrorCode setIntegralAccumulator​(double iaccum,
                                                          int pidIdx)
        Sets the integral accumulator.
        Parameters:
        iaccum - Value to set for the integral accumulator.
        pidIdx - The PID IDX to use.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • setIntegralAccumulator

        com.ctre.phoenix.ErrorCode setIntegralAccumulator​(double iaccum)
        Sets the integral accumulator.
        Parameters:
        iaccum - Value to set for the integral accumulator.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • setSelectedSensorPosition

        com.ctre.phoenix.ErrorCode setSelectedSensorPosition​(int sensorPos,
                                                             int pidIdx)
        Sets the sensor position to the given value.
        Parameters:
        sensorPos - Position to set for the selected sensor (in Raw Sensor Units).
        pidIdx - The PID IDX to use.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • setSelectedSensorPosition

        com.ctre.phoenix.ErrorCode setSelectedSensorPosition​(int sensorPos)
        Sets the sensor position to the given value.
        Parameters:
        sensorPos - Position to set for the selected sensor (in Raw Sensor Units).
        Returns:
        Error Code generated by function. 0 indicates no error.
      • setStatusFramePeriod

        com.ctre.phoenix.ErrorCode setStatusFramePeriod​(int frameValue,
                                                        int periodMs)
        Sets the period of the given status frame.
        Parameters:
        periodMs - Period in ms for the given frame.
        frameValue - Frame whose period is to be changed.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • setStatusFramePeriod

        com.ctre.phoenix.ErrorCode setStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrame frame,
                                                        int periodMs)
        Sets the period of the given status frame.
        Parameters:
        frame - Frame whose period is to be changed.
        periodMs - Period in ms for the given frame.
        Returns:
        Error Code generated by function. 0 indicates no error.