diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index 6e5d167..fac2bd4 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,7 +1,7 @@
- +voiddrive(edu.wpi.first.math.kinematics.ChassisSpeeds velocity) drive(edu.wpi.first.math.geometry.Translation2d translation,
+ double rotation,
+ boolean fieldRelative,
+ boolean isOpenLoop,
+ edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters) voiddrive(edu.wpi.first.math.kinematics.ChassisSpeeds velocity,
- boolean isOpenLoop) drive(edu.wpi.first.math.kinematics.ChassisSpeeds velocity) voiddrive(edu.wpi.first.math.kinematics.ChassisSpeeds velocity,
+ boolean isOpenLoop,
+ edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters) voiddrive(edu.wpi.first.math.kinematics.ChassisSpeeds velocity,
+ edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters) voiddriveFieldOriented(edu.wpi.first.math.kinematics.ChassisSpeeds velocity) Optional<edu.wpi.first.math.geometry.Translation3d>getAccel()voiddriveFieldOriented(edu.wpi.first.math.kinematics.ChassisSpeeds velocity,
+ edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters) Optional<edu.wpi.first.math.geometry.Translation3d>getAccel()edu.wpi.first.math.kinematics.ChassisSpeedsedu.wpi.first.math.kinematics.ChassisSpeedsedu.wpi.first.math.geometry.Rotation3dedu.wpi.first.math.geometry.Rotation3dRotation3d of the robot, as reported by the imu.edu.wpi.first.math.kinematics.SwerveModulePosition[]edu.wpi.first.math.kinematics.SwerveModulePosition[]SwerveModules associated with the SwerveDrive.edu.wpi.first.math.geometry.Rotation2dgetPitch()edu.wpi.first.math.geometry.Rotation2dgetPitch()edu.wpi.first.math.geometry.Pose2dgetPose()edu.wpi.first.math.geometry.Pose2dgetPose()edu.wpi.first.math.kinematics.ChassisSpeedsedu.wpi.first.math.kinematics.ChassisSpeedsedu.wpi.first.math.geometry.Rotation2dgetRoll()edu.wpi.first.math.geometry.Rotation2dgetRoll()edu.wpi.first.math.kinematics.SwerveModuleState[]edu.wpi.first.math.kinematics.SwerveModuleState[]swerveController for the SwerveDrive which can be used to
generate ChassisSpeeds for the robot to orient it correctly given axis or angles, and apply
SlewRateLimiter to given inputs.edu.wpi.first.math.geometry.Pose2d[]getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d robotPose) edu.wpi.first.math.geometry.Pose2d[]getSwerveModulePoses(edu.wpi.first.math.geometry.Pose2d robotPose) edu.wpi.first.math.geometry.Rotation2dgetYaw()edu.wpi.first.math.geometry.Rotation2dgetYaw()voidlockPose()voidlockPose()voidpostTrajectory(edu.wpi.first.math.trajectory.Trajectory trajectory) voidpostTrajectory(edu.wpi.first.math.trajectory.Trajectory trajectory) voidreplaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward feedforward) voidreplaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward feedforward) voidvoidvoidresetOdometry(edu.wpi.first.math.geometry.Pose2d pose) voidresetOdometry(edu.wpi.first.math.geometry.Pose2d pose) voidsetAngleMotorConversionFactor(double conversionFactor) voidsetAngleMotorConversionFactor(double conversionFactor) voidsetChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds) voidsetChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds chassisSpeeds) voidsetDriveMotorConversionFactor(double conversionFactor) voidsetDriveMotorConversionFactor(double conversionFactor) voidsetGyro(edu.wpi.first.math.geometry.Rotation3d gyro) voidsetGyro(edu.wpi.first.math.geometry.Rotation3d gyro) Rotation3d object.voidsetGyroOffset(edu.wpi.first.math.geometry.Rotation3d offset) voidsetGyroOffset(edu.wpi.first.math.geometry.Rotation3d offset) voidsetHeadingCorrection(boolean state) voidsetHeadingCorrection(boolean state) voidsetMaximumSpeed(double maximumSpeed) voidsetMaximumSpeed(double maximumSpeed) maxSpeedMPS which is used for the
setRawModuleStates(SwerveModuleState[], boolean) function and
SwerveController.getTargetSpeeds(double, double, double, double, double) functions.voidsetMaximumSpeed(double maximumSpeed,
+void
+setMaximumSpeed(double maximumSpeed,
boolean updateModuleFeedforward,
double optimalVoltage)
-
+
Set the maximum speed of the drive motors, modified maxSpeedMPS which is used for the
setRawModuleStates(SwerveModuleState[], boolean) function and
SwerveController.getTargetSpeeds(double, double, double, double, double) functions.
-void
-setMaximumSpeeds(double attainableMaxModuleSpeedMetersPerSecond,
+void
+setMaximumSpeeds(double attainableMaxModuleSpeedMetersPerSecond,
double attainableMaxTranslationalSpeedMetersPerSecond,
double attainableMaxRotationalVelocityRadiansPerSecond)
-
+
Set the maximum speeds for desaturation.
-void
-setModuleStateOptimization(boolean optimizationEnabled)
-
+void
+setModuleStateOptimization(boolean optimizationEnabled)
+
Configure whether the SwerveModuleState will be optimized to prevent spinning more than 90deg.
-void
-setModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
+void
+setModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
boolean isOpenLoop)
-
+
Set the module states (azimuth and velocity) directly.
-void
-setMotorIdleMode(boolean brake)
-
+void
+setMotorIdleMode(boolean brake)
+
Sets the drive motors to brake/coast mode.
-void
-setOdometryPeriod(double period)
-
+void
+setOdometryPeriod(double period)
+
Set the odometry update period in seconds.
-private void
-setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
+private void
+setRawModuleStates(edu.wpi.first.math.kinematics.SwerveModuleState[] desiredStates,
boolean isOpenLoop)
-
+
Set the module states (azimuth and velocity) directly.
-void
-
-
+void
+
+
Stop the odometry thread in favor of manually updating odometry.
-void
-
-
+void
+
+
Synchronize angle motor integrated encoders with data from absolute encoders.
-void
-
-
+void
+
+
Update odometry should be run every loop.
-void
-zeroGyro()
-
+void
+zeroGyro()
+
Resets the gyro angle to zero and resets odometry to the same position, but facing toward 0.
@@ -721,6 +743,19 @@ loadScripts(document, 'script');
+
+driveFieldOriented
+public void driveFieldOriented(edu.wpi.first.math.kinematics.ChassisSpeeds velocity,
+ edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters)
+Secondary method of controlling the drive base given velocity and adjusting it for field oriented use.
+
+- Parameters:
+velocity - Velocity of the robot desired.
+centerOfRotationMeters - The center of rotation in meters, 0 is the center of the robot.
+
+
+
+
drive
public void drive(edu.wpi.first.math.kinematics.ChassisSpeeds velocity)
@@ -733,17 +768,42 @@ loadScripts(document, 'script');
-
+
drive
public void drive(edu.wpi.first.math.kinematics.ChassisSpeeds velocity,
- boolean isOpenLoop)
-The primary method for controlling the drivebase. Takes a ChassisSpeeds, and calculates and commands module
- states accordingly. Can use either open-loop or closed-loop velocity control for the wheel velocities. Also has
- field- and robot-relative modes, which affect how the translation vector is used.
+ edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters)
+Secondary method for controlling the drivebase. Given a simple ChassisSpeeds set the swerve module states,
+ to achieve the goal.
- Parameters:
-velocity - The chassis speeds to set the robot to achieve.
+velocity - The desired robot-oriented ChassisSpeeds for the robot to achieve.
+centerOfRotationMeters - The center of rotation in meters, 0 is the center of the robot.
+
+
+
+
+
+drive
+public void drive(edu.wpi.first.math.geometry.Translation2d translation,
+ double rotation,
+ boolean fieldRelative,
+ boolean isOpenLoop,
+ edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters)
+The primary method for controlling the drivebase. Takes a Translation2d and a rotation rate, and calculates
+ and commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel
+ velocities. Also has field- and robot-relative modes, which affect how the translation vector is used.
+
+- Parameters:
+translation - Translation2d that is the commanded linear velocity of the robot, in meters
+ per second. In robot-relative mode, positive x is torwards the bow (front) and
+ positive y is torwards port (left). In field-relative mode, positive x is away from
+ the alliance wall (field North) and positive y is torwards the left wall when looking
+ through the driver station glass (field West).
+rotation - Robot angular rate, in radians per second. CCW positive. Unaffected by field/robot
+ relativity.
+fieldRelative - Drive mode. True for field-relative, false for robot-relative.
isOpenLoop - Whether to use closed-loop velocity control. Set to true to disable closed-loop.
+centerOfRotationMeters - The center of rotation in meters, 0 is the center of the robot.
@@ -772,6 +832,23 @@ loadScripts(document, 'script');
+
+drive
+public void drive(edu.wpi.first.math.kinematics.ChassisSpeeds velocity,
+ boolean isOpenLoop,
+ edu.wpi.first.math.geometry.Translation2d centerOfRotationMeters)
+The primary method for controlling the drivebase. Takes a ChassisSpeeds, and calculates and commands module
+ states accordingly. Can use either open-loop or closed-loop velocity control for the wheel velocities. Also has
+ field- and robot-relative modes, which affect how the translation vector is used.
+
+- Parameters:
+velocity - The chassis speeds to set the robot to achieve.
+isOpenLoop - Whether to use closed-loop velocity control. Set to true to disable closed-loop.
+centerOfRotationMeters - The center of rotation in meters, 0 is the center of the robot.
+
+
+
+
setMaximumSpeeds
public void setMaximumSpeeds(double attainableMaxModuleSpeedMetersPerSecond,
diff --git a/docs/swervelib/SwerveModule.html b/docs/swervelib/SwerveModule.html
index 858e5c5..3750e85 100644
--- a/docs/swervelib/SwerveModule.html
+++ b/docs/swervelib/SwerveModule.html
@@ -1,7 +1,7 @@
-
+
SwerveModule
diff --git a/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html b/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html
index e7f5468..1c4844d 100644
--- a/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html
+++ b/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html
@@ -1,7 +1,7 @@
-
+
AnalogAbsoluteEncoderSwerve
diff --git a/docs/swervelib/encoders/CANCoderSwerve.html b/docs/swervelib/encoders/CANCoderSwerve.html
index 8d50d36..9832c51 100644
--- a/docs/swervelib/encoders/CANCoderSwerve.html
+++ b/docs/swervelib/encoders/CANCoderSwerve.html
@@ -1,7 +1,7 @@
-
+
CANCoderSwerve
diff --git a/docs/swervelib/encoders/CanAndCoderSwerve.html b/docs/swervelib/encoders/CanAndCoderSwerve.html
index 11a35d7..8d7185d 100644
--- a/docs/swervelib/encoders/CanAndCoderSwerve.html
+++ b/docs/swervelib/encoders/CanAndCoderSwerve.html
@@ -1,7 +1,7 @@
-
+
CanAndCoderSwerve
diff --git a/docs/swervelib/encoders/PWMDutyCycleEncoderSwerve.html b/docs/swervelib/encoders/PWMDutyCycleEncoderSwerve.html
index 35e1882..59f3f47 100644
--- a/docs/swervelib/encoders/PWMDutyCycleEncoderSwerve.html
+++ b/docs/swervelib/encoders/PWMDutyCycleEncoderSwerve.html
@@ -1,7 +1,7 @@
-
+
PWMDutyCycleEncoderSwerve
diff --git a/docs/swervelib/encoders/SparkMaxEncoderSwerve.html b/docs/swervelib/encoders/SparkMaxEncoderSwerve.html
index 148e4be..d3e33f3 100644
--- a/docs/swervelib/encoders/SparkMaxEncoderSwerve.html
+++ b/docs/swervelib/encoders/SparkMaxEncoderSwerve.html
@@ -1,7 +1,7 @@
-
+
SparkMaxEncoderSwerve
diff --git a/docs/swervelib/encoders/SwerveAbsoluteEncoder.html b/docs/swervelib/encoders/SwerveAbsoluteEncoder.html
index de18777..4ca7f3d 100644
--- a/docs/swervelib/encoders/SwerveAbsoluteEncoder.html
+++ b/docs/swervelib/encoders/SwerveAbsoluteEncoder.html
@@ -1,7 +1,7 @@
-
+
SwerveAbsoluteEncoder
diff --git a/docs/swervelib/encoders/package-summary.html b/docs/swervelib/encoders/package-summary.html
index c6540d5..4601f7b 100644
--- a/docs/swervelib/encoders/package-summary.html
+++ b/docs/swervelib/encoders/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.encoders
diff --git a/docs/swervelib/encoders/package-tree.html b/docs/swervelib/encoders/package-tree.html
index a63d669..73a5136 100644
--- a/docs/swervelib/encoders/package-tree.html
+++ b/docs/swervelib/encoders/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.encoders Class Hierarchy
diff --git a/docs/swervelib/imu/ADIS16448Swerve.html b/docs/swervelib/imu/ADIS16448Swerve.html
index f1a7ec3..15045b6 100644
--- a/docs/swervelib/imu/ADIS16448Swerve.html
+++ b/docs/swervelib/imu/ADIS16448Swerve.html
@@ -1,7 +1,7 @@
-
+
ADIS16448Swerve
diff --git a/docs/swervelib/imu/ADIS16470Swerve.html b/docs/swervelib/imu/ADIS16470Swerve.html
index 0d5fa0b..dc2de5b 100644
--- a/docs/swervelib/imu/ADIS16470Swerve.html
+++ b/docs/swervelib/imu/ADIS16470Swerve.html
@@ -1,7 +1,7 @@
-
+
ADIS16470Swerve
diff --git a/docs/swervelib/imu/ADXRS450Swerve.html b/docs/swervelib/imu/ADXRS450Swerve.html
index b739a4d..fc5b10c 100644
--- a/docs/swervelib/imu/ADXRS450Swerve.html
+++ b/docs/swervelib/imu/ADXRS450Swerve.html
@@ -1,7 +1,7 @@
-
+
ADXRS450Swerve
diff --git a/docs/swervelib/imu/AnalogGyroSwerve.html b/docs/swervelib/imu/AnalogGyroSwerve.html
index b427f7a..3835fc8 100644
--- a/docs/swervelib/imu/AnalogGyroSwerve.html
+++ b/docs/swervelib/imu/AnalogGyroSwerve.html
@@ -1,7 +1,7 @@
-
+
AnalogGyroSwerve
diff --git a/docs/swervelib/imu/NavXSwerve.html b/docs/swervelib/imu/NavXSwerve.html
index 7343ab1..39ad228 100644
--- a/docs/swervelib/imu/NavXSwerve.html
+++ b/docs/swervelib/imu/NavXSwerve.html
@@ -1,7 +1,7 @@
-
+
NavXSwerve
diff --git a/docs/swervelib/imu/Pigeon2Swerve.html b/docs/swervelib/imu/Pigeon2Swerve.html
index eb1d6c6..2f051f3 100644
--- a/docs/swervelib/imu/Pigeon2Swerve.html
+++ b/docs/swervelib/imu/Pigeon2Swerve.html
@@ -1,7 +1,7 @@
-
+
Pigeon2Swerve
diff --git a/docs/swervelib/imu/PigeonSwerve.html b/docs/swervelib/imu/PigeonSwerve.html
index 6f2a820..a142ba7 100644
--- a/docs/swervelib/imu/PigeonSwerve.html
+++ b/docs/swervelib/imu/PigeonSwerve.html
@@ -1,7 +1,7 @@
-
+
PigeonSwerve
diff --git a/docs/swervelib/imu/SwerveIMU.html b/docs/swervelib/imu/SwerveIMU.html
index d4f7aad..9bb8aab 100644
--- a/docs/swervelib/imu/SwerveIMU.html
+++ b/docs/swervelib/imu/SwerveIMU.html
@@ -1,7 +1,7 @@
-
+
SwerveIMU
diff --git a/docs/swervelib/imu/package-summary.html b/docs/swervelib/imu/package-summary.html
index 9fac4f7..07a06b3 100644
--- a/docs/swervelib/imu/package-summary.html
+++ b/docs/swervelib/imu/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.imu
diff --git a/docs/swervelib/imu/package-tree.html b/docs/swervelib/imu/package-tree.html
index 050186a..484587e 100644
--- a/docs/swervelib/imu/package-tree.html
+++ b/docs/swervelib/imu/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.imu Class Hierarchy
diff --git a/docs/swervelib/math/Matter.html b/docs/swervelib/math/Matter.html
index e62d30b..2095bb6 100644
--- a/docs/swervelib/math/Matter.html
+++ b/docs/swervelib/math/Matter.html
@@ -1,7 +1,7 @@
-
+
Matter
diff --git a/docs/swervelib/math/SwerveMath.html b/docs/swervelib/math/SwerveMath.html
index 3adc36b..2b89d60 100644
--- a/docs/swervelib/math/SwerveMath.html
+++ b/docs/swervelib/math/SwerveMath.html
@@ -1,7 +1,7 @@
-
+
SwerveMath
diff --git a/docs/swervelib/math/package-summary.html b/docs/swervelib/math/package-summary.html
index 0b90eb8..666b99b 100644
--- a/docs/swervelib/math/package-summary.html
+++ b/docs/swervelib/math/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.math
diff --git a/docs/swervelib/math/package-tree.html b/docs/swervelib/math/package-tree.html
index eed75fe..58fb7e6 100644
--- a/docs/swervelib/math/package-tree.html
+++ b/docs/swervelib/math/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.math Class Hierarchy
diff --git a/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html b/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html
index 8204c42..64f26d6 100644
--- a/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html
+++ b/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html
@@ -1,7 +1,7 @@
-
+
SparkMaxBrushedMotorSwerve
diff --git a/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html b/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html
index 5c8dab0..4bee59b 100644
--- a/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html
+++ b/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html
@@ -1,7 +1,7 @@
-
+
SparkMaxSwerve.SparkMAX_slotIdx
diff --git a/docs/swervelib/motors/SparkMaxSwerve.html b/docs/swervelib/motors/SparkMaxSwerve.html
index 4c86c53..210f21e 100644
--- a/docs/swervelib/motors/SparkMaxSwerve.html
+++ b/docs/swervelib/motors/SparkMaxSwerve.html
@@ -1,7 +1,7 @@
-
+
SparkMaxSwerve
diff --git a/docs/swervelib/motors/SwerveMotor.html b/docs/swervelib/motors/SwerveMotor.html
index dab068a..bb8be8a 100644
--- a/docs/swervelib/motors/SwerveMotor.html
+++ b/docs/swervelib/motors/SwerveMotor.html
@@ -1,7 +1,7 @@
-
+
SwerveMotor
diff --git a/docs/swervelib/motors/TalonFXSwerve.html b/docs/swervelib/motors/TalonFXSwerve.html
index 5ad8938..427bd86 100644
--- a/docs/swervelib/motors/TalonFXSwerve.html
+++ b/docs/swervelib/motors/TalonFXSwerve.html
@@ -1,7 +1,7 @@
-
+
TalonFXSwerve
diff --git a/docs/swervelib/motors/TalonSRXSwerve.html b/docs/swervelib/motors/TalonSRXSwerve.html
index 014def2..3b24986 100644
--- a/docs/swervelib/motors/TalonSRXSwerve.html
+++ b/docs/swervelib/motors/TalonSRXSwerve.html
@@ -1,7 +1,7 @@
-
+
TalonSRXSwerve
diff --git a/docs/swervelib/motors/package-summary.html b/docs/swervelib/motors/package-summary.html
index f5ba064..c876d54 100644
--- a/docs/swervelib/motors/package-summary.html
+++ b/docs/swervelib/motors/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.motors
diff --git a/docs/swervelib/motors/package-tree.html b/docs/swervelib/motors/package-tree.html
index 3fbe8ea..670f919 100644
--- a/docs/swervelib/motors/package-tree.html
+++ b/docs/swervelib/motors/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.motors Class Hierarchy
diff --git a/docs/swervelib/package-summary.html b/docs/swervelib/package-summary.html
index 5b3fbb3..8f62a9c 100644
--- a/docs/swervelib/package-summary.html
+++ b/docs/swervelib/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib
diff --git a/docs/swervelib/package-tree.html b/docs/swervelib/package-tree.html
index efb96e0..2ffb067 100644
--- a/docs/swervelib/package-tree.html
+++ b/docs/swervelib/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib Class Hierarchy
diff --git a/docs/swervelib/parser/PIDFConfig.html b/docs/swervelib/parser/PIDFConfig.html
index 79bd299..614a19c 100644
--- a/docs/swervelib/parser/PIDFConfig.html
+++ b/docs/swervelib/parser/PIDFConfig.html
@@ -1,7 +1,7 @@
-
+
PIDFConfig
diff --git a/docs/swervelib/parser/SwerveControllerConfiguration.html b/docs/swervelib/parser/SwerveControllerConfiguration.html
index ed0d78f..97d713d 100644
--- a/docs/swervelib/parser/SwerveControllerConfiguration.html
+++ b/docs/swervelib/parser/SwerveControllerConfiguration.html
@@ -1,7 +1,7 @@
-
+
SwerveControllerConfiguration
diff --git a/docs/swervelib/parser/SwerveDriveConfiguration.html b/docs/swervelib/parser/SwerveDriveConfiguration.html
index 5087f5d..9d05edb 100644
--- a/docs/swervelib/parser/SwerveDriveConfiguration.html
+++ b/docs/swervelib/parser/SwerveDriveConfiguration.html
@@ -1,7 +1,7 @@
-
+
SwerveDriveConfiguration
diff --git a/docs/swervelib/parser/SwerveModuleConfiguration.html b/docs/swervelib/parser/SwerveModuleConfiguration.html
index 577e06b..b274536 100644
--- a/docs/swervelib/parser/SwerveModuleConfiguration.html
+++ b/docs/swervelib/parser/SwerveModuleConfiguration.html
@@ -1,7 +1,7 @@
-
+
SwerveModuleConfiguration
diff --git a/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html b/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html
index 9f753c9..e58fa22 100644
--- a/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html
+++ b/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html
@@ -1,7 +1,7 @@
-
+
SwerveModulePhysicalCharacteristics
diff --git a/docs/swervelib/parser/SwerveParser.html b/docs/swervelib/parser/SwerveParser.html
index e670b1f..dd9e668 100644
--- a/docs/swervelib/parser/SwerveParser.html
+++ b/docs/swervelib/parser/SwerveParser.html
@@ -1,7 +1,7 @@
-
+
SwerveParser
diff --git a/docs/swervelib/parser/deserializer/PIDFRange.html b/docs/swervelib/parser/deserializer/PIDFRange.html
index fcec438..7cbc44b 100644
--- a/docs/swervelib/parser/deserializer/PIDFRange.html
+++ b/docs/swervelib/parser/deserializer/PIDFRange.html
@@ -1,7 +1,7 @@
-
+
PIDFRange
diff --git a/docs/swervelib/parser/deserializer/package-summary.html b/docs/swervelib/parser/deserializer/package-summary.html
index 74269d4..73f9c92 100644
--- a/docs/swervelib/parser/deserializer/package-summary.html
+++ b/docs/swervelib/parser/deserializer/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser.deserializer
diff --git a/docs/swervelib/parser/deserializer/package-tree.html b/docs/swervelib/parser/deserializer/package-tree.html
index 78823fd..3603167 100644
--- a/docs/swervelib/parser/deserializer/package-tree.html
+++ b/docs/swervelib/parser/deserializer/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser.deserializer Class Hierarchy
diff --git a/docs/swervelib/parser/json/ControllerPropertiesJson.html b/docs/swervelib/parser/json/ControllerPropertiesJson.html
index 8a9e793..68336ff 100644
--- a/docs/swervelib/parser/json/ControllerPropertiesJson.html
+++ b/docs/swervelib/parser/json/ControllerPropertiesJson.html
@@ -1,7 +1,7 @@
-
+
ControllerPropertiesJson
diff --git a/docs/swervelib/parser/json/DeviceJson.html b/docs/swervelib/parser/json/DeviceJson.html
index c5e9c43..453ab27 100644
--- a/docs/swervelib/parser/json/DeviceJson.html
+++ b/docs/swervelib/parser/json/DeviceJson.html
@@ -1,7 +1,7 @@
-
+
DeviceJson
diff --git a/docs/swervelib/parser/json/ModuleJson.html b/docs/swervelib/parser/json/ModuleJson.html
index d28b64d..d30a7ab 100644
--- a/docs/swervelib/parser/json/ModuleJson.html
+++ b/docs/swervelib/parser/json/ModuleJson.html
@@ -1,7 +1,7 @@
-
+
ModuleJson
diff --git a/docs/swervelib/parser/json/MotorConfigDouble.html b/docs/swervelib/parser/json/MotorConfigDouble.html
index 397c4bd..012ad11 100644
--- a/docs/swervelib/parser/json/MotorConfigDouble.html
+++ b/docs/swervelib/parser/json/MotorConfigDouble.html
@@ -1,7 +1,7 @@
-
+
MotorConfigDouble
diff --git a/docs/swervelib/parser/json/MotorConfigInt.html b/docs/swervelib/parser/json/MotorConfigInt.html
index 695dfe1..473b293 100644
--- a/docs/swervelib/parser/json/MotorConfigInt.html
+++ b/docs/swervelib/parser/json/MotorConfigInt.html
@@ -1,7 +1,7 @@
-
+
MotorConfigInt
diff --git a/docs/swervelib/parser/json/PIDFPropertiesJson.html b/docs/swervelib/parser/json/PIDFPropertiesJson.html
index 63d16b1..d2e3304 100644
--- a/docs/swervelib/parser/json/PIDFPropertiesJson.html
+++ b/docs/swervelib/parser/json/PIDFPropertiesJson.html
@@ -1,7 +1,7 @@
-
+
PIDFPropertiesJson
diff --git a/docs/swervelib/parser/json/PhysicalPropertiesJson.html b/docs/swervelib/parser/json/PhysicalPropertiesJson.html
index f61df75..b4f9049 100644
--- a/docs/swervelib/parser/json/PhysicalPropertiesJson.html
+++ b/docs/swervelib/parser/json/PhysicalPropertiesJson.html
@@ -1,7 +1,7 @@
-
+
PhysicalPropertiesJson
diff --git a/docs/swervelib/parser/json/SwerveDriveJson.html b/docs/swervelib/parser/json/SwerveDriveJson.html
index 480fa84..336e278 100644
--- a/docs/swervelib/parser/json/SwerveDriveJson.html
+++ b/docs/swervelib/parser/json/SwerveDriveJson.html
@@ -1,7 +1,7 @@
-
+
SwerveDriveJson
diff --git a/docs/swervelib/parser/json/modules/BoolMotorJson.html b/docs/swervelib/parser/json/modules/BoolMotorJson.html
index 455425a..96d7588 100644
--- a/docs/swervelib/parser/json/modules/BoolMotorJson.html
+++ b/docs/swervelib/parser/json/modules/BoolMotorJson.html
@@ -1,7 +1,7 @@
-
+
BoolMotorJson
diff --git a/docs/swervelib/parser/json/modules/LocationJson.html b/docs/swervelib/parser/json/modules/LocationJson.html
index 3d64c68..cbac0d3 100644
--- a/docs/swervelib/parser/json/modules/LocationJson.html
+++ b/docs/swervelib/parser/json/modules/LocationJson.html
@@ -1,7 +1,7 @@
-
+
LocationJson
diff --git a/docs/swervelib/parser/json/modules/package-summary.html b/docs/swervelib/parser/json/modules/package-summary.html
index 5b22ae5..de17138 100644
--- a/docs/swervelib/parser/json/modules/package-summary.html
+++ b/docs/swervelib/parser/json/modules/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser.json.modules
diff --git a/docs/swervelib/parser/json/modules/package-tree.html b/docs/swervelib/parser/json/modules/package-tree.html
index 1b4efab..2eef59a 100644
--- a/docs/swervelib/parser/json/modules/package-tree.html
+++ b/docs/swervelib/parser/json/modules/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser.json.modules Class Hierarchy
diff --git a/docs/swervelib/parser/json/package-summary.html b/docs/swervelib/parser/json/package-summary.html
index 2911e6e..cb51d21 100644
--- a/docs/swervelib/parser/json/package-summary.html
+++ b/docs/swervelib/parser/json/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser.json
diff --git a/docs/swervelib/parser/json/package-tree.html b/docs/swervelib/parser/json/package-tree.html
index 83cc38f..2eea327 100644
--- a/docs/swervelib/parser/json/package-tree.html
+++ b/docs/swervelib/parser/json/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser.json Class Hierarchy
diff --git a/docs/swervelib/parser/package-summary.html b/docs/swervelib/parser/package-summary.html
index 3496e01..cae3bf2 100644
--- a/docs/swervelib/parser/package-summary.html
+++ b/docs/swervelib/parser/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser
diff --git a/docs/swervelib/parser/package-tree.html b/docs/swervelib/parser/package-tree.html
index 69d9133..14b8a6d 100644
--- a/docs/swervelib/parser/package-tree.html
+++ b/docs/swervelib/parser/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.parser Class Hierarchy
diff --git a/docs/swervelib/simulation/SwerveIMUSimulation.html b/docs/swervelib/simulation/SwerveIMUSimulation.html
index 2e32b5a..cf41bf8 100644
--- a/docs/swervelib/simulation/SwerveIMUSimulation.html
+++ b/docs/swervelib/simulation/SwerveIMUSimulation.html
@@ -1,7 +1,7 @@
-
+
SwerveIMUSimulation
diff --git a/docs/swervelib/simulation/SwerveModuleSimulation.html b/docs/swervelib/simulation/SwerveModuleSimulation.html
index e00ff5a..4c059e4 100644
--- a/docs/swervelib/simulation/SwerveModuleSimulation.html
+++ b/docs/swervelib/simulation/SwerveModuleSimulation.html
@@ -1,7 +1,7 @@
-
+
SwerveModuleSimulation
diff --git a/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html b/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html
index bd21051..76798ec 100644
--- a/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html
+++ b/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html
@@ -1,7 +1,7 @@
-
+
PhysicsSim.SimProfile
diff --git a/docs/swervelib/simulation/ctre/PhysicsSim.html b/docs/swervelib/simulation/ctre/PhysicsSim.html
index 48bcb1d..79f4ee5 100644
--- a/docs/swervelib/simulation/ctre/PhysicsSim.html
+++ b/docs/swervelib/simulation/ctre/PhysicsSim.html
@@ -1,7 +1,7 @@
-
+
PhysicsSim
diff --git a/docs/swervelib/simulation/ctre/TalonFXSimProfile.html b/docs/swervelib/simulation/ctre/TalonFXSimProfile.html
index 20bfaca..665d5aa 100644
--- a/docs/swervelib/simulation/ctre/TalonFXSimProfile.html
+++ b/docs/swervelib/simulation/ctre/TalonFXSimProfile.html
@@ -1,7 +1,7 @@
-
+
TalonFXSimProfile
diff --git a/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html b/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html
index 43bd8cd..0122249 100644
--- a/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html
+++ b/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html
@@ -1,7 +1,7 @@
-
+
TalonSRXSimProfile
diff --git a/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html b/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html
index 1c6c00d..c445274 100644
--- a/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html
+++ b/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html
@@ -1,7 +1,7 @@
-
+
VictorSPXSimProfile
diff --git a/docs/swervelib/simulation/ctre/package-summary.html b/docs/swervelib/simulation/ctre/package-summary.html
index 1d8c524..ed6fedc 100644
--- a/docs/swervelib/simulation/ctre/package-summary.html
+++ b/docs/swervelib/simulation/ctre/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.simulation.ctre
diff --git a/docs/swervelib/simulation/ctre/package-tree.html b/docs/swervelib/simulation/ctre/package-tree.html
index 1ecd984..70123fd 100644
--- a/docs/swervelib/simulation/ctre/package-tree.html
+++ b/docs/swervelib/simulation/ctre/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.simulation.ctre Class Hierarchy
diff --git a/docs/swervelib/simulation/package-summary.html b/docs/swervelib/simulation/package-summary.html
index 7338b3e..a5b5303 100644
--- a/docs/swervelib/simulation/package-summary.html
+++ b/docs/swervelib/simulation/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.simulation
diff --git a/docs/swervelib/simulation/package-tree.html b/docs/swervelib/simulation/package-tree.html
index 3996ea9..37217e0 100644
--- a/docs/swervelib/simulation/package-tree.html
+++ b/docs/swervelib/simulation/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.simulation Class Hierarchy
diff --git a/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html b/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html
index 6a298d4..1893448 100644
--- a/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html
+++ b/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html
@@ -1,7 +1,7 @@
-
+
SwerveDriveTelemetry.TelemetryVerbosity
diff --git a/docs/swervelib/telemetry/SwerveDriveTelemetry.html b/docs/swervelib/telemetry/SwerveDriveTelemetry.html
index 758595e..bfa19a5 100644
--- a/docs/swervelib/telemetry/SwerveDriveTelemetry.html
+++ b/docs/swervelib/telemetry/SwerveDriveTelemetry.html
@@ -1,7 +1,7 @@
-
+
SwerveDriveTelemetry
diff --git a/docs/swervelib/telemetry/package-summary.html b/docs/swervelib/telemetry/package-summary.html
index 8bb720d..cde7afe 100644
--- a/docs/swervelib/telemetry/package-summary.html
+++ b/docs/swervelib/telemetry/package-summary.html
@@ -1,7 +1,7 @@
-
+
swervelib.telemetry
diff --git a/docs/swervelib/telemetry/package-tree.html b/docs/swervelib/telemetry/package-tree.html
index d2748bc..f1c716e 100644
--- a/docs/swervelib/telemetry/package-tree.html
+++ b/docs/swervelib/telemetry/package-tree.html
@@ -1,7 +1,7 @@
-
+
swervelib.telemetry Class Hierarchy
diff --git a/swervelib/SwerveDrive.java b/swervelib/SwerveDrive.java
index 5d759fd..043c71d 100644
--- a/swervelib/SwerveDrive.java
+++ b/swervelib/SwerveDrive.java
@@ -285,6 +285,18 @@ public class SwerveDrive
drive(fieldOrientedVelocity);
}
+ /**
+ * Secondary method of controlling the drive base given velocity and adjusting it for field oriented use.
+ *
+ * @param velocity Velocity of the robot desired.
+ * @param centerOfRotationMeters The center of rotation in meters, 0 is the center of the robot.
+ */
+ public void driveFieldOriented(ChassisSpeeds velocity, Translation2d centerOfRotationMeters)
+ {
+ ChassisSpeeds fieldOrientedVelocity = ChassisSpeeds.fromFieldRelativeSpeeds(velocity, getYaw());
+ drive(fieldOrientedVelocity, centerOfRotationMeters);
+ }
+
/**
* Secondary method for controlling the drivebase. Given a simple {@link ChassisSpeeds} set the swerve module states,
* to achieve the goal.
@@ -293,7 +305,79 @@ public class SwerveDrive
*/
public void drive(ChassisSpeeds velocity)
{
- drive(velocity, false);
+ drive(velocity, false, new Translation2d());
+ }
+
+ /**
+ * Secondary method for controlling the drivebase. Given a simple {@link ChassisSpeeds} set the swerve module states,
+ * to achieve the goal.
+ *
+ * @param velocity The desired robot-oriented {@link ChassisSpeeds} for the robot to achieve.
+ * @param centerOfRotationMeters The center of rotation in meters, 0 is the center of the robot.
+ */
+ public void drive(ChassisSpeeds velocity, Translation2d centerOfRotationMeters)
+ {
+ drive(velocity, false, centerOfRotationMeters);
+ }
+
+ /**
+ * The primary method for controlling the drivebase. Takes a {@link Translation2d} and a rotation rate, and calculates
+ * and commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel
+ * velocities. Also has field- and robot-relative modes, which affect how the translation vector is used.
+ *
+ * @param translation {@link Translation2d} that is the commanded linear velocity of the robot, in meters
+ * per second. In robot-relative mode, positive x is torwards the bow (front) and
+ * positive y is torwards port (left). In field-relative mode, positive x is away from
+ * the alliance wall (field North) and positive y is torwards the left wall when looking
+ * through the driver station glass (field West).
+ * @param rotation Robot angular rate, in radians per second. CCW positive. Unaffected by field/robot
+ * relativity.
+ * @param fieldRelative Drive mode. True for field-relative, false for robot-relative.
+ * @param isOpenLoop Whether to use closed-loop velocity control. Set to true to disable closed-loop.
+ * @param centerOfRotationMeters The center of rotation in meters, 0 is the center of the robot.
+ */
+ public void drive(
+ Translation2d translation, double rotation, boolean fieldRelative, boolean isOpenLoop,
+ Translation2d centerOfRotationMeters)
+ {
+ // Creates a robot-relative ChassisSpeeds object, converting from field-relative speeds if
+ // necessary.
+ ChassisSpeeds velocity =
+ fieldRelative
+ ? ChassisSpeeds.fromFieldRelativeSpeeds(
+ translation.getX(), translation.getY(), rotation, getYaw())
+ : new ChassisSpeeds(translation.getX(), translation.getY(), rotation);
+
+ drive(velocity, isOpenLoop, centerOfRotationMeters);
+ }
+
+ /**
+ * The primary method for controlling the drivebase. Takes a {@link Translation2d} and a rotation rate, and calculates
+ * and commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel
+ * velocities. Also has field- and robot-relative modes, which affect how the translation vector is used.
+ *
+ * @param translation {@link Translation2d} that is the commanded linear velocity of the robot, in meters per
+ * second. In robot-relative mode, positive x is torwards the bow (front) and positive y is
+ * torwards port (left). In field-relative mode, positive x is away from the alliance wall (field
+ * North) and positive y is torwards the left wall when looking through the driver station glass
+ * (field West).
+ * @param rotation Robot angular rate, in radians per second. CCW positive. Unaffected by field/robot
+ * relativity.
+ * @param fieldRelative Drive mode. True for field-relative, false for robot-relative.
+ * @param isOpenLoop Whether to use closed-loop velocity control. Set to true to disable closed-loop.
+ */
+ public void drive(
+ Translation2d translation, double rotation, boolean fieldRelative, boolean isOpenLoop)
+ {
+ // Creates a robot-relative ChassisSpeeds object, converting from field-relative speeds if
+ // necessary.
+ ChassisSpeeds velocity =
+ fieldRelative
+ ? ChassisSpeeds.fromFieldRelativeSpeeds(
+ translation.getX(), translation.getY(), rotation, getYaw())
+ : new ChassisSpeeds(translation.getX(), translation.getY(), rotation);
+
+ drive(velocity, isOpenLoop, new Translation2d());
}
/**
@@ -301,10 +385,11 @@ public class SwerveDrive
* states accordingly. Can use either open-loop or closed-loop velocity control for the wheel velocities. Also has
* field- and robot-relative modes, which affect how the translation vector is used.
*
- * @param velocity The chassis speeds to set the robot to achieve.
- * @param isOpenLoop Whether to use closed-loop velocity control. Set to true to disable closed-loop.
+ * @param velocity The chassis speeds to set the robot to achieve.
+ * @param isOpenLoop Whether to use closed-loop velocity control. Set to true to disable closed-loop.
+ * @param centerOfRotationMeters The center of rotation in meters, 0 is the center of the robot.
*/
- public void drive(ChassisSpeeds velocity, boolean isOpenLoop)
+ public void drive(ChassisSpeeds velocity, boolean isOpenLoop, Translation2d centerOfRotationMeters)
{
// Thank you to Jared Russell FRC254 for Open Loop Compensation Code
@@ -348,39 +433,11 @@ public class SwerveDrive
}
// Calculate required module states via kinematics
- SwerveModuleState[] swerveModuleStates = kinematics.toSwerveModuleStates(velocity);
+ SwerveModuleState[] swerveModuleStates = kinematics.toSwerveModuleStates(velocity, centerOfRotationMeters);
setRawModuleStates(swerveModuleStates, isOpenLoop);
}
- /**
- * The primary method for controlling the drivebase. Takes a {@link Translation2d} and a rotation rate, and calculates
- * and commands module states accordingly. Can use either open-loop or closed-loop velocity control for the wheel
- * velocities. Also has field- and robot-relative modes, which affect how the translation vector is used.
- *
- * @param translation {@link Translation2d} that is the commanded linear velocity of the robot, in meters per
- * second. In robot-relative mode, positive x is torwards the bow (front) and positive y is
- * torwards port (left). In field-relative mode, positive x is away from the alliance wall (field
- * North) and positive y is torwards the left wall when looking through the driver station glass
- * (field West).
- * @param rotation Robot angular rate, in radians per second. CCW positive. Unaffected by field/robot
- * relativity.
- * @param fieldRelative Drive mode. True for field-relative, false for robot-relative.
- * @param isOpenLoop Whether to use closed-loop velocity control. Set to true to disable closed-loop.
- */
- public void drive(
- Translation2d translation, double rotation, boolean fieldRelative, boolean isOpenLoop)
- {
- // Creates a robot-relative ChassisSpeeds object, converting from field-relative speeds if
- // necessary.
- ChassisSpeeds velocity =
- fieldRelative
- ? ChassisSpeeds.fromFieldRelativeSpeeds(
- translation.getX(), translation.getY(), rotation, getYaw())
- : new ChassisSpeeds(translation.getX(), translation.getY(), rotation);
-
- drive(velocity, isOpenLoop);
- }
/**
* Set the maximum speeds for desaturation.
diff --git a/swervelib/imu/NavXSwerve.java b/swervelib/imu/NavXSwerve.java
index 7aad259..e34bc26 100644
--- a/swervelib/imu/NavXSwerve.java
+++ b/swervelib/imu/NavXSwerve.java
@@ -127,10 +127,11 @@ public class NavXSwerve extends SwerveIMU
*/
public Rotation3d getRawRotation3d()
{
- return new Rotation3d(new Quaternion(gyro.getQuaternionW(),
- gyro.getQuaternionX(),
- gyro.getQuaternionY(),
- gyro.getQuaternionZ()));
+ return new Rotation3d(new Quaternion(gyro.getQuaternionW() * 0.5,
+ gyro.getQuaternionX() * 0.5,
+ gyro.getQuaternionY() * 0.5,
+ gyro.getQuaternionZ() *
+ 0.5)); // TODO: Remove when Studica's official release is made.
}
/**
diff --git a/swervelib/motors/SparkMaxSwerve.java b/swervelib/motors/SparkMaxSwerve.java
index 0df0b4c..33eabbb 100644
--- a/swervelib/motors/SparkMaxSwerve.java
+++ b/swervelib/motors/SparkMaxSwerve.java
@@ -181,6 +181,10 @@ public class SparkMaxSwerve extends SwerveMotor
{
if (encoder.getAbsoluteEncoder() instanceof AbsoluteEncoder)
{
+ DriverStation.reportWarning(
+ "IF possible configure the duty cycle encoder offset in the REV Hardware Client instead of using the" +
+ " absoluteEncoderOffset in the Swerve Module JSON!",
+ false);
absoluteEncoder = (AbsoluteEncoder) encoder.getAbsoluteEncoder();
configureSparkMax(() -> pid.setFeedbackDevice(absoluteEncoder));
}
diff --git a/swervelib/parser/json/DeviceJson.java b/swervelib/parser/json/DeviceJson.java
index 72c79de..de9685d 100644
--- a/swervelib/parser/json/DeviceJson.java
+++ b/swervelib/parser/json/DeviceJson.java
@@ -53,6 +53,11 @@ public class DeviceJson
*/
public SwerveAbsoluteEncoder createEncoder(SwerveMotor motor)
{
+ if (id > 40)
+ {
+ DriverStation.reportWarning("CAN IDs greater than 40 can cause undefined behaviour, please use a CAN ID below 40!",
+ false);
+ }
switch (type)
{
case "none":
@@ -87,6 +92,11 @@ public class DeviceJson
*/
public SwerveIMU createIMU()
{
+ if (id > 40)
+ {
+ DriverStation.reportWarning("CAN IDs greater than 40 can cause undefined behaviour, please use a CAN ID below 40!",
+ false);
+ }
switch (type)
{
case "adis16448":
@@ -130,6 +140,11 @@ public class DeviceJson
*/
public SwerveMotor createMotor(boolean isDriveMotor)
{
+ if (id > 40)
+ {
+ DriverStation.reportWarning("CAN IDs greater than 40 can cause undefined behaviour, please use a CAN ID below 40!",
+ false);
+ }
switch (type)
{
case "sparkmax_brushed":