Class SwerveConfig.CurrentLimitConfig

  • Enclosing class:
    SwerveConfig

    public static final class SwerveConfig.CurrentLimitConfig
    extends java.lang.Object
    A configuration object representing the current limiting to perform on the drivetrain.
    • Constructor Summary

      Constructors 
      Constructor Description
      CurrentLimitConfig​(int amperageLimit, int peakDuration)
      Creates a CurrentLimitConfig object with the specified limit and exceedance duration.
      CurrentLimitConfig​(int rotatorMotorPeakAmperage, int rotatorMotorPeakDuration, int rotatorMotorContinuousAmperage, boolean rotatorMotorLimitingEnabled, int driveMotorPeakAmperage, int driveMotorPeakDuration, int driveMotorContinuousAmperage, boolean driveMotorLimitingEnabled)
      Creates a CurrentLimitConfig object with the specified parameters.
      CurrentLimitConfig​(int driveMotorAmperageLimit, int driveMotorPeakDuration, int rotatorMotorAmperageLimit, int rotatorMotorPeakDuration)
      Creates a CurrentLimitConfig object with the specified limit and exceedance duration.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rotatorMotorPeakAmperage

        public final int rotatorMotorPeakAmperage
        The point beyond which current will be limited (for the rotator motors).
      • rotatorMotorPeakDuration

        public final int rotatorMotorPeakDuration
        The duration that the current draw is allowed to be over the peak amperage (rotator).
      • rotatorMotorContinuousAmperage

        public final int rotatorMotorContinuousAmperage
        The amperage that the current draw is limited to (for the rotator motors).
      • rotatorMotorLimitingEnabled

        public final boolean rotatorMotorLimitingEnabled
        Whether or not current limiting is enabled for the rotator motors. If false, no current limiting configuration is set to the Talons.
      • driveMotorPeakAmperage

        public final int driveMotorPeakAmperage
        The point beyond which current will be limited (for the drive motors).
      • driveMotorPeakDuration

        public final int driveMotorPeakDuration
        The duration that the current draw is allowed to be over the peak amperage (drive).
      • driveMotorContinuousAmperage

        public final int driveMotorContinuousAmperage
        The amperage that the current draw is limited to (for the drive motors).
      • driveMotorLimitingEnabled

        public final boolean driveMotorLimitingEnabled
        Whether or not current limiting is enabled for the drive motors. If false, no current limiting configuration is set to the Talons.
    • Constructor Detail

      • CurrentLimitConfig

        public CurrentLimitConfig​(int rotatorMotorPeakAmperage,
                                  int rotatorMotorPeakDuration,
                                  int rotatorMotorContinuousAmperage,
                                  boolean rotatorMotorLimitingEnabled,
                                  int driveMotorPeakAmperage,
                                  int driveMotorPeakDuration,
                                  int driveMotorContinuousAmperage,
                                  boolean driveMotorLimitingEnabled)
        Creates a CurrentLimitConfig object with the specified parameters.
        Parameters:
        rotatorMotorPeakAmperage - the point beyond which current will be limited (rotate).
        rotatorMotorPeakDuration - the duration beyond peak amperage before limiting (R).
        rotatorMotorContinuousAmperage - the amperage that current is limited to (rotator).
        rotatorMotorLimitingEnabled - whether current limiting is enabled (rotator motors).
        driveMotorPeakAmperage - the point beyond which current will be limited (drive).
        driveMotorPeakDuration - the duration beyond peak amperage before limiting (drive).
        driveMotorContinuousAmperage - the amperage that current is limited to (drive).
        driveMotorLimitingEnabled - whether current limiting is enabled (rotator motors).
      • CurrentLimitConfig

        public CurrentLimitConfig​(int amperageLimit,
                                  int peakDuration)
        Creates a CurrentLimitConfig object with the specified limit and exceedance duration. The limit and duration are used for both the drive and rotator motors. Once the current draw has been over the limit for the specified duration, it is capped at the limit.
        Parameters:
        amperageLimit - the amperage limit for both the drive and rotator motors.
        peakDuration - the time that excessive current draw is allowed before limiting.
      • CurrentLimitConfig

        public CurrentLimitConfig​(int driveMotorAmperageLimit,
                                  int driveMotorPeakDuration,
                                  int rotatorMotorAmperageLimit,
                                  int rotatorMotorPeakDuration)
        Creates a CurrentLimitConfig object with the specified limit and exceedance duration. Different values are given for the drive and rotator motors. Once the current draw has been over the limit for the specified duration, it is capped at the limit.
        Parameters:
        driveMotorAmperageLimit - the amperage limit for the drive motors.
        driveMotorPeakDuration - the time that excessive current draw is allowed (drive).
        rotatorMotorAmperageLimit - the amperage limit for the rotator motors.
        rotatorMotorPeakDuration - the time that excessive current draw is allowed (R).