From 1da68c54a3fcca26e4e4d7d77e4d65ec9deff919 Mon Sep 17 00:00:00 2001 From: DAflamingFOX Date: Sun, 17 Mar 2024 18:30:21 +0000 Subject: [PATCH] [bot] Lint --- .../java/io/github/tigerbotics7125/Robot.java | 36 ++++++++----------- .../tigerbotics7125/subsystems/Shooter.java | 3 +- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/main/java/io/github/tigerbotics7125/Robot.java b/src/main/java/io/github/tigerbotics7125/Robot.java index 2a8492f..06443a9 100644 --- a/src/main/java/io/github/tigerbotics7125/Robot.java +++ b/src/main/java/io/github/tigerbotics7125/Robot.java @@ -6,7 +6,6 @@ package io.github.tigerbotics7125; import com.pathplanner.lib.auto.AutoBuilder; -import com.pathplanner.lib.commands.PathPlannerAuto; import com.revrobotics.CANSparkBase.IdleMode; import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.wpilibj.RobotController; @@ -38,25 +37,21 @@ public class Robot extends TimedRobot { private Intake m_intake = new Intake(); private Shooter m_shooter = new Shooter(); private Arm m_arm = new Arm(); - - - //SendableChooser m_autoChooser = new SendableChooser<>(); - private SendableChooser autoChooser; + // SendableChooser m_autoChooser = new SendableChooser<>(); + private SendableChooser autoChooser; SendableChooser m_driveControlChooser = new SendableChooser<>(); - Command m_autonomousCommand; + Command m_autonomousCommand; @Override public void robotInit() { - //SmartDashboard.putData("Example Auto", new PathPlannerAuto("Example")); + // SmartDashboard.putData("Example Auto", new PathPlannerAuto("Example")); autoChooser = AutoBuilder.buildAutoChooser("Example"); SmartDashboard.putData("Auto Mode", autoChooser); - - - //m_autoChooser.setDefaultOption("Example", new PathPlannerAuto("Example")); + // m_autoChooser.setDefaultOption("Example", new PathPlannerAuto("Example")); m_driveControlChooser.setDefaultOption( ControlType.CURVE_ROCKETLEAGUE.name(), ControlType.CURVE_ROCKETLEAGUE); for (ControlType controlType : ControlType.values()) { @@ -147,12 +142,12 @@ public void disabledPeriodic() {} @Override public void autonomousInit() { - m_autonomousCommand = getAutonomousCommand(); - - if(m_autonomousCommand != null){ - m_autonomousCommand.schedule(); - } - // Auto auto = m_autoChooser.getSelected(); + m_autonomousCommand = getAutonomousCommand(); + + if (m_autonomousCommand != null) { + m_autonomousCommand.schedule(); + } + // Auto auto = m_autoChooser.getSelected(); // auto.autoCommand() // .ifPresentOrElse( @@ -169,15 +164,12 @@ public void autonomousInit() { } @Override - public void autonomousPeriodic() { - } + public void autonomousPeriodic() {} @Override public void teleopInit() { // Make sure autonomous commands are canceled for teleop CommandScheduler.getInstance().cancelAll(); - - } @Override @@ -194,8 +186,8 @@ public void simulationInit() {} @Override public void simulationPeriodic() {} - public Command getAutonomousCommand(){ + + public Command getAutonomousCommand() { return autoChooser.getSelected(); } - } diff --git a/src/main/java/io/github/tigerbotics7125/subsystems/Shooter.java b/src/main/java/io/github/tigerbotics7125/subsystems/Shooter.java index d84d61b..aa5bb02 100644 --- a/src/main/java/io/github/tigerbotics7125/subsystems/Shooter.java +++ b/src/main/java/io/github/tigerbotics7125/subsystems/Shooter.java @@ -60,8 +60,7 @@ public Command disable() { } public Command prepShooter() { - return runOnce(() -> m_PID.setSetpoint(Constants.Shooter.kShootRPM)) - .andThen(pidControl()); + return runOnce(() -> m_PID.setSetpoint(Constants.Shooter.kShootRPM)).andThen(pidControl()); } public Command shootNote(Intake intake) {