Class VictorSPXCollection

    • Constructor Summary

      Constructors 
      Constructor Description
      VictorSPXCollection​(com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX master, com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX... slaves)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void enableRampRateLimiting​(boolean enabled)
      Set if ramp rate limiting should be enabled for the controller
      void forEachSlave​(java.util.function.Consumer<com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX> consumer)
      For-Each over each slave controller
      EncoderBase getDefaultEncoder()
      Get the default encoder
      EncoderBase getEncoder​(int id, boolean phase)
      Get an encoder of a specific ID.
      double getEstimatedVoltage()
      Estimate controller output voltage from speed
      com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX getMaster()
      Get the master VictorSPX
      double getRampRate()
      Get the configured ramp rate
      void logStatus()
      Log all component data with RobotLogger
      void pidWrite​(double output)  
      void set​(double speed)  
      void setBuffer​(double speed)
      Only set on new data
      void setInverted​(boolean isInverted)  
      void setMasterMotorSafety​(boolean enabled)
      Set the motorsafety mode of the master motor controller
      void setRampRate​(double secondsToFull)
      Set the controller ramp rate.
      void setVoltage​(double volts)
      Set desired controller output in volts.
      void updateTelemetry()
      Push telemetry data to NetworkTables
      • Methods inherited from class edu.wpi.first.wpilibj.SpeedControllerGroup

        close, disable, get, getInverted, initSendable, stopMotor
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface edu.wpi.first.wpilibj.Sendable

        addChild, getName, getSubsystem, setName, setName, setName, setName, setSubsystem
      • Methods inherited from interface edu.wpi.first.wpilibj.SpeedController

        disable, get, getInverted, stopMotor
    • Constructor Detail

      • VictorSPXCollection

        public VictorSPXCollection​(com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX master,
                                   com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX... slaves)
    • Method Detail

      • set

        public void set​(double speed)
        Specified by:
        set in interface edu.wpi.first.wpilibj.SpeedController
        Overrides:
        set in class edu.wpi.first.wpilibj.SpeedControllerGroup
      • setBuffer

        public void setBuffer​(double speed)
        Description copied from interface: IMotorCollection
        Only set on new data
        Specified by:
        setBuffer in interface IMotorCollection
        Parameters:
        speed - Motor speed
      • setInverted

        public void setInverted​(boolean isInverted)
        Specified by:
        setInverted in interface edu.wpi.first.wpilibj.SpeedController
        Overrides:
        setInverted in class edu.wpi.first.wpilibj.SpeedControllerGroup
      • pidWrite

        public void pidWrite​(double output)
        Specified by:
        pidWrite in interface edu.wpi.first.wpilibj.PIDOutput
        Overrides:
        pidWrite in class edu.wpi.first.wpilibj.SpeedControllerGroup
      • setVoltage

        public void setVoltage​(double volts)
        Description copied from interface: IVoltageOutputController
        Set desired controller output in volts. Negative voltage will result in reverse output
        Specified by:
        setVoltage in interface IVoltageOutputController
        Specified by:
        setVoltage in interface edu.wpi.first.wpilibj.SpeedController
        Parameters:
        volts - Controller output
      • setRampRate

        public void setRampRate​(double secondsToFull)
        Description copied from interface: IRampRateController
        Set the controller ramp rate.
        Specified by:
        setRampRate in interface IRampRateController
        Parameters:
        secondsToFull - Minimum desired time to go from neutral to full output.
      • enableRampRateLimiting

        public void enableRampRateLimiting​(boolean enabled)
        Description copied from interface: IRampRateController
        Set if ramp rate limiting should be enabled for the controller
        Specified by:
        enableRampRateLimiting in interface IRampRateController
        Parameters:
        enabled - Should enable limiting?
      • setMasterMotorSafety

        public void setMasterMotorSafety​(boolean enabled)
        Description copied from interface: IMotorGroupSafety
        Set the motorsafety mode of the master motor controller
        Specified by:
        setMasterMotorSafety in interface IMotorGroupSafety
        Parameters:
        enabled - MotorSafety enabled
      • getMaster

        public com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX getMaster()
        Get the master VictorSPX
        Returns:
        Master
      • forEachSlave

        public void forEachSlave​(java.util.function.Consumer<com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX> consumer)
        For-Each over each slave controller
        Parameters:
        consumer - Method to run
      • getEncoder

        public EncoderBase getEncoder​(int id,
                                      boolean phase)
        Description copied from interface: IEncoderProvider
        Get an encoder of a specific ID. This is useful if a system has more than one sensor, or if it has more than one input, but only one sensor. If the system only has one sensor, this should probably just return getDefaultEncoder()
        Specified by:
        getEncoder in interface IEncoderProvider
        Parameters:
        id - Encoder ID
        Returns:
        Encoder
      • logStatus

        public void logStatus()
        Log all component data with RobotLogger
        Specified by:
        logStatus in interface Loggable
      • updateTelemetry

        public void updateTelemetry()
        Description copied from interface: Loggable
        Push telemetry data to NetworkTables
        Specified by:
        updateTelemetry in interface Loggable