From 08d6a3605aa3d9f02ccbddfcd63a65d436984d5c Mon Sep 17 00:00:00 2001 From: "Keenan D. Buckley" Date: Mon, 2 Mar 2020 21:45:38 -0700 Subject: [PATCH] Sort Commands and Organise Imports --- .../java/frc4388/robot/RobotContainer.java | 73 +++++-------------- .../{ => auto}/AutoPath1FromCenter.java | 3 +- .../{ => auto}/AutoPath2FromRight.java | 3 +- .../robot/commands/{ => auto}/Wait.java | 2 +- .../{ => climber}/RunClimberWithTriggers.java | 2 +- .../{ => climber}/RunLevelerWithJoystick.java | 2 +- .../{ => drive}/DrivePositionMPAux.java | 2 +- .../DriveStraightAtVelocityPID.java | 3 +- .../DriveStraightToPositionMM.java | 2 +- .../DriveStraightToPositionPID.java | 3 +- .../{ => drive}/DriveWithJoystick.java | 3 +- .../{ => drive}/DriveWithJoystickAuxPID.java | 4 +- .../DriveWithJoystickDriveStraight.java | 5 +- .../DriveWithJoystickUsingDeadAssistPID.java | 3 +- .../commands/{ => drive}/GotoCoordinates.java | 4 +- .../commands/{ => drive}/PlaySongDrive.java | 2 +- .../commands/{ => drive}/TurnDegrees.java | 2 +- .../{ => intake}/RunExtenderOutIn.java | 4 +- .../{ => intake}/RunIntakeWithTriggers.java | 2 +- .../{ => shooter}/CalibrateShooter.java | 3 +- .../commands/{ => shooter}/HoldTarget.java | 17 ++--- .../{ => shooter}/HoodPositionPID.java | 3 +- .../{ => shooter}/ShootFireGroup.java | 3 +- .../{ => shooter}/ShootFullGroup.java | 2 +- .../{ => shooter}/ShootPrepGroup.java | 2 +- .../ShooterVelocityControlPID.java | 2 +- .../commands/{ => shooter}/TrackTarget.java | 21 ++---- .../commands/{ => shooter}/TrimShooter.java | 2 +- .../commands/{ => storage}/StorageIntake.java | 3 +- .../{ => storage}/StorageIntakeFinal.java | 2 +- .../commands/{ => storage}/StorageOutake.java | 2 +- .../{ => storage}/StoragePositionPID.java | 2 +- .../{ => storage}/StoragePrepAim.java | 2 +- .../{ => storage}/StoragePrepIntake.java | 2 +- .../commands/{ => storage}/StorageRun.java | 2 +- .../java/frc4388/robot/subsystems/Camera.java | 2 - .../java/frc4388/robot/subsystems/Intake.java | 4 +- .../frc4388/robot/subsystems/Leveler.java | 5 -- .../frc4388/robot/subsystems/Pneumatics.java | 2 - 39 files changed, 69 insertions(+), 138 deletions(-) rename src/main/java/frc4388/robot/commands/{ => auto}/AutoPath1FromCenter.java (95%) rename src/main/java/frc4388/robot/commands/{ => auto}/AutoPath2FromRight.java (95%) rename src/main/java/frc4388/robot/commands/{ => auto}/Wait.java (98%) rename src/main/java/frc4388/robot/commands/{ => climber}/RunClimberWithTriggers.java (97%) rename src/main/java/frc4388/robot/commands/{ => climber}/RunLevelerWithJoystick.java (98%) rename src/main/java/frc4388/robot/commands/{ => drive}/DrivePositionMPAux.java (98%) rename src/main/java/frc4388/robot/commands/{ => drive}/DriveStraightAtVelocityPID.java (97%) rename src/main/java/frc4388/robot/commands/{ => drive}/DriveStraightToPositionMM.java (98%) rename src/main/java/frc4388/robot/commands/{ => drive}/DriveStraightToPositionPID.java (97%) rename src/main/java/frc4388/robot/commands/{ => drive}/DriveWithJoystick.java (97%) rename src/main/java/frc4388/robot/commands/{ => drive}/DriveWithJoystickAuxPID.java (96%) rename src/main/java/frc4388/robot/commands/{ => drive}/DriveWithJoystickDriveStraight.java (97%) rename src/main/java/frc4388/robot/commands/{ => drive}/DriveWithJoystickUsingDeadAssistPID.java (98%) rename src/main/java/frc4388/robot/commands/{ => drive}/GotoCoordinates.java (96%) rename src/main/java/frc4388/robot/commands/{ => drive}/PlaySongDrive.java (97%) rename src/main/java/frc4388/robot/commands/{ => drive}/TurnDegrees.java (98%) rename src/main/java/frc4388/robot/commands/{ => intake}/RunExtenderOutIn.java (94%) rename src/main/java/frc4388/robot/commands/{ => intake}/RunIntakeWithTriggers.java (98%) rename src/main/java/frc4388/robot/commands/{ => shooter}/CalibrateShooter.java (96%) rename src/main/java/frc4388/robot/commands/{ => shooter}/HoldTarget.java (94%) rename src/main/java/frc4388/robot/commands/{ => shooter}/HoodPositionPID.java (95%) rename src/main/java/frc4388/robot/commands/{ => shooter}/ShootFireGroup.java (94%) rename src/main/java/frc4388/robot/commands/{ => shooter}/ShootFullGroup.java (97%) rename src/main/java/frc4388/robot/commands/{ => shooter}/ShootPrepGroup.java (97%) rename src/main/java/frc4388/robot/commands/{ => shooter}/ShooterVelocityControlPID.java (98%) rename src/main/java/frc4388/robot/commands/{ => shooter}/TrackTarget.java (91%) rename src/main/java/frc4388/robot/commands/{ => shooter}/TrimShooter.java (97%) rename src/main/java/frc4388/robot/commands/{ => storage}/StorageIntake.java (96%) rename src/main/java/frc4388/robot/commands/{ => storage}/StorageIntakeFinal.java (96%) rename src/main/java/frc4388/robot/commands/{ => storage}/StorageOutake.java (97%) rename src/main/java/frc4388/robot/commands/{ => storage}/StoragePositionPID.java (97%) rename src/main/java/frc4388/robot/commands/{ => storage}/StoragePrepAim.java (97%) rename src/main/java/frc4388/robot/commands/{ => storage}/StoragePrepIntake.java (97%) rename src/main/java/frc4388/robot/commands/{ => storage}/StorageRun.java (97%) diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 08a5321..f9bba13 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -11,76 +11,43 @@ import java.util.List; import com.ctre.phoenix.motorcontrol.NeutralMode; +import edu.wpi.first.wpilibj.GenericHID; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.controller.RamseteController; import edu.wpi.first.wpilibj.geometry.Pose2d; import edu.wpi.first.wpilibj.geometry.Rotation2d; import edu.wpi.first.wpilibj.geometry.Translation2d; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj.trajectory.Trajectory; import edu.wpi.first.wpilibj.trajectory.TrajectoryConfig; import edu.wpi.first.wpilibj.trajectory.TrajectoryGenerator; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.InstantCommand; -import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import edu.wpi.first.wpilibj2.command.RamseteCommand; import edu.wpi.first.wpilibj2.command.RunCommand; -import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; import edu.wpi.first.wpilibj2.command.button.JoystickButton; - -import frc4388.robot.Constants.*; -import frc4388.robot.commands.AutoPath1FromCenter; -import frc4388.robot.commands.AutoPath2FromRight; -import frc4388.robot.commands.CalibrateShooter; -import frc4388.robot.commands.DrivePositionMPAux; -import frc4388.robot.commands.DriveStraightAtVelocityPID; -import frc4388.robot.commands.DriveStraightToPositionMM; -import frc4388.robot.commands.DriveStraightToPositionPID; -import frc4388.robot.commands.DriveWithJoystick; -import frc4388.robot.commands.DriveWithJoystickUsingDeadAssistPID; -import frc4388.robot.commands.DriveStraightToPositionMM; -import frc4388.robot.commands.DriveStraightToPositionPID; -import frc4388.robot.commands.DriveWithJoystickUsingDeadAssistPID; -import frc4388.robot.commands.HoldTarget; -import frc4388.robot.commands.HoodPositionPID; -import frc4388.robot.commands.DriveWithJoystickDriveStraight; -import frc4388.robot.commands.RunClimberWithTriggers; -import frc4388.robot.commands.RunExtenderOutIn; -import frc4388.robot.commands.RunIntakeWithTriggers; -import frc4388.robot.commands.ShooterVelocityControlPID; -import frc4388.robot.commands.StorageIntake; -import frc4388.robot.commands.GotoCoordinates; -import frc4388.robot.commands.RunClimberWithTriggers; -import frc4388.robot.commands.RunExtenderOutIn; -import frc4388.robot.commands.RunIntakeWithTriggers; -import frc4388.robot.subsystems.Drive; -import frc4388.robot.subsystems.Intake; -import frc4388.robot.subsystems.LED; -import frc4388.robot.subsystems.Shooter; -import frc4388.robot.subsystems.ShooterAim; -import frc4388.robot.subsystems.Climber; -import frc4388.robot.commands.RunLevelerWithJoystick; -import frc4388.robot.commands.ShootFireGroup; -import frc4388.robot.commands.ShootFullGroup; -import frc4388.robot.commands.ShootPrepGroup; -import frc4388.robot.subsystems.Drive; -import frc4388.robot.subsystems.Intake; -import frc4388.robot.subsystems.LED; -import frc4388.robot.commands.TrackTarget; -import frc4388.robot.commands.TrimShooter; -import frc4388.robot.commands.StorageOutake; -import frc4388.robot.commands.StoragePrepAim; -import frc4388.robot.commands.StoragePrepIntake; -import frc4388.robot.commands.StorageRun; +import frc4388.robot.Constants.DriveConstants; +import frc4388.robot.Constants.OIConstants; +import frc4388.robot.commands.auto.AutoPath1FromCenter; +import frc4388.robot.commands.auto.Wait; +import frc4388.robot.commands.climber.RunClimberWithTriggers; +import frc4388.robot.commands.climber.RunLevelerWithJoystick; +import frc4388.robot.commands.drive.DriveStraightToPositionMM; +import frc4388.robot.commands.drive.DriveWithJoystick; +import frc4388.robot.commands.drive.TurnDegrees; +import frc4388.robot.commands.intake.RunIntakeWithTriggers; +import frc4388.robot.commands.shooter.CalibrateShooter; +import frc4388.robot.commands.shooter.HoldTarget; +import frc4388.robot.commands.shooter.TrimShooter; import frc4388.robot.subsystems.Camera; +import frc4388.robot.subsystems.Climber; +import frc4388.robot.subsystems.Drive; +import frc4388.robot.subsystems.Intake; +import frc4388.robot.subsystems.LED; import frc4388.robot.subsystems.Leveler; import frc4388.robot.subsystems.LimeLight; -import frc4388.robot.commands.TurnDegrees; -import frc4388.robot.commands.Wait; -import frc4388.robot.commands.StorageOutake; -import frc4388.robot.subsystems.Camera; -import frc4388.robot.subsystems.Leveler; import frc4388.robot.subsystems.Pneumatics; +import frc4388.robot.subsystems.Shooter; +import frc4388.robot.subsystems.ShooterAim; import frc4388.robot.subsystems.Storage; import frc4388.utility.controller.IHandController; import frc4388.utility.controller.XboxController; diff --git a/src/main/java/frc4388/robot/commands/AutoPath1FromCenter.java b/src/main/java/frc4388/robot/commands/auto/AutoPath1FromCenter.java similarity index 95% rename from src/main/java/frc4388/robot/commands/AutoPath1FromCenter.java rename to src/main/java/frc4388/robot/commands/auto/AutoPath1FromCenter.java index 4ec080a..b749d57 100644 --- a/src/main/java/frc4388/robot/commands/AutoPath1FromCenter.java +++ b/src/main/java/frc4388/robot/commands/auto/AutoPath1FromCenter.java @@ -5,9 +5,10 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.auto; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; +import frc4388.robot.commands.drive.GotoCoordinates; import frc4388.robot.subsystems.Drive; import frc4388.robot.subsystems.Pneumatics; diff --git a/src/main/java/frc4388/robot/commands/AutoPath2FromRight.java b/src/main/java/frc4388/robot/commands/auto/AutoPath2FromRight.java similarity index 95% rename from src/main/java/frc4388/robot/commands/AutoPath2FromRight.java rename to src/main/java/frc4388/robot/commands/auto/AutoPath2FromRight.java index 43657c3..19d0b7e 100644 --- a/src/main/java/frc4388/robot/commands/AutoPath2FromRight.java +++ b/src/main/java/frc4388/robot/commands/auto/AutoPath2FromRight.java @@ -5,9 +5,10 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.auto; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; +import frc4388.robot.commands.drive.GotoCoordinates; import frc4388.robot.subsystems.Drive; import frc4388.robot.subsystems.Pneumatics; diff --git a/src/main/java/frc4388/robot/commands/Wait.java b/src/main/java/frc4388/robot/commands/auto/Wait.java similarity index 98% rename from src/main/java/frc4388/robot/commands/Wait.java rename to src/main/java/frc4388/robot/commands/auto/Wait.java index 580d279..9280310 100644 --- a/src/main/java/frc4388/robot/commands/Wait.java +++ b/src/main/java/frc4388/robot/commands/auto/Wait.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.auto; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; diff --git a/src/main/java/frc4388/robot/commands/RunClimberWithTriggers.java b/src/main/java/frc4388/robot/commands/climber/RunClimberWithTriggers.java similarity index 97% rename from src/main/java/frc4388/robot/commands/RunClimberWithTriggers.java rename to src/main/java/frc4388/robot/commands/climber/RunClimberWithTriggers.java index 9ab4285..be72d49 100644 --- a/src/main/java/frc4388/robot/commands/RunClimberWithTriggers.java +++ b/src/main/java/frc4388/robot/commands/climber/RunClimberWithTriggers.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.climber; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.subsystems.Climber; diff --git a/src/main/java/frc4388/robot/commands/RunLevelerWithJoystick.java b/src/main/java/frc4388/robot/commands/climber/RunLevelerWithJoystick.java similarity index 98% rename from src/main/java/frc4388/robot/commands/RunLevelerWithJoystick.java rename to src/main/java/frc4388/robot/commands/climber/RunLevelerWithJoystick.java index 0b91068..7cf5b2f 100644 --- a/src/main/java/frc4388/robot/commands/RunLevelerWithJoystick.java +++ b/src/main/java/frc4388/robot/commands/climber/RunLevelerWithJoystick.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.climber; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.subsystems.Leveler; diff --git a/src/main/java/frc4388/robot/commands/DrivePositionMPAux.java b/src/main/java/frc4388/robot/commands/drive/DrivePositionMPAux.java similarity index 98% rename from src/main/java/frc4388/robot/commands/DrivePositionMPAux.java rename to src/main/java/frc4388/robot/commands/drive/DrivePositionMPAux.java index 68d8390..901fdcb 100644 --- a/src/main/java/frc4388/robot/commands/DrivePositionMPAux.java +++ b/src/main/java/frc4388/robot/commands/drive/DrivePositionMPAux.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.drive; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.DriveConstants; diff --git a/src/main/java/frc4388/robot/commands/DriveStraightAtVelocityPID.java b/src/main/java/frc4388/robot/commands/drive/DriveStraightAtVelocityPID.java similarity index 97% rename from src/main/java/frc4388/robot/commands/DriveStraightAtVelocityPID.java rename to src/main/java/frc4388/robot/commands/drive/DriveStraightAtVelocityPID.java index c79ccbc..e63a5bf 100644 --- a/src/main/java/frc4388/robot/commands/DriveStraightAtVelocityPID.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveStraightAtVelocityPID.java @@ -4,8 +4,7 @@ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ - -package frc4388.robot.commands; +package frc4388.robot.commands.drive; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.DriveConstants; diff --git a/src/main/java/frc4388/robot/commands/DriveStraightToPositionMM.java b/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java similarity index 98% rename from src/main/java/frc4388/robot/commands/DriveStraightToPositionMM.java rename to src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java index c9aa927..f72a223 100644 --- a/src/main/java/frc4388/robot/commands/DriveStraightToPositionMM.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.drive; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; diff --git a/src/main/java/frc4388/robot/commands/DriveStraightToPositionPID.java b/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java similarity index 97% rename from src/main/java/frc4388/robot/commands/DriveStraightToPositionPID.java rename to src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java index a457e26..337ff6d 100644 --- a/src/main/java/frc4388/robot/commands/DriveStraightToPositionPID.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java @@ -5,9 +5,8 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.drive; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.DriveConstants; import frc4388.robot.subsystems.Drive; diff --git a/src/main/java/frc4388/robot/commands/DriveWithJoystick.java b/src/main/java/frc4388/robot/commands/drive/DriveWithJoystick.java similarity index 97% rename from src/main/java/frc4388/robot/commands/DriveWithJoystick.java rename to src/main/java/frc4388/robot/commands/drive/DriveWithJoystick.java index b7d823f..75ab279 100644 --- a/src/main/java/frc4388/robot/commands/DriveWithJoystick.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveWithJoystick.java @@ -5,9 +5,8 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.drive; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.DriveConstants; import frc4388.robot.subsystems.Drive; diff --git a/src/main/java/frc4388/robot/commands/DriveWithJoystickAuxPID.java b/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickAuxPID.java similarity index 96% rename from src/main/java/frc4388/robot/commands/DriveWithJoystickAuxPID.java rename to src/main/java/frc4388/robot/commands/drive/DriveWithJoystickAuxPID.java index 2531847..3a958a9 100644 --- a/src/main/java/frc4388/robot/commands/DriveWithJoystickAuxPID.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickAuxPID.java @@ -5,9 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; - -import com.ctre.phoenix.motorcontrol.TalonFXControlMode; +package frc4388.robot.commands.drive; import edu.wpi.first.wpilibj2.command.CommandBase; import edu.wpi.first.wpiutil.math.MathUtil; diff --git a/src/main/java/frc4388/robot/commands/DriveWithJoystickDriveStraight.java b/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickDriveStraight.java similarity index 97% rename from src/main/java/frc4388/robot/commands/DriveWithJoystickDriveStraight.java rename to src/main/java/frc4388/robot/commands/drive/DriveWithJoystickDriveStraight.java index c69d4e9..345b160 100644 --- a/src/main/java/frc4388/robot/commands/DriveWithJoystickDriveStraight.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickDriveStraight.java @@ -5,12 +5,9 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; - -import java.security.PublicKey; +package frc4388.robot.commands.drive; import edu.wpi.first.wpilibj2.command.CommandBase; -import edu.wpi.first.wpiutil.math.MathUtil; import frc4388.robot.Constants.DriveConstants; import frc4388.robot.subsystems.Drive; import frc4388.robot.subsystems.Pneumatics; diff --git a/src/main/java/frc4388/robot/commands/DriveWithJoystickUsingDeadAssistPID.java b/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickUsingDeadAssistPID.java similarity index 98% rename from src/main/java/frc4388/robot/commands/DriveWithJoystickUsingDeadAssistPID.java rename to src/main/java/frc4388/robot/commands/drive/DriveWithJoystickUsingDeadAssistPID.java index 0b154e7..3b2ef73 100644 --- a/src/main/java/frc4388/robot/commands/DriveWithJoystickUsingDeadAssistPID.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveWithJoystickUsingDeadAssistPID.java @@ -5,9 +5,8 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.drive; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; import edu.wpi.first.wpiutil.math.MathUtil; import frc4388.robot.Constants.DriveConstants; diff --git a/src/main/java/frc4388/robot/commands/GotoCoordinates.java b/src/main/java/frc4388/robot/commands/drive/GotoCoordinates.java similarity index 96% rename from src/main/java/frc4388/robot/commands/GotoCoordinates.java rename to src/main/java/frc4388/robot/commands/drive/GotoCoordinates.java index 6ca3deb..33de918 100644 --- a/src/main/java/frc4388/robot/commands/GotoCoordinates.java +++ b/src/main/java/frc4388/robot/commands/drive/GotoCoordinates.java @@ -5,10 +5,10 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.drive; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; +import frc4388.robot.commands.auto.Wait; import frc4388.robot.subsystems.Drive; import frc4388.robot.subsystems.Pneumatics; diff --git a/src/main/java/frc4388/robot/commands/PlaySongDrive.java b/src/main/java/frc4388/robot/commands/drive/PlaySongDrive.java similarity index 97% rename from src/main/java/frc4388/robot/commands/PlaySongDrive.java rename to src/main/java/frc4388/robot/commands/drive/PlaySongDrive.java index 5e0e6b4..eaa0f07 100644 --- a/src/main/java/frc4388/robot/commands/PlaySongDrive.java +++ b/src/main/java/frc4388/robot/commands/drive/PlaySongDrive.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.drive; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.subsystems.Drive; diff --git a/src/main/java/frc4388/robot/commands/TurnDegrees.java b/src/main/java/frc4388/robot/commands/drive/TurnDegrees.java similarity index 98% rename from src/main/java/frc4388/robot/commands/TurnDegrees.java rename to src/main/java/frc4388/robot/commands/drive/TurnDegrees.java index 83630dd..b9f7d35 100644 --- a/src/main/java/frc4388/robot/commands/TurnDegrees.java +++ b/src/main/java/frc4388/robot/commands/drive/TurnDegrees.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.drive; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; diff --git a/src/main/java/frc4388/robot/commands/RunExtenderOutIn.java b/src/main/java/frc4388/robot/commands/intake/RunExtenderOutIn.java similarity index 94% rename from src/main/java/frc4388/robot/commands/RunExtenderOutIn.java rename to src/main/java/frc4388/robot/commands/intake/RunExtenderOutIn.java index 37d7ae1..c222ad6 100644 --- a/src/main/java/frc4388/robot/commands/RunExtenderOutIn.java +++ b/src/main/java/frc4388/robot/commands/intake/RunExtenderOutIn.java @@ -5,17 +5,15 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.intake; import com.revrobotics.CANDigitalInput; import com.revrobotics.CANSparkMax; -import com.revrobotics.CANDigitalInput.LimitSwitchPolarity; import com.revrobotics.CANSparkMaxLowLevel.MotorType; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.IntakeConstants; import frc4388.robot.subsystems.Intake; -import frc4388.utility.controller.IHandController; public class RunExtenderOutIn extends CommandBase { private Intake m_intake; diff --git a/src/main/java/frc4388/robot/commands/RunIntakeWithTriggers.java b/src/main/java/frc4388/robot/commands/intake/RunIntakeWithTriggers.java similarity index 98% rename from src/main/java/frc4388/robot/commands/RunIntakeWithTriggers.java rename to src/main/java/frc4388/robot/commands/intake/RunIntakeWithTriggers.java index b9f6298..7f90f63 100644 --- a/src/main/java/frc4388/robot/commands/RunIntakeWithTriggers.java +++ b/src/main/java/frc4388/robot/commands/intake/RunIntakeWithTriggers.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.intake; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.subsystems.Intake; diff --git a/src/main/java/frc4388/robot/commands/CalibrateShooter.java b/src/main/java/frc4388/robot/commands/shooter/CalibrateShooter.java similarity index 96% rename from src/main/java/frc4388/robot/commands/CalibrateShooter.java rename to src/main/java/frc4388/robot/commands/shooter/CalibrateShooter.java index 1b766d7..b2a54ac 100644 --- a/src/main/java/frc4388/robot/commands/CalibrateShooter.java +++ b/src/main/java/frc4388/robot/commands/shooter/CalibrateShooter.java @@ -5,11 +5,10 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; import com.revrobotics.CANSparkMax.SoftLimitDirection; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.ShooterConstants; import frc4388.robot.subsystems.Shooter; diff --git a/src/main/java/frc4388/robot/commands/HoldTarget.java b/src/main/java/frc4388/robot/commands/shooter/HoldTarget.java similarity index 94% rename from src/main/java/frc4388/robot/commands/HoldTarget.java rename to src/main/java/frc4388/robot/commands/shooter/HoldTarget.java index fa39663..a91fb49 100644 --- a/src/main/java/frc4388/robot/commands/HoldTarget.java +++ b/src/main/java/frc4388/robot/commands/shooter/HoldTarget.java @@ -5,21 +5,16 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; -import frc4388.robot.Constants.ShooterConstants; -import frc4388.robot.Constants.VisionConstants; -import frc4388.robot.subsystems.Drive; -import frc4388.robot.subsystems.LimeLight; -import frc4388.robot.subsystems.Shooter; -import frc4388.robot.subsystems.ShooterAim; -import frc4388.utility.ShooterTables; -import frc4388.utility.controller.IHandController; -import edu.wpi.first.wpilibj2.command.CommandBase; -import edu.wpi.first.networktables.NetworkTable; import edu.wpi.first.networktables.NetworkTableEntry; import edu.wpi.first.networktables.NetworkTableInstance; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; +import edu.wpi.first.wpilibj2.command.CommandBase; +import frc4388.robot.Constants.VisionConstants; +import frc4388.robot.subsystems.Shooter; +import frc4388.robot.subsystems.ShooterAim; +import frc4388.utility.controller.IHandController; public class HoldTarget extends CommandBase { //Setup diff --git a/src/main/java/frc4388/robot/commands/HoodPositionPID.java b/src/main/java/frc4388/robot/commands/shooter/HoodPositionPID.java similarity index 95% rename from src/main/java/frc4388/robot/commands/HoodPositionPID.java rename to src/main/java/frc4388/robot/commands/shooter/HoodPositionPID.java index b48a3c4..980c9ee 100644 --- a/src/main/java/frc4388/robot/commands/HoodPositionPID.java +++ b/src/main/java/frc4388/robot/commands/shooter/HoodPositionPID.java @@ -5,11 +5,10 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; -import frc4388.robot.Constants.ShooterConstants; import frc4388.robot.subsystems.Shooter; public class HoodPositionPID extends CommandBase { diff --git a/src/main/java/frc4388/robot/commands/ShootFireGroup.java b/src/main/java/frc4388/robot/commands/shooter/ShootFireGroup.java similarity index 94% rename from src/main/java/frc4388/robot/commands/ShootFireGroup.java rename to src/main/java/frc4388/robot/commands/shooter/ShootFireGroup.java index 59bcf9c..2adcbda 100644 --- a/src/main/java/frc4388/robot/commands/ShootFireGroup.java +++ b/src/main/java/frc4388/robot/commands/shooter/ShootFireGroup.java @@ -5,10 +5,11 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; import edu.wpi.first.wpilibj2.command.ParallelRaceGroup; import edu.wpi.first.wpilibj2.command.RunCommand; +import frc4388.robot.commands.storage.StorageRun; import frc4388.robot.subsystems.Shooter; import frc4388.robot.subsystems.ShooterAim; import frc4388.robot.subsystems.Storage; diff --git a/src/main/java/frc4388/robot/commands/ShootFullGroup.java b/src/main/java/frc4388/robot/commands/shooter/ShootFullGroup.java similarity index 97% rename from src/main/java/frc4388/robot/commands/ShootFullGroup.java rename to src/main/java/frc4388/robot/commands/shooter/ShootFullGroup.java index 55557b8..e124093 100644 --- a/src/main/java/frc4388/robot/commands/ShootFullGroup.java +++ b/src/main/java/frc4388/robot/commands/shooter/ShootFullGroup.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; import frc4388.robot.subsystems.Shooter; diff --git a/src/main/java/frc4388/robot/commands/ShootPrepGroup.java b/src/main/java/frc4388/robot/commands/shooter/ShootPrepGroup.java similarity index 97% rename from src/main/java/frc4388/robot/commands/ShootPrepGroup.java rename to src/main/java/frc4388/robot/commands/shooter/ShootPrepGroup.java index d234d7a..ef8714d 100644 --- a/src/main/java/frc4388/robot/commands/ShootPrepGroup.java +++ b/src/main/java/frc4388/robot/commands/shooter/ShootPrepGroup.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import edu.wpi.first.wpilibj2.command.RunCommand; diff --git a/src/main/java/frc4388/robot/commands/ShooterVelocityControlPID.java b/src/main/java/frc4388/robot/commands/shooter/ShooterVelocityControlPID.java similarity index 98% rename from src/main/java/frc4388/robot/commands/ShooterVelocityControlPID.java rename to src/main/java/frc4388/robot/commands/shooter/ShooterVelocityControlPID.java index 9dbd4f4..8411aeb 100644 --- a/src/main/java/frc4388/robot/commands/ShooterVelocityControlPID.java +++ b/src/main/java/frc4388/robot/commands/shooter/ShooterVelocityControlPID.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; diff --git a/src/main/java/frc4388/robot/commands/TrackTarget.java b/src/main/java/frc4388/robot/commands/shooter/TrackTarget.java similarity index 91% rename from src/main/java/frc4388/robot/commands/TrackTarget.java rename to src/main/java/frc4388/robot/commands/shooter/TrackTarget.java index 197dc72..857e003 100644 --- a/src/main/java/frc4388/robot/commands/TrackTarget.java +++ b/src/main/java/frc4388/robot/commands/shooter/TrackTarget.java @@ -5,25 +5,16 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; -import frc4388.robot.Constants.ShooterConstants; -import frc4388.robot.Constants.VisionConstants; -import frc4388.robot.subsystems.Camera; -import frc4388.robot.subsystems.Drive; -import frc4388.robot.subsystems.LimeLight; -import frc4388.robot.subsystems.Shooter; -import frc4388.robot.subsystems.ShooterAim; -import frc4388.robot.commands.TrimShooter; -import frc4388.utility.ShooterTables; -import frc4388.utility.controller.IHandController; -import edu.wpi.first.wpilibj2.command.CommandBase; -import edu.wpi.first.wpilibj2.command.RunCommand; -import edu.wpi.first.networktables.NetworkTable; import edu.wpi.first.networktables.NetworkTableEntry; import edu.wpi.first.networktables.NetworkTableInstance; -import edu.wpi.first.wpilibj.XboxController; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; +import edu.wpi.first.wpilibj2.command.CommandBase; +import frc4388.robot.Constants.VisionConstants; +import frc4388.robot.subsystems.Shooter; +import frc4388.robot.subsystems.ShooterAim; +import frc4388.utility.controller.IHandController; public class TrackTarget extends CommandBase { // Setup diff --git a/src/main/java/frc4388/robot/commands/TrimShooter.java b/src/main/java/frc4388/robot/commands/shooter/TrimShooter.java similarity index 97% rename from src/main/java/frc4388/robot/commands/TrimShooter.java rename to src/main/java/frc4388/robot/commands/shooter/TrimShooter.java index 84daecd..2c673b8 100644 --- a/src/main/java/frc4388/robot/commands/TrimShooter.java +++ b/src/main/java/frc4388/robot/commands/shooter/TrimShooter.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.shooter; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.OIConstants; diff --git a/src/main/java/frc4388/robot/commands/StorageIntake.java b/src/main/java/frc4388/robot/commands/storage/StorageIntake.java similarity index 96% rename from src/main/java/frc4388/robot/commands/StorageIntake.java rename to src/main/java/frc4388/robot/commands/storage/StorageIntake.java index 2a1123a..9ead11f 100644 --- a/src/main/java/frc4388/robot/commands/StorageIntake.java +++ b/src/main/java/frc4388/robot/commands/storage/StorageIntake.java @@ -5,10 +5,9 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.storage; import edu.wpi.first.wpilibj2.command.CommandBase; -import frc4388.robot.Constants.IntakeConstants; import frc4388.robot.Constants.StorageConstants; import frc4388.robot.subsystems.Intake; import frc4388.robot.subsystems.Storage; diff --git a/src/main/java/frc4388/robot/commands/StorageIntakeFinal.java b/src/main/java/frc4388/robot/commands/storage/StorageIntakeFinal.java similarity index 96% rename from src/main/java/frc4388/robot/commands/StorageIntakeFinal.java rename to src/main/java/frc4388/robot/commands/storage/StorageIntakeFinal.java index 2a7d10a..0d8c447 100644 --- a/src/main/java/frc4388/robot/commands/StorageIntakeFinal.java +++ b/src/main/java/frc4388/robot/commands/storage/StorageIntakeFinal.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.storage; import edu.wpi.first.wpilibj2.command.CommandBase; diff --git a/src/main/java/frc4388/robot/commands/StorageOutake.java b/src/main/java/frc4388/robot/commands/storage/StorageOutake.java similarity index 97% rename from src/main/java/frc4388/robot/commands/StorageOutake.java rename to src/main/java/frc4388/robot/commands/storage/StorageOutake.java index 3231600..658d8e5 100644 --- a/src/main/java/frc4388/robot/commands/StorageOutake.java +++ b/src/main/java/frc4388/robot/commands/storage/StorageOutake.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.storage; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.StorageConstants; diff --git a/src/main/java/frc4388/robot/commands/StoragePositionPID.java b/src/main/java/frc4388/robot/commands/storage/StoragePositionPID.java similarity index 97% rename from src/main/java/frc4388/robot/commands/StoragePositionPID.java rename to src/main/java/frc4388/robot/commands/storage/StoragePositionPID.java index bc607e5..2a27b41 100644 --- a/src/main/java/frc4388/robot/commands/StoragePositionPID.java +++ b/src/main/java/frc4388/robot/commands/storage/StoragePositionPID.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.storage; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.StorageConstants; diff --git a/src/main/java/frc4388/robot/commands/StoragePrepAim.java b/src/main/java/frc4388/robot/commands/storage/StoragePrepAim.java similarity index 97% rename from src/main/java/frc4388/robot/commands/StoragePrepAim.java rename to src/main/java/frc4388/robot/commands/storage/StoragePrepAim.java index f0e52c1..268f39e 100644 --- a/src/main/java/frc4388/robot/commands/StoragePrepAim.java +++ b/src/main/java/frc4388/robot/commands/storage/StoragePrepAim.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.storage; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.CommandBase; diff --git a/src/main/java/frc4388/robot/commands/StoragePrepIntake.java b/src/main/java/frc4388/robot/commands/storage/StoragePrepIntake.java similarity index 97% rename from src/main/java/frc4388/robot/commands/StoragePrepIntake.java rename to src/main/java/frc4388/robot/commands/storage/StoragePrepIntake.java index 2fa52e1..c935623 100644 --- a/src/main/java/frc4388/robot/commands/StoragePrepIntake.java +++ b/src/main/java/frc4388/robot/commands/storage/StoragePrepIntake.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.storage; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.StorageConstants; diff --git a/src/main/java/frc4388/robot/commands/StorageRun.java b/src/main/java/frc4388/robot/commands/storage/StorageRun.java similarity index 97% rename from src/main/java/frc4388/robot/commands/StorageRun.java rename to src/main/java/frc4388/robot/commands/storage/StorageRun.java index 91632f5..11dbc4b 100644 --- a/src/main/java/frc4388/robot/commands/StorageRun.java +++ b/src/main/java/frc4388/robot/commands/storage/StorageRun.java @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -package frc4388.robot.commands; +package frc4388.robot.commands.storage; import edu.wpi.first.wpilibj2.command.CommandBase; import frc4388.robot.Constants.StorageConstants; diff --git a/src/main/java/frc4388/robot/subsystems/Camera.java b/src/main/java/frc4388/robot/subsystems/Camera.java index 332bb46..58bd8d1 100644 --- a/src/main/java/frc4388/robot/subsystems/Camera.java +++ b/src/main/java/frc4388/robot/subsystems/Camera.java @@ -7,11 +7,9 @@ package frc4388.robot.subsystems; -import edu.wpi.cscore.MjpegServer; import edu.wpi.cscore.UsbCamera; import edu.wpi.cscore.VideoSource; import edu.wpi.first.cameraserver.CameraServer; -import edu.wpi.first.networktables.NetworkTableInstance; import edu.wpi.first.wpilibj2.command.SubsystemBase; diff --git a/src/main/java/frc4388/robot/subsystems/Intake.java b/src/main/java/frc4388/robot/subsystems/Intake.java index 11507ef..109b412 100644 --- a/src/main/java/frc4388/robot/subsystems/Intake.java +++ b/src/main/java/frc4388/robot/subsystems/Intake.java @@ -8,13 +8,11 @@ package frc4388.robot.subsystems; import com.revrobotics.CANDigitalInput; -import com.revrobotics.CANSparkMax; import com.revrobotics.CANDigitalInput.LimitSwitchPolarity; +import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMax.IdleMode; import com.revrobotics.CANSparkMaxLowLevel.MotorType; -import edu.wpi.first.wpilibj.Spark; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc4388.robot.Constants.IntakeConstants; diff --git a/src/main/java/frc4388/robot/subsystems/Leveler.java b/src/main/java/frc4388/robot/subsystems/Leveler.java index 0db0562..d29c748 100644 --- a/src/main/java/frc4388/robot/subsystems/Leveler.java +++ b/src/main/java/frc4388/robot/subsystems/Leveler.java @@ -7,17 +7,12 @@ package frc4388.robot.subsystems; -import com.ctre.phoenix.motorcontrol.NeutralMode; -import com.ctre.phoenix.motorcontrol.can.TalonSRX; -import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import com.revrobotics.CANSparkMax; import com.revrobotics.CANSparkMax.IdleMode; import com.revrobotics.CANSparkMaxLowLevel.MotorType; -import edu.wpi.first.wpilibj.Talon; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc4388.robot.Constants.LevelerConstants; -import frc4388.robot.subsystems.*; public class Leveler extends SubsystemBase { CANSparkMax m_levelerMotor = new CANSparkMax(LevelerConstants.LEVELER_CAN_ID, MotorType.kBrushless); diff --git a/src/main/java/frc4388/robot/subsystems/Pneumatics.java b/src/main/java/frc4388/robot/subsystems/Pneumatics.java index 1c373ed..6b7327b 100644 --- a/src/main/java/frc4388/robot/subsystems/Pneumatics.java +++ b/src/main/java/frc4388/robot/subsystems/Pneumatics.java @@ -8,9 +8,7 @@ package frc4388.robot.subsystems; import edu.wpi.first.wpilibj.DoubleSolenoid; -import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import edu.wpi.first.wpilibj2.command.SubsystemBase; -import frc4388.robot.RobotContainer; import frc4388.robot.Constants.PneumaticsConstants; public class Pneumatics extends SubsystemBase {