Class ChickenTalon

  • All Implemented Interfaces:
    com.ctre.phoenix.motorcontrol.IFollower, com.ctre.phoenix.motorcontrol.IMotorController, com.ctre.phoenix.motorcontrol.IMotorControllerEnhanced, com.ctre.phoenix.signals.IInvertable, com.ctre.phoenix.signals.IOutputSignal, ChickenController

    public class ChickenTalon
    extends com.ctre.phoenix.motorcontrol.can.TalonSRX
    implements ChickenController
    Wrapper around a TalonSRX adding some features (that really should already be there) as well as making functions easier to call.
    • Field Summary

      • Fields inherited from class com.ctre.phoenix.motorcontrol.can.BaseMotorController

        m_handle
    • Constructor Summary

      Constructors 
      Constructor Description
      ChickenTalon​(int deviceNumber)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void changeControlMode​(ChickenTalon.TalonControlMode controlMode)
      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 configContinuousCurrentLimit​(int amps)  
      void configEncoderCodesPerRev​(int codesPerRev)
      Deprecated.
      Functionality removed.
      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.
      void configNominalOutputVoltage​(double forwardVoltage, double reverseVoltage)
      com.ctre.phoenix.ErrorCode configOpenloopRamp​(double secondsFromNeutralToFull)
      Configures the open-loop ramp rate of throttle output.
      com.ctre.phoenix.ErrorCode configPeakCurrentDuration​(int milliseconds)  
      com.ctre.phoenix.ErrorCode configPeakCurrentLimit​(int amps)  
      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.
      void configPeakOutputVoltage​(double forwardVoltage, double reverseVoltage)
      com.ctre.phoenix.ErrorCode configRemoteFeedbackFilter​(int deviceID, com.ctre.phoenix.motorcontrol.RemoteSensorSource remoteSensorSource, int remoteOrdinal)  
      com.ctre.phoenix.ErrorCode configReverseLimitSwitchSource​(com.ctre.phoenix.motorcontrol.LimitSwitchSource type, com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose)  
      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.
      void enableBrakeMode​(boolean brake)
      Deprecated.
      int getAnalogIn()
      Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
      int getAnalogInRaw()
      Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
      int getAnalogInVel()
      Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
      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.
      int getEncPosition()
      Deprecated.
      int getEncVelocity()
      Deprecated.
      double getError()
      Deprecated.
      double getErrorDerivative()
      Gets the derivative of the closed-loop error.
      double getIntegralAccumulator()
      Gets the iaccum value.
      double getOutputVoltage()
      Deprecated.
      Use BaseMotorController.getMotorOutputVoltage()
      double getPeakOutputForward()
      Gets the forward peak output percentage.
      double getPeakOutputReverse()
      Gets the reverse peak output percentage.
      boolean getPinStateQuadA()
      Gets pin state quad a.
      boolean getPinStateQuadB()
      Gets pin state quad b.
      boolean getPinStateQuadIdx()
      Gets pin state quad index.
      double getPosition()
      int getPulseWidthPosition()
      Gets pulse width position.
      int getPulseWidthRiseToFallUs()
      Gets pulse width rise to fall us.
      int getPulseWidthRiseToRiseUs()
      Gets pulse width rise to rise us.
      int getPulseWidthVelocity()
      Gets pulse width velocity.
      int getQuadraturePosition()
      Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
      int getQuadratureVelocity()
      Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
      int getSelectedSensorPosition()
      Get the selected sensor position.
      int getSelectedSensorVelocity()
      Get the selected sensor velocity.
      double getSetpoint()
      Deprecated.
      Use BaseMotorController.getClosedLoopTarget(int)
      double getSpeed()
      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 reverseOutput​(boolean flip)
      Deprecated.
      Use BaseMotorController.setInverted(boolean)
      void reverseSensor​(boolean flip)
      Deprecated.
      Use BaseMotorController.setSensorPhase(boolean)
      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.
      com.ctre.phoenix.ErrorCode setAnalogPosition​(int newPosition)
      Sets analog position.
      void setBrake​(boolean brake)
      Sets the mode of operation during neutral throttle output.
      void setControlMode​(int mode)
      void setControlMode​(com.ctre.phoenix.motorcontrol.ControlMode controlMode)  
      void setD​(double d)
      Deprecated.
      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.
      void setF​(double f)
      Deprecated.
      Use BaseMotorController.config_kF(int, double, int)
      void setFeedbackDevice​(com.ctre.phoenix.motorcontrol.FeedbackDevice device)
      void setI​(double i)
      Deprecated.
      com.ctre.phoenix.ErrorCode setIntegralAccumulator​(double iaccum)
      Sets the integral accumulator.
      com.ctre.phoenix.ErrorCode setIntegralAccumulator​(double iaccum, int pidIdx)
      Sets the integral accumulator.
      void setP​(double p)
      Deprecated.
      void setPID​(double p, double i, double d)
      void setPosition​(double pos)
      void setProfile​(int profile)
      Deprecated.
      com.ctre.phoenix.ErrorCode setPulseWidthPosition​(int newPosition)
      Sets pulse width position.
      com.ctre.phoenix.ErrorCode setQuadraturePosition​(int newPosition)
      Change the quadrature reported position.
      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.
      void setSetpoint​(double setpoint)
      Deprecated.
      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.StatusFrameEnhanced frame, int periodMs)  
      com.ctre.phoenix.ErrorCode setStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrame frame, int periodMs)
      Sets the period of the given status frame.
      void setVoltageRampRate​(double rampRate)
      • Methods inherited from class com.ctre.phoenix.motorcontrol.can.TalonSRX

        configAllSettings, configAllSettings, configContinuousCurrentLimit, configPeakCurrentDuration, configPeakCurrentLimit, configSelectedFeedbackSensor, configSupplyCurrentLimit, configSupplyCurrentLimit, configurePID, configurePID, enableCurrentLimit, getAllConfigs, getAllConfigs, getPIDConfigs, getPIDConfigs, getSensorCollection
      • Methods inherited from class com.ctre.phoenix.motorcontrol.can.BaseTalon

        configAllSettings, configAllSettings, configForwardLimitSwitchSource, configReverseLimitSwitchSource, configurePID, configurePID, configVelocityMeasurementPeriod, configVelocityMeasurementPeriod, configVelocityMeasurementWindow, getAllConfigs, getAllConfigs, getOutputCurrent, getPIDConfigs, getPIDConfigs, getStatorCurrent, getStatusFramePeriod, getSupplyCurrent, getTalonFXSensorCollection, getTalonSRXSensorCollection, isFwdLimitSwitchClosed, isRevLimitSwitchClosed, setStatusFramePeriod
      • Methods inherited from class com.ctre.phoenix.motorcontrol.can.BaseMotorController

        baseConfigAllSettings, baseConfigurePID, baseGetAllConfigs, baseGetPIDConfigs, changeMotionControlFramePeriod, clearMotionProfileHasUnderrun, clearMotionProfileTrajectories, clearStickyFaults, config_IntegralZone, config_kD, config_kF, config_kI, config_kP, configAllowableClosedloopError, configAuxPIDPolarity, configAuxPIDPolarity, configClearPositionOnLimitF, configClearPositionOnLimitR, configClearPositionOnQuadIdx, configClosedLoopPeakOutput, configClosedLoopPeakOutput, configClosedLoopPeriod, configClosedLoopPeriod, configClosedloopRamp, configFactoryDefault, configFactoryDefault, configFeedbackNotContinuous, configForwardLimitSwitchSource, configForwardLimitSwitchSource, configForwardSoftLimitEnable, configForwardSoftLimitThreshold, configGetCustomParam, configGetParameter, configGetParameter, configLimitSwitchDisableNeutralOnLOS, configMaxIntegralAccumulator, configMotionAcceleration, configMotionCruiseVelocity, configMotionProfileTrajectoryInterpolationEnable, configMotionProfileTrajectoryInterpolationEnable, configMotionProfileTrajectoryPeriod, configMotionProfileTrajectoryPeriod, configMotionSCurveStrength, configMotionSCurveStrength, configNeutralDeadband, configNominalOutputForward, configNominalOutputReverse, configOpenloopRamp, configPeakOutputForward, configPeakOutputReverse, configPulseWidthPeriod_EdgesPerRot, configPulseWidthPeriod_FilterWindowSz, configRemoteFeedbackFilter, configRemoteSensorClosedLoopDisableNeutralOnLOS, configReverseLimitSwitchSource, configReverseLimitSwitchSource, configReverseSoftLimitEnable, configReverseSoftLimitThreshold, configSelectedFeedbackCoefficient, configSelectedFeedbackCoefficient, configSelectedFeedbackSensor, configSelectedFeedbackSensor, configSensorTerm, configSensorTerm, configSensorTerm, configSetCustomParam, configSetParameter, configSetParameter, configSoftLimitDisableNeutralOnLOS, configureFilter, configureFilter, configureFilter, configureSlot, configureSlot, configVoltageCompSaturation, configVoltageMeasurementFilter, DestroyObject, enableHeadingHold, enableVoltageCompensation, follow, follow, getActiveTrajectoryArbFeedFwd, getActiveTrajectoryArbFeedFwd, getActiveTrajectoryHeading, getActiveTrajectoryPosition, getActiveTrajectoryPosition, getActiveTrajectoryVelocity, getActiveTrajectoryVelocity, getBaseID, getBusVoltage, getClosedLoopError, getClosedLoopTarget, getClosedLoopTarget, getDeviceID, getErrorDerivative, getFaults, getFilterConfigs, getFilterConfigs, getFirmwareVersion, getHandle, getIntegralAccumulator, getInverted, getLastError, getMotionProfileStatus, getMotionProfileTopLevelBufferCount, getMotorOutputPercent, getMotorOutputVoltage, getSelectedSensorPosition, getSelectedSensorVelocity, getSlotConfigs, getSlotConfigs, getStatusFramePeriod, getStatusFramePeriod, getStickyFaults, getTemperature, hasResetOccurred, isMotionProfileFinished, isMotionProfileTopLevelBufferFull, neutralOutput, overrideLimitSwitchesEnable, overrideSoftLimitsEnable, processMotionProfileBuffer, pushMotionProfileTrajectory, selectDemandType, selectProfileSlot, set, set, set, setControlFramePeriod, setControlFramePeriod, setIntegralAccumulator, setInverted, setInverted, setNeutralMode, setSelectedSensorPosition, setSensorPhase, setStatusFramePeriod, setStatusFramePeriod, startMotionProfile, valueUpdated
      • 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
      • Methods inherited from interface com.ctre.phoenix.motorcontrol.IMotorControllerEnhanced

        configSelectedFeedbackSensor
    • Constructor Detail

      • ChickenTalon

        public ChickenTalon​(int deviceNumber)
    • Method Detail

      • clearMotionProfileHasUnderrun

        public com.ctre.phoenix.ErrorCode clearMotionProfileHasUnderrun()
        Specified by:
        clearMotionProfileHasUnderrun in interface ChickenController
        Overrides:
        clearMotionProfileHasUnderrun in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
      • clearStickyFaults

        public com.ctre.phoenix.ErrorCode clearStickyFaults()
        Specified by:
        clearStickyFaults in interface ChickenController
        Overrides:
        clearStickyFaults in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
      • configAllowableClosedloopError

        public com.ctre.phoenix.ErrorCode configAllowableClosedloopError​(int slotIdx,
                                                                         int allowableClosedLoopError)
        Sets the allowable closed-loop error in the given parameter slot.
        Specified by:
        configAllowableClosedloopError in interface ChickenController
        Overrides:
        configAllowableClosedloopError in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode configClosedloopRamp​(double secondsFromNeutralToFull)
        Configures the closed-loop ramp rate of throttle output.
        Specified by:
        configClosedloopRamp in interface ChickenController
        Overrides:
        configClosedloopRamp in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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.
      • configContinuousCurrentLimit

        public com.ctre.phoenix.ErrorCode configContinuousCurrentLimit​(int amps)
        Overrides:
        configContinuousCurrentLimit in class com.ctre.phoenix.motorcontrol.can.TalonSRX
      • configForwardLimitSwitchSource

        public com.ctre.phoenix.ErrorCode configForwardLimitSwitchSource​(com.ctre.phoenix.motorcontrol.LimitSwitchSource type,
                                                                         com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose)
        Specified by:
        configForwardLimitSwitchSource in interface ChickenController
        Overrides:
        configForwardLimitSwitchSource in class com.ctre.phoenix.motorcontrol.can.BaseTalon
      • configForwardLimitSwitchSource

        public 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.
        Specified by:
        configForwardLimitSwitchSource in interface ChickenController
        Overrides:
        configForwardLimitSwitchSource in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode configForwardSoftLimitEnable​(boolean enable)
        Configures the forward soft limit enable.
        Specified by:
        configForwardSoftLimitEnable in interface ChickenController
        Overrides:
        configForwardSoftLimitEnable in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        enable - Forward Sensor Position Limit Enable.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configForwardSoftLimitThreshold

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

        public int configGetCustomParam​(int paramIndex)
        Gets the value of a custom parameter.
        Specified by:
        configGetCustomParam in interface ChickenController
        Overrides:
        configGetCustomParam in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        paramIndex - Index of custom parameter.
        Returns:
        Value of the custom param.
      • configGetParameter

        public double configGetParameter​(com.ctre.phoenix.ParamEnum param,
                                         int ordinal)
        Gets a parameter.
        Specified by:
        configGetParameter in interface ChickenController
        Overrides:
        configGetParameter in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        param - Parameter enumeration.
        ordinal - Ordinal of parameter.
        Returns:
        Value of parameter.
      • configGetParameter

        public double configGetParameter​(int param,
                                         int ordinal)
        Gets a parameter.
        Specified by:
        configGetParameter in interface ChickenController
        Overrides:
        configGetParameter in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        param - Parameter enumeration.
        ordinal - Ordinal of parameter.
        Returns:
        Value of parameter.
      • configMaxIntegralAccumulator

        public com.ctre.phoenix.ErrorCode configMaxIntegralAccumulator​(int slotIdx,
                                                                       double iaccum)
        Sets the maximum integral accumulator in the given parameter slot.
        Specified by:
        configMaxIntegralAccumulator in interface ChickenController
        Overrides:
        configMaxIntegralAccumulator in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode configMotionAcceleration​(int sensorUnitsPer100msPerSec)
        Sets the Motion Magic Acceleration.
        Specified by:
        configMotionAcceleration in interface ChickenController
        Overrides:
        configMotionAcceleration in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

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

        public com.ctre.phoenix.ErrorCode configNeutralDeadband​(double percentDeadband)
        Configures the output deadband percentage.
        Specified by:
        configNeutralDeadband in interface ChickenController
        Overrides:
        configNeutralDeadband in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode configNominalOutputForward​(double percentOut)
        Configures the forward nominal output percentage.
        Specified by:
        configNominalOutputForward in interface ChickenController
        Overrides:
        configNominalOutputForward in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        percentOut - Nominal (minimum) percent output.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configNominalOutputReverse

        public com.ctre.phoenix.ErrorCode configNominalOutputReverse​(double percentOut)
        Configures the reverse nominal output percentage.
        Specified by:
        configNominalOutputReverse in interface ChickenController
        Overrides:
        configNominalOutputReverse in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        percentOut - Nominal (minimum) percent output.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configOpenloopRamp

        public com.ctre.phoenix.ErrorCode configOpenloopRamp​(double secondsFromNeutralToFull)
        Configures the open-loop ramp rate of throttle output.
        Specified by:
        configOpenloopRamp in interface ChickenController
        Overrides:
        configOpenloopRamp in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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.
      • configPeakCurrentDuration

        public com.ctre.phoenix.ErrorCode configPeakCurrentDuration​(int milliseconds)
        Overrides:
        configPeakCurrentDuration in class com.ctre.phoenix.motorcontrol.can.TalonSRX
      • configPeakCurrentLimit

        public com.ctre.phoenix.ErrorCode configPeakCurrentLimit​(int amps)
        Overrides:
        configPeakCurrentLimit in class com.ctre.phoenix.motorcontrol.can.TalonSRX
      • configPeakOutputForward

        public com.ctre.phoenix.ErrorCode configPeakOutputForward​(double percentOut)
        Description copied from interface: ChickenController
        Configures the forward peak output percentage.
        Specified by:
        configPeakOutputForward in interface ChickenController
        Overrides:
        configPeakOutputForward in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        percentOut - Desired peak output percentage.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configPeakOutputReverse

        public com.ctre.phoenix.ErrorCode configPeakOutputReverse​(double percentOut)
        Description copied from interface: ChickenController
        Configures the reverse peak output percentage.
        Specified by:
        configPeakOutputReverse in interface ChickenController
        Overrides:
        configPeakOutputReverse in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        percentOut - Desired peak output percentage.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configRemoteFeedbackFilter

        public com.ctre.phoenix.ErrorCode configRemoteFeedbackFilter​(int deviceID,
                                                                     com.ctre.phoenix.motorcontrol.RemoteSensorSource remoteSensorSource,
                                                                     int remoteOrdinal)
        Specified by:
        configRemoteFeedbackFilter in interface ChickenController
        Overrides:
        configRemoteFeedbackFilter in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
      • configReverseLimitSwitchSource

        public com.ctre.phoenix.ErrorCode configReverseLimitSwitchSource​(com.ctre.phoenix.motorcontrol.LimitSwitchSource type,
                                                                         com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose)
        Overrides:
        configReverseLimitSwitchSource in class com.ctre.phoenix.motorcontrol.can.BaseTalon
      • configReverseLimitSwitchSource

        public 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.
        Specified by:
        configReverseLimitSwitchSource in interface ChickenController
        Overrides:
        configReverseLimitSwitchSource in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode configReverseSoftLimitEnable​(boolean enable)
        Configures the reverse soft limit enable.
        Specified by:
        configReverseSoftLimitEnable in interface ChickenController
        Overrides:
        configReverseSoftLimitEnable in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        enable - Reverse Sensor Position Limit Enable.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configReverseSoftLimitThreshold

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

        public com.ctre.phoenix.ErrorCode configSelectedFeedbackSensor​(com.ctre.phoenix.motorcontrol.RemoteFeedbackDevice feedbackDevice,
                                                                       int pidIdx)
        Select the remote feedback device for the motor controller.
        Specified by:
        configSelectedFeedbackSensor in interface ChickenController
        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

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

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

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

        public com.ctre.phoenix.ErrorCode configSensorTerm​(com.ctre.phoenix.motorcontrol.SensorTerm sensorTerm,
                                                           com.ctre.phoenix.motorcontrol.FeedbackDevice feedbackDevice)
        Specified by:
        configSensorTerm in interface ChickenController
        Overrides:
        configSensorTerm in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
      • configSetCustomParam

        public com.ctre.phoenix.ErrorCode configSetCustomParam​(int newValue,
                                                               int paramIndex)
        Sets the value of a custom parameter.
        Specified by:
        configSetCustomParam in interface ChickenController
        Overrides:
        configSetCustomParam in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        newValue - Value for custom parameter.
        paramIndex - Index of custom parameter.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configSetParameter

        public com.ctre.phoenix.ErrorCode configSetParameter​(com.ctre.phoenix.ParamEnum param,
                                                             double value,
                                                             int subValue,
                                                             int ordinal)
        Sets a parameter.
        Specified by:
        configSetParameter in interface ChickenController
        Overrides:
        configSetParameter in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode configSetParameter​(int param,
                                                             double value,
                                                             int subValue,
                                                             int ordinal)
        Sets a parameter.
        Specified by:
        configSetParameter in interface ChickenController
        Overrides:
        configSetParameter in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

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

        public com.ctre.phoenix.ErrorCode configVelocityMeasurementWindow​(int windowSize)
        Specified by:
        configVelocityMeasurementWindow in interface ChickenController
        Overrides:
        configVelocityMeasurementWindow in class com.ctre.phoenix.motorcontrol.can.BaseTalon
      • configVoltageCompSaturation

        public com.ctre.phoenix.ErrorCode configVoltageCompSaturation​(double voltage)
        Configures the Voltage Compensation saturation voltage.
        Specified by:
        configVoltageCompSaturation in interface ChickenController
        Overrides:
        configVoltageCompSaturation in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        voltage - TO-DO: Comment me!
        Returns:
        Error Code generated by function. 0 indicates no error.
      • configVoltageMeasurementFilter

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

        public com.ctre.phoenix.ErrorCode config_IntegralZone​(int slotIdx,
                                                              int izone)
        Sets the Integral Zone constant in the given parameter slot.
        Specified by:
        config_IntegralZone in interface ChickenController
        Overrides:
        config_IntegralZone in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode config_kD​(int slotIdx,
                                                    double value)
        Sets the 'D' constant in the given parameter slot.
        Specified by:
        config_kD in interface ChickenController
        Overrides:
        config_kD in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode config_kF​(int slotIdx,
                                                    double value)
        Sets the 'F' constant in the given parameter slot.
        Specified by:
        config_kF in interface ChickenController
        Overrides:
        config_kF in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode config_kI​(int slotIdx,
                                                    double value)
        Sets the 'I' constant in the given parameter slot.
        Specified by:
        config_kI in interface ChickenController
        Overrides:
        config_kI in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode config_kP​(int slotIdx,
                                                    double value)
        Sets the 'P' constant in the given parameter slot.
        Specified by:
        config_kP in interface ChickenController
        Overrides:
        config_kP in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        slotIdx - Parameter slot for the constant.
        value - Value of the P constant.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • getAnalogIn

        public int getAnalogIn()
        Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
        Returns:
        the 24bit analog value. The bottom ten bits is the ADC (0 - 1023) on the analog pin of the Talon. The upper 14 bits tracks the overflows and underflows (continuous sensor).
      • getAnalogInRaw

        public int getAnalogInRaw()
        Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
        Returns:
        the ADC (0 - 1023) on analog pin of the Talon.
      • getAnalogInVel

        public int getAnalogInVel()
        Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
        Returns:
        the value (0 - 1023) on the analog pin of the Talon.
      • getClosedLoopError

        public int getClosedLoopError()
        Gets the closed-loop error.
        Specified by:
        getClosedLoopError in interface ChickenController
        Overrides:
        getClosedLoopError in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Returns:
        Closed-loop error value.
      • getControlMode

        public 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 ChickenController
        Specified by:
        getControlMode in interface com.ctre.phoenix.motorcontrol.IMotorController
        Overrides:
        getControlMode in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Returns:
        The current control mode in the motor controller.
      • setControlMode

        public void setControlMode​(com.ctre.phoenix.motorcontrol.ControlMode controlMode)
        Specified by:
        setControlMode in interface ChickenController
      • getEncoderCodesPerRev

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

        @Deprecated
        public 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.
        Specified by:
        setEncoderCodesPerRev in interface ChickenController
        Parameters:
        encoderCodesPerRev - The encoder codes per revolution to set.
      • getErrorDerivative

        public double getErrorDerivative()
        Gets the derivative of the closed-loop error.
        Specified by:
        getErrorDerivative in interface ChickenController
        Overrides:
        getErrorDerivative in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Returns:
        The error derivative value.
      • getIntegralAccumulator

        public double getIntegralAccumulator()
        Gets the iaccum value.
        Specified by:
        getIntegralAccumulator in interface ChickenController
        Overrides:
        getIntegralAccumulator in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Returns:
        Integral accumulator value.
      • getPinStateQuadA

        public boolean getPinStateQuadA()
        Gets pin state quad a.
        Returns:
        the pin state quad a.
      • getPinStateQuadB

        public boolean getPinStateQuadB()
        Gets pin state quad b.
        Returns:
        Digital level of QUADB pin.
      • getPinStateQuadIdx

        public boolean getPinStateQuadIdx()
        Gets pin state quad index.
        Returns:
        Digital level of QUAD Index pin.
      • getPulseWidthPosition

        public int getPulseWidthPosition()
        Gets pulse width position.
        Returns:
        the pulse width position.
      • getPulseWidthRiseToFallUs

        public int getPulseWidthRiseToFallUs()
        Gets pulse width rise to fall us.
        Returns:
        the pulse width rise to fall us.
      • getPulseWidthRiseToRiseUs

        public int getPulseWidthRiseToRiseUs()
        Gets pulse width rise to rise us.
        Returns:
        the pulse width rise to rise us.
      • getPulseWidthVelocity

        public int getPulseWidthVelocity()
        Gets pulse width velocity.
        Returns:
        the pulse width velocity.
      • getQuadraturePosition

        public int getQuadraturePosition()
        Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
        Returns:
        the Error code of the request.
      • getQuadratureVelocity

        public int getQuadratureVelocity()
        Get the position of whatever is in the analog pin of the Talon, regardless of whether it is actually being used for feedback.
        Returns:
        the value (0 - 1023) on the analog pin of the Talon.
      • getSelectedSensorPosition

        public int getSelectedSensorPosition()
        Get the selected sensor position.
        Specified by:
        getSelectedSensorPosition in interface ChickenController
        Overrides:
        getSelectedSensorPosition in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Returns:
        Position of selected sensor in raw sensor units per decisecond.
      • getSelectedSensorVelocity

        public int getSelectedSensorVelocity()
        Get the selected sensor velocity.
        Specified by:
        getSelectedSensorVelocity in interface ChickenController
        Overrides:
        getSelectedSensorVelocity in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Returns:
        Velocity of selected sensor in raw sensor units per decisecond.
      • getStatusFramePeriod

        public int getStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrameEnhanced frame)
        Specified by:
        getStatusFramePeriod in interface ChickenController
        Overrides:
        getStatusFramePeriod in class com.ctre.phoenix.motorcontrol.can.BaseTalon
      • getStatusFramePeriod

        public int getStatusFramePeriod​(int frame)
        Gets the period of the given status frame.
        Specified by:
        getStatusFramePeriod in interface ChickenController
        Overrides:
        getStatusFramePeriod in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        frame - Frame to get the period of.
        Returns:
        Period of the given status frame.
      • getStatusFramePeriod

        public int getStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrame frame)
        Gets the period of the given status frame.
        Specified by:
        getStatusFramePeriod in interface ChickenController
        Overrides:
        getStatusFramePeriod in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        frame - Frame to get the period of.
        Returns:
        Period of the given status frame.
      • selectProfileSlot

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

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

        Specified by:
        set in interface ChickenController
        Parameters:
        outputValue - The setpoint value, as described above.
      • setAnalogPosition

        public com.ctre.phoenix.ErrorCode setAnalogPosition​(int newPosition)
        Sets analog position.
        Parameters:
        newPosition - The new position.
        Returns:
        an ErrorCode.
      • setBrake

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

        public com.ctre.phoenix.ErrorCode setIntegralAccumulator​(double iaccum,
                                                                 int pidIdx)
        Sets the integral accumulator.
        Specified by:
        setIntegralAccumulator in interface ChickenController
        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

        public com.ctre.phoenix.ErrorCode setIntegralAccumulator​(double iaccum)
        Sets the integral accumulator.
        Specified by:
        setIntegralAccumulator in interface ChickenController
        Overrides:
        setIntegralAccumulator in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Parameters:
        iaccum - Value to set for the integral accumulator.
        Returns:
        Error Code generated by function. 0 indicates no error.
      • setPulseWidthPosition

        public com.ctre.phoenix.ErrorCode setPulseWidthPosition​(int newPosition)
        Sets pulse width position.
        Parameters:
        newPosition - The position value to apply to the sensor.
        Returns:
        an ErrErrorCode
      • setQuadraturePosition

        public com.ctre.phoenix.ErrorCode setQuadraturePosition​(int newPosition)
        Change the quadrature reported position. Typically this is used to "zero" the sensor. This only works with Quadrature sensor. To set the selected sensor position regardless of what type it is, see SetSelectedSensorPosition in the motor controller class.
        Parameters:
        newPosition - The position value to apply to the sensor.
        Returns:
        error code.
      • setSelectedSensorPosition

        public com.ctre.phoenix.ErrorCode setSelectedSensorPosition​(int sensorPos,
                                                                    int pidIdx)
        Sets the sensor position to the given value.
        Specified by:
        setSelectedSensorPosition in interface ChickenController
        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

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

        public com.ctre.phoenix.ErrorCode setStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrameEnhanced frame,
                                                               int periodMs)
        Overrides:
        setStatusFramePeriod in class com.ctre.phoenix.motorcontrol.can.BaseTalon
      • setStatusFramePeriod

        public com.ctre.phoenix.ErrorCode setStatusFramePeriod​(int frameValue,
                                                               int periodMs)
        Sets the period of the given status frame.
        Specified by:
        setStatusFramePeriod in interface ChickenController
        Overrides:
        setStatusFramePeriod in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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

        public com.ctre.phoenix.ErrorCode setStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrame frame,
                                                               int periodMs)
        Sets the period of the given status frame.
        Specified by:
        setStatusFramePeriod in interface ChickenController
        Overrides:
        setStatusFramePeriod in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        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.
      • setP

        @Deprecated
        public void setP​(double p)
        Deprecated.
        Set the proportional value of the currently selected profile.
        Parameters:
        p - Proportional constant for the currently selected PID profile.
      • setI

        @Deprecated
        public void setI​(double i)
        Deprecated.
        Set the integration constant of the currently selected profile.
        Parameters:
        i - Integration constant for the currently selected PID profile.
      • setD

        @Deprecated
        public void setD​(double d)
        Deprecated.
        Set the derivative constant of the currently selected profile.
        Parameters:
        d - Derivative constant for the currently selected PID profile.
      • setF

        @Deprecated
        public void setF​(double f)
        Deprecated.
        Use BaseMotorController.config_kF(int, double, int)
        Set the feedforward value of the currently selected profile.
        Parameters:
        f - Feedforward constant for the currently selected PID profile.
      • configEncoderCodesPerRev

        @Deprecated
        public void configEncoderCodesPerRev​(int codesPerRev)
        Deprecated.
        Functionality removed.
        Configure how many codes per revolution are generated by your encoder.
        Parameters:
        codesPerRev - The number of counts per revolution.
      • getPosition

        @Deprecated
        public double getPosition()
        When using analog sensors, 0 units corresponds to 0V, 1023 units corresponds to 3.3V. When using an analog encoder (wrapping around 1023 to 0 is possible) the units are still 3.3V per 1023 units. When using quadrature, each unit is a quadrature edge (4X) mode.
        Returns:
        The position of the sensor currently providing feedback.
      • setVoltageRampRate

        @Deprecated
        public void setVoltageRampRate​(double rampRate)
        Set the voltage ramp rate for the current profile. Limits the rate at which the throttle will change. Affects all modes.
      • setProfile

        @Deprecated
        public void setProfile​(int profile)
        Deprecated.
        Select which closed loop profile to use, and uses whatever PIDF gains and the such that are already there.
      • getEncPosition

        @Deprecated
        public int getEncPosition()
        Deprecated.
        Get the current encoder position, regardless of whether it is the current feedback device.
      • getEncVelocity

        @Deprecated
        public int getEncVelocity()
        Deprecated.
        Get the current encoder velocity, regardless of whether it is the current feedback device.
      • getError

        @Deprecated
        public double getError()
        Deprecated.
        Returns the difference between the setpoint and the current position.
        Returns:
        The error in units corresponding to whichever mode we are in.
      • reverseOutput

        @Deprecated
        public void reverseOutput​(boolean flip)
        Deprecated.
        Use BaseMotorController.setInverted(boolean)
        Flips the sign (multiplies by negative one) the throttle values going into the motor on the talon in closed loop modes.
        Parameters:
        flip - True if motor output should be flipped; False if not.
      • reverseSensor

        @Deprecated
        public void reverseSensor​(boolean flip)
        Deprecated.
        Use BaseMotorController.setSensorPhase(boolean)
        Flips the sign (multiplies by negative one) the sensor values going into the talon. This only affects position and velocity closed loop control. Allows for situations where you may have a sensor flipped and going in the wrong direction.
        Parameters:
        flip - True if sensor input should be flipped; False if not.
      • getSetpoint

        @Deprecated
        public double getSetpoint()
        Deprecated.
        Use BaseMotorController.getClosedLoopTarget(int)
        Returns:
        The latest value set using set().
      • setSetpoint

        @Deprecated
        public void setSetpoint​(double setpoint)
        Deprecated.
        Calls set(double).
      • getOutputVoltage

        @Deprecated
        public double getOutputVoltage()
        Deprecated.
        Use BaseMotorController.getMotorOutputVoltage()
        Returns:
        The voltage being output by the Talon, in Volts.
      • getSpeed

        @Deprecated
        public double getSpeed()
        The speed units will be in the sensor's native ticks per 100ms. For analog sensors, 3.3V corresponds to 1023 units. So a speed of 200 equates to ~0.645 dV per 100ms or 6.451 dV per second. If this is an analog encoder, that likely means 1.9548 rotations per sec. For quadrature encoders, each unit corresponds a quadrature edge (4X). So a 250 count encoder will produce 1000 edge events per rotation. An example speed of 200 would then equate to 20% of a rotation per 100ms, or 10 rotations per second.
        Returns:
        The speed of the sensor currently providing feedback.