Class ChickenVictor

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

    public class ChickenVictor
    extends com.ctre.phoenix.motorcontrol.can.VictorSPX
    implements ChickenController
    • Field Summary

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

        m_handle
    • Constructor Summary

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

      All Methods Instance Methods Concrete 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 ChickenController.setControlMode(ControlMode).
      int getDefaultPidIdx()  
      int getDefaultTimeoutMs()  
      double getEncoderCodesPerRev()
      Deprecated.
      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.
      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 class com.ctre.phoenix.motorcontrol.can.VictorSPX

        configAllSettings, configAllSettings, getAllConfigs, getAllConfigs, getPIDConfigs, getPIDConfigs
      • 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, 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, configVelocityMeasurementPeriod, configVelocityMeasurementPeriod, configVelocityMeasurementWindow, 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, getOutputCurrent, getSelectedSensorPosition, getSelectedSensorVelocity, getSlotConfigs, getSlotConfigs, getStatusFramePeriod, 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
    • Constructor Detail

      • ChickenVictor

        public ChickenVictor​(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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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.
      • configOpenloopRamp

        public com.ctre.phoenix.ErrorCode configOpenloopRamp​(double secondsFromNeutralToFull)
        Description copied from interface: ChickenController
        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.
      • 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.BaseMotorController
      • configForwardLimitSwitchSource

        public com.ctre.phoenix.ErrorCode configForwardLimitSwitchSource​(com.ctre.phoenix.motorcontrol.RemoteLimitSwitchSource type,
                                                                         com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose,
                                                                         int deviceID)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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.
      • 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.RemoteLimitSwitchSource type,
                                                                         com.ctre.phoenix.motorcontrol.LimitSwitchNormal normalOpenOrClose,
                                                                         int deviceID)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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.BaseMotorController
      • configVoltageCompSaturation

        public com.ctre.phoenix.ErrorCode configVoltageCompSaturation​(double voltage)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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.
      • getClosedLoopError

        public int getClosedLoopError()
        Description copied from interface: ChickenController
        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()
        Description copied from interface: ChickenController
        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 ChickenController.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
      • setEncoderCodesPerRev

        @Deprecated
        public void setEncoderCodesPerRev​(double encoderCodesPerRev)
        Deprecated.
        Description copied from interface: ChickenController
        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()
        Description copied from interface: ChickenController
        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()
        Description copied from interface: ChickenController
        Gets the iaccum value.
        Specified by:
        getIntegralAccumulator in interface ChickenController
        Overrides:
        getIntegralAccumulator in class com.ctre.phoenix.motorcontrol.can.BaseMotorController
        Returns:
        Integral accumulator value.
      • getSelectedSensorPosition

        public int getSelectedSensorPosition()
        Description copied from interface: ChickenController
        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.
      • getSelectedSensorVelocity

        public int getSelectedSensorVelocity()
        Description copied from interface: ChickenController
        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.BaseMotorController
      • getStatusFramePeriod

        public int getStatusFramePeriod​(int frame)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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.
      • setBrake

        public void setBrake​(boolean brake)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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.
      • setSelectedSensorPosition

        public com.ctre.phoenix.ErrorCode setSelectedSensorPosition​(int sensorPos,
                                                                    int pidIdx)
        Description copied from interface: ChickenController
        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)
        Description copied from interface: ChickenController
        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​(int frameValue,
                                                               int periodMs)
        Description copied from interface: ChickenController
        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:
        frameValue - 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.
      • setStatusFramePeriod

        public com.ctre.phoenix.ErrorCode setStatusFramePeriod​(com.ctre.phoenix.motorcontrol.StatusFrame frame,
                                                               int periodMs)
        Description copied from interface: ChickenController
        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.