Files
2022NoWayHome/src/main/java/frc4388/robot/RobotMap.java
T

303 lines
16 KiB
Java
Raw Normal View History

2022-01-11 11:05:52 -07:00
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
2021-11-15 16:26:16 -07:00
package frc4388.robot;
2022-03-05 15:15:41 -07:00
2022-01-28 16:40:49 -07:00
import com.ctre.phoenix.motorcontrol.LimitSwitchNormal;
2021-11-15 16:26:16 -07:00
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
2021-12-02 17:24:41 -07:00
import com.ctre.phoenix.sensors.CANCoder;
2022-03-16 14:49:41 -06:00
import com.ctre.phoenix.sensors.WPI_Pigeon2;
2022-01-18 20:00:03 -07:00
import com.ctre.phoenix.sensors.WPI_PigeonIMU;
import com.ctre.phoenix.motorcontrol.NeutralMode;
import com.ctre.phoenix.motorcontrol.RemoteSensorSource;
2022-02-17 19:53:06 -07:00
import com.ctre.phoenix.motorcontrol.StatorCurrentLimitConfiguration;
import com.ctre.phoenix.motorcontrol.SupplyCurrentLimitConfiguration;
2021-11-15 16:26:16 -07:00
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
2021-12-02 17:24:41 -07:00
import com.ctre.phoenix.sensors.CANCoder;
2022-03-14 18:29:11 -06:00
import com.ctre.phoenix.sensors.WPI_Pigeon2;
2022-01-28 16:40:49 -07:00
import com.revrobotics.CANSparkMax;
2022-03-06 00:24:47 -07:00
import com.revrobotics.CANSparkMax.IdleMode;
2022-01-28 16:40:49 -07:00
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
import edu.wpi.first.wpilibj.CAN;
2022-03-12 11:36:10 -07:00
import edu.wpi.first.networktables.NetworkTableType;
2022-01-28 16:40:49 -07:00
import edu.wpi.first.wpilibj.DigitalInput;
2022-01-21 17:20:31 -07:00
import edu.wpi.first.wpilibj.Servo;
2022-01-11 11:05:52 -07:00
import edu.wpi.first.wpilibj.motorcontrol.Spark;
2022-01-15 15:56:17 -07:00
import frc4388.robot.Constants.ClimberConstants;
2022-03-05 14:21:48 -07:00
import frc4388.robot.Constants.ClawConstants;
2022-03-05 15:32:48 -07:00
import frc4388.robot.Constants.IntakeConstants;
2021-11-15 16:26:16 -07:00
import frc4388.robot.Constants.LEDConstants;
2022-01-20 18:13:07 -07:00
import frc4388.robot.Constants.ShooterConstants;
2022-01-15 14:26:36 -07:00
import frc4388.robot.Constants.SerializerConstants;
2022-02-26 15:41:54 -07:00
import frc4388.robot.Constants.StorageConstants;
2021-11-29 17:18:31 -07:00
import frc4388.robot.Constants.SwerveDriveConstants;
2022-01-24 19:06:28 -07:00
import frc4388.robot.subsystems.SwerveModule;
2021-11-15 16:26:16 -07:00
/**
* Defines and holds all I/O objects on the Roborio. This is useful for unit
* testing and modularization.
*/
public class RobotMap {
2022-01-11 11:05:52 -07:00
public RobotMap() {
2022-03-06 11:14:30 -07:00
// configureLEDMotorControllers();
2022-02-28 19:08:59 -07:00
configureSwerveMotorControllers();
2022-03-05 15:15:41 -07:00
configureShooterMotorControllers();
2022-03-12 20:39:04 -07:00
configureIntakeMotors();
configureExtenderMotors();
configureSerializerMotors();
configureStorageMotors();
2022-01-11 11:05:52 -07:00
}
2021-11-15 16:26:16 -07:00
2022-01-11 11:05:52 -07:00
/* LED Subsystem */
2022-03-06 11:14:30 -07:00
// public final Spark LEDController = new Spark(LEDConstants.LED_SPARK_ID);
2022-03-06 11:14:30 -07:00
// void configureLEDMotorControllers() {}
2021-11-15 16:26:16 -07:00
2022-01-11 11:05:52 -07:00
/* Swerve Subsystem */
public final WPI_TalonFX leftFrontSteerMotor = new WPI_TalonFX(SwerveDriveConstants.LEFT_FRONT_STEER_CAN_ID);
public final WPI_TalonFX leftFrontWheelMotor = new WPI_TalonFX(SwerveDriveConstants.LEFT_FRONT_WHEEL_CAN_ID);
public final WPI_TalonFX rightFrontSteerMotor = new WPI_TalonFX(SwerveDriveConstants.RIGHT_FRONT_STEER_CAN_ID);
public final WPI_TalonFX rightFrontWheelMotor = new WPI_TalonFX(SwerveDriveConstants.RIGHT_FRONT_WHEEL_CAN_ID);
public final WPI_TalonFX leftBackSteerMotor = new WPI_TalonFX(SwerveDriveConstants.LEFT_BACK_STEER_CAN_ID);
public final WPI_TalonFX leftBackWheelMotor = new WPI_TalonFX(SwerveDriveConstants.LEFT_BACK_WHEEL_CAN_ID);
public final WPI_TalonFX rightBackSteerMotor = new WPI_TalonFX(SwerveDriveConstants.RIGHT_BACK_STEER_CAN_ID);
public final WPI_TalonFX rightBackWheelMotor = new WPI_TalonFX(SwerveDriveConstants.RIGHT_BACK_WHEEL_CAN_ID);
public final CANCoder leftFrontEncoder = new CANCoder(SwerveDriveConstants.LEFT_FRONT_STEER_CAN_ENCODER_ID);
public final CANCoder rightFrontEncoder = new CANCoder(SwerveDriveConstants.RIGHT_FRONT_STEER_CAN_ENCODER_ID);
public final CANCoder leftBackEncoder = new CANCoder(SwerveDriveConstants.LEFT_BACK_STEER_CAN_ENCODER_ID);
public final CANCoder rightBackEncoder = new CANCoder(SwerveDriveConstants.RIGHT_BACK_STEER_CAN_ENCODER_ID);
2022-03-16 14:49:41 -06:00
public final WPI_Pigeon2 gyro = new WPI_Pigeon2(SwerveDriveConstants.GYRO_ID);
2022-01-24 17:40:03 -07:00
2022-01-24 19:06:28 -07:00
public SwerveModule leftFront;
public SwerveModule leftBack;
public SwerveModule rightFront;
public SwerveModule rightBack;
2022-01-11 11:05:52 -07:00
void configureSwerveMotorControllers() {
leftFrontSteerMotor.configFactoryDefault();
leftFrontWheelMotor.configFactoryDefault();
rightFrontSteerMotor.configFactoryDefault();
rightFrontWheelMotor.configFactoryDefault();
leftBackSteerMotor.configFactoryDefault();
leftBackWheelMotor.configFactoryDefault();
rightBackSteerMotor.configFactoryDefault();
rightBackWheelMotor.configFactoryDefault();
2022-03-05 11:12:33 -07:00
leftFrontSteerMotor.configOpenloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftFrontWheelMotor.configOpenloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightFrontSteerMotor.configOpenloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightFrontWheelMotor.configOpenloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftBackSteerMotor.configOpenloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftBackWheelMotor.configOpenloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightBackSteerMotor.configOpenloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightBackWheelMotor.configOpenloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftFrontWheelMotor.configClosedloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftFrontSteerMotor.configClosedloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightFrontSteerMotor.configClosedloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightFrontWheelMotor.configClosedloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftBackSteerMotor.configClosedloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftBackWheelMotor.configClosedloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightBackSteerMotor.configClosedloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightBackWheelMotor.configClosedloopRamp(SwerveDriveConstants.OPEN_LOOP_RAMP_RATE,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftFrontWheelMotor.configNeutralDeadband(SwerveDriveConstants.NEUTRAL_DEADBAND,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftFrontSteerMotor.configNeutralDeadband(SwerveDriveConstants.NEUTRAL_DEADBAND,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightFrontSteerMotor.configNeutralDeadband(SwerveDriveConstants.NEUTRAL_DEADBAND,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightFrontWheelMotor.configNeutralDeadband(SwerveDriveConstants.NEUTRAL_DEADBAND,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftBackSteerMotor.configNeutralDeadband(SwerveDriveConstants.NEUTRAL_DEADBAND,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
leftBackWheelMotor.configNeutralDeadband(SwerveDriveConstants.NEUTRAL_DEADBAND,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightBackSteerMotor.configNeutralDeadband(SwerveDriveConstants.NEUTRAL_DEADBAND,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
rightBackWheelMotor.configNeutralDeadband(SwerveDriveConstants.NEUTRAL_DEADBAND,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
2022-02-28 19:08:59 -07:00
2022-02-19 15:48:39 -07:00
NeutralMode mode = NeutralMode.Coast;
2022-02-19 11:16:24 -07:00
leftFrontSteerMotor.setNeutralMode(mode);
2022-03-05 11:12:33 -07:00
leftFrontWheelMotor.setNeutralMode(mode);// Coast
2022-02-19 11:16:24 -07:00
rightFrontSteerMotor.setNeutralMode(mode);
2022-03-05 11:12:33 -07:00
rightFrontWheelMotor.setNeutralMode(mode);// Coast
2022-02-19 11:16:24 -07:00
leftBackSteerMotor.setNeutralMode(mode);
2022-03-05 11:12:33 -07:00
leftBackWheelMotor.setNeutralMode(mode);// Coast
2022-02-19 11:16:24 -07:00
rightBackSteerMotor.setNeutralMode(mode);
2022-03-05 11:12:33 -07:00
rightBackWheelMotor.setNeutralMode(mode);// Coast
2022-01-11 11:05:52 -07:00
2022-03-12 17:32:10 -07:00
// current limits
leftFrontSteerMotor.configSupplyCurrentLimit(SwerveDriveConstants.SUPPLY_CURRENT_LIMIT_CONFIG_STEER);
rightFrontSteerMotor.configSupplyCurrentLimit(SwerveDriveConstants.SUPPLY_CURRENT_LIMIT_CONFIG_STEER);
leftBackSteerMotor.configSupplyCurrentLimit(SwerveDriveConstants.SUPPLY_CURRENT_LIMIT_CONFIG_STEER);
rightBackSteerMotor.configSupplyCurrentLimit(SwerveDriveConstants.SUPPLY_CURRENT_LIMIT_CONFIG_STEER);
leftFrontWheelMotor.configSupplyCurrentLimit(SwerveDriveConstants.SUPPLY_CURRENT_LIMIT_CONFIG_WHEEL);
rightFrontWheelMotor.configSupplyCurrentLimit(SwerveDriveConstants.SUPPLY_CURRENT_LIMIT_CONFIG_WHEEL);
leftBackWheelMotor.configSupplyCurrentLimit(SwerveDriveConstants.SUPPLY_CURRENT_LIMIT_CONFIG_WHEEL);
rightBackWheelMotor.configSupplyCurrentLimit(SwerveDriveConstants.SUPPLY_CURRENT_LIMIT_CONFIG_WHEEL);
leftFrontSteerMotor.configStatorCurrentLimit(SwerveDriveConstants.STATOR_CURRENT_LIMIT_CONFIG_STEER);
rightFrontSteerMotor.configStatorCurrentLimit(SwerveDriveConstants.STATOR_CURRENT_LIMIT_CONFIG_STEER);
leftBackSteerMotor.configStatorCurrentLimit(SwerveDriveConstants.STATOR_CURRENT_LIMIT_CONFIG_STEER);
rightBackSteerMotor.configStatorCurrentLimit(SwerveDriveConstants.STATOR_CURRENT_LIMIT_CONFIG_STEER);
leftFrontWheelMotor.configStatorCurrentLimit(SwerveDriveConstants.STATOR_CURRENT_LIMIT_CONFIG_WHEEL);
rightFrontWheelMotor.configStatorCurrentLimit(SwerveDriveConstants.STATOR_CURRENT_LIMIT_CONFIG_WHEEL);
leftBackWheelMotor.configStatorCurrentLimit(SwerveDriveConstants.STATOR_CURRENT_LIMIT_CONFIG_WHEEL);
rightBackWheelMotor.configStatorCurrentLimit(SwerveDriveConstants.STATOR_CURRENT_LIMIT_CONFIG_WHEEL);
2022-03-05 11:12:33 -07:00
leftFront = new SwerveModule(leftFrontWheelMotor, leftFrontSteerMotor, leftFrontEncoder,
SwerveDriveConstants.LEFT_FRONT_ENCODER_OFFSET);
leftBack = new SwerveModule(leftBackWheelMotor, leftBackSteerMotor, leftBackEncoder,
SwerveDriveConstants.LEFT_BACK_ENCODER_OFFSET);
rightFront = new SwerveModule(rightFrontWheelMotor, rightFrontSteerMotor, rightFrontEncoder,
SwerveDriveConstants.RIGHT_FRONT_ENCODER_OFFSET);
rightBack = new SwerveModule(rightBackWheelMotor, rightBackSteerMotor, rightBackEncoder,
SwerveDriveConstants.RIGHT_BACK_ENCODER_OFFSET);
2022-01-11 11:05:52 -07:00
// config cancoder as remote encoder for swerve steer motors
2022-02-28 19:08:59 -07:00
leftFrontSteerMotor.configRemoteFeedbackFilter(leftFrontEncoder.getDeviceID(),
2022-03-05 11:12:33 -07:00
RemoteSensorSource.CANCoder, SwerveDriveConstants.REMOTE_0,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
2022-02-28 19:08:59 -07:00
leftBackSteerMotor.configRemoteFeedbackFilter(leftBackEncoder.getDeviceID(),
2022-03-05 11:12:33 -07:00
RemoteSensorSource.CANCoder, SwerveDriveConstants.REMOTE_0,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
2022-02-28 19:08:59 -07:00
rightFrontSteerMotor.configRemoteFeedbackFilter(rightFrontEncoder.getDeviceID(),
2022-03-05 11:12:33 -07:00
RemoteSensorSource.CANCoder, SwerveDriveConstants.REMOTE_0,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
2022-02-28 19:08:59 -07:00
rightBackSteerMotor.configRemoteFeedbackFilter(rightBackEncoder.getDeviceID(),
2022-03-05 11:12:33 -07:00
RemoteSensorSource.CANCoder, SwerveDriveConstants.REMOTE_0,
SwerveDriveConstants.SWERVE_TIMEOUT_MS);
2022-03-12 20:39:04 -07:00
}
2021-12-06 17:45:45 -07:00
2022-01-15 15:56:17 -07:00
/* Climb Subsystem */
2022-03-05 15:15:41 -07:00
public final WPI_TalonFX shoulder = new WPI_TalonFX(ClimberConstants.SHOULDER_ID); // TODO
2022-01-15 15:56:17 -07:00
public final WPI_TalonFX elbow = new WPI_TalonFX(ClimberConstants.ELBOW_ID); // TODO
2022-01-21 17:20:31 -07:00
/* Hooks Subsystem */
2022-03-16 14:49:41 -06:00
// public final CANSparkMax leftClaw = new CANSparkMax(ClawConstants.LEFT_CLAW_ID, MotorType.kBrushless);
// public final CANSparkMax rightClaw = new CANSparkMax(ClawConstants.RIGHT_CLAW_ID, MotorType.kBrushless);
public final Servo leftClaw = new Servo(1); // TODO: find actual channel
2022-03-16 20:16:32 -06:00
public final Servo rightClaw = new Servo(2); // TODO: find actual channel
2022-03-05 15:15:41 -07:00
// Shooter Config
/* Boom Boom Subsystem */
public final WPI_TalonFX shooterFalconLeft = new WPI_TalonFX(ShooterConstants.SHOOTER_FALCON_LEFT_CAN_ID);
public final WPI_TalonFX shooterFalconRight = new WPI_TalonFX(ShooterConstants.SHOOTER_FALCON_RIGHT_CAN_ID);
2022-03-06 00:24:47 -07:00
// turret subsystem
2022-03-05 11:07:54 -07:00
public final CANSparkMax shooterTurret = new CANSparkMax(ShooterConstants.TURRET_MOTOR_CAN_ID, MotorType.kBrushless);
2022-03-06 00:24:47 -07:00
// hood subsystem
2022-03-16 11:22:51 -06:00
public final CANSparkMax angleAdjusterMotor = new CANSparkMax(ShooterConstants.SHOOTER_ANGLE_ADJUST_ID, MotorType.kBrushless);
2022-03-06 00:24:47 -07:00
// Create motor CANSparkMax
2022-02-28 19:08:59 -07:00
void configureShooterMotorControllers() {
2022-01-20 20:00:31 -07:00
// LEFT FALCON
shooterFalconLeft.configFactoryDefault();
shooterFalconLeft.setNeutralMode(NeutralMode.Coast);
shooterFalconLeft.setInverted(true);
shooterFalconLeft.configOpenloopRamp(1, ShooterConstants.SHOOTER_TIMEOUT_MS);
shooterFalconLeft.configClosedloopRamp(0.75, ShooterConstants.SHOOTER_TIMEOUT_MS);
shooterFalconLeft.configPeakOutputReverse(0, ShooterConstants.SHOOTER_TIMEOUT_MS);
shooterFalconLeft.setSelectedSensorPosition(0, ShooterConstants.SHOOTER_PID_LOOP_IDX,
ShooterConstants.SHOOTER_TIMEOUT_MS);
shooterFalconLeft.configClosedLoopPeriod(0, ShooterConstants.CLOSED_LOOP_TIME_MS,
ShooterConstants.SHOOTER_TIMEOUT_MS);
2022-03-12 20:39:05 -07:00
shooterFalconLeft.configSupplyCurrentLimit(ShooterConstants.SUPPLY_CURRENT_LIMIT_CONFIG_SHOOTER,
ShooterConstants.SHOOTER_TIMEOUT_MS);
shooterFalconLeft.configStatorCurrentLimit(ShooterConstants.STATOR_CURRENT_LIMIT_CONFIG_SHOOTER,
ShooterConstants.SHOOTER_TIMEOUT_MS);
// RIGHT FALCON
2022-02-17 19:53:06 -07:00
shooterFalconRight.configFactoryDefault();
2022-03-16 11:22:51 -06:00
shooterFalconRight.setNeutralMode(NeutralMode.Coast);
shooterFalconRight.setInverted(false);
shooterFalconRight.configOpenloopRamp(1, ShooterConstants.SHOOTER_TIMEOUT_MS);
shooterFalconRight.configClosedloopRamp(0.75, ShooterConstants.SHOOTER_TIMEOUT_MS);
// m_shooterFalconRight.configPeakOutputForward(0,
// ShooterConstants.SHOOTER_TIMEOUT_MS);(comment it in if necessary)
shooterFalconRight.setSelectedSensorPosition(0, ShooterConstants.SHOOTER_PID_LOOP_IDX,
ShooterConstants.SHOOTER_TIMEOUT_MS);
shooterFalconRight.configClosedLoopPeriod(0, ShooterConstants.CLOSED_LOOP_TIME_MS,
ShooterConstants.SHOOTER_TIMEOUT_MS);
2022-03-12 20:39:05 -07:00
shooterFalconRight.configSupplyCurrentLimit(ShooterConstants.SUPPLY_CURRENT_LIMIT_CONFIG_SHOOTER,
ShooterConstants.SHOOTER_TIMEOUT_MS);
shooterFalconRight.configStatorCurrentLimit(ShooterConstants.STATOR_CURRENT_LIMIT_CONFIG_SHOOTER,
ShooterConstants.SHOOTER_TIMEOUT_MS);
2022-03-12 20:39:05 -07:00
shooterFalconRight.follow(shooterFalconLeft);
2022-03-12 14:59:21 -07:00
2022-03-16 11:22:51 -06:00
// turret
shooterTurret.restoreFactoryDefaults();
shooterTurret.setIdleMode(IdleMode.kBrake);
shooterTurret.setInverted(true);
2022-03-06 00:24:47 -07:00
// hood subsystem
angleAdjusterMotor.restoreFactoryDefaults();
angleAdjusterMotor.setIdleMode(IdleMode.kBrake);
2022-03-12 22:19:42 -07:00
angleAdjusterMotor.setInverted(true);
}
2022-01-21 20:56:25 -07:00
2022-01-15 14:26:36 -07:00
/* Serializer Subsystem */
2022-01-25 17:17:07 -07:00
public final CANSparkMax serializerBelt = new CANSparkMax(SerializerConstants.SERIALIZER_BELT, MotorType.kBrushless);
2022-02-26 15:41:54 -07:00
public final DigitalInput serializerBeam = new DigitalInput(SerializerConstants.SERIALIZER_BELT_BEAM);
2022-01-21 19:00:11 -07:00
2022-03-18 12:21:12 -06:00
/* Intake Subsystem */
2022-01-21 19:00:11 -07:00
public final WPI_TalonFX intakeMotor = new WPI_TalonFX(IntakeConstants.INTAKE_MOTOR);
2022-01-25 17:17:07 -07:00
public final CANSparkMax extenderMotor = new CANSparkMax(IntakeConstants.EXTENDER_MOTOR, MotorType.kBrushless);
2022-02-26 15:41:54 -07:00
2022-03-12 20:39:04 -07:00
void configureIntakeMotors() {
2022-03-12 11:36:10 -07:00
intakeMotor.configFactoryDefault();
2022-03-12 20:39:04 -07:00
intakeMotor.setInverted(false);
2022-03-12 11:36:10 -07:00
intakeMotor.setNeutralMode(NeutralMode.Coast);
2022-03-12 20:39:04 -07:00
2022-03-12 17:32:10 -07:00
intakeMotor.configSupplyCurrentLimit(IntakeConstants.SUPPLY_CURRENT_LIMIT_CONFIG_INTAKE);
intakeMotor.configStatorCurrentLimit(IntakeConstants.STATOR_CURRENT_LIMIT_CONFIG_INTAKE);
2022-03-12 11:36:10 -07:00
}
2022-03-12 20:39:04 -07:00
void configureExtenderMotors() {
extenderMotor.restoreFactoryDefaults();
extenderMotor.setInverted(true);
extenderMotor.setIdleMode(IdleMode.kBrake);
}
2022-03-16 11:22:51 -06:00
void configureSerializerMotors() {
serializerBelt.restoreFactoryDefaults();
}
2022-03-12 20:39:04 -07:00
2022-03-16 11:22:51 -06:00
/* Storage Subsystem */
2022-03-12 20:39:04 -07:00
public final CANSparkMax storageMotor = new CANSparkMax(StorageConstants.STORAGE_CAN_ID, MotorType.kBrushless);
void configureStorageMotors() {
2022-03-12 20:43:36 -07:00
storageMotor.restoreFactoryDefaults();
2022-03-12 20:39:04 -07:00
}
2021-11-15 16:26:16 -07:00
}