Skip to content

Commit

Permalink
update pneumatics and remove unnecessary files
Browse files Browse the repository at this point in the history
Co-Authored-By: NadiaAdams <[email protected]>
Co-Authored-By: Shreshta Parthaje <[email protected]>
  • Loading branch information
3 people committed Nov 30, 2024
1 parent 350e3d0 commit 2838aee
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 469 deletions.
2 changes: 1 addition & 1 deletion WPILib-License.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009-2023 FIRST and other WPILib contributors
Copyright (c) 2009-2024 FIRST and other WPILib contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static class LauncherConstants {
}

public static class PneumaticConstants {
public static final int kForwardChannel = 1; // TODO: Update these channel values
public static final int kForwardChannel = 0; // TODO: Update these channel values
public static final int kReverseChannel = 2;
}

Expand Down
28 changes: 2 additions & 26 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
// import frc.robot.subsystems.PWMLauncher;

import frc.robot.subsystems.CANDrivetrain;
import frc.robot.subsystems.CANLauncher;
import frc.robot.subsystems.Pneumatics;
import frc.robot.commands.LauncherCommands;
import frc.robot.commands.PneumaticCommands;

/**
Expand All @@ -30,7 +28,6 @@ public class RobotContainer {
// private final PWMDrivetrain m_drivetrain = new PWMDrivetrain();
public static final CANDrivetrain m_drivetrain = new CANDrivetrain();
// private final PWMLauncher m_launcher = new PWMLauncher();
public static final CANLauncher m_launcher = new CANLauncher();
public static final Pneumatics m_piston = new Pneumatics();
public static double speedUp = 0.0;

Expand Down Expand Up @@ -82,35 +79,14 @@ private void configureBindings() {
// left Bumper

// changed controls, check them at practice field

// stop shooter
m_operatorController.leftBumper().onTrue(LauncherCommands.LauncherOutput(0));
m_operatorController.leftBumper().onTrue(LauncherCommands.FeederOutput(0));

// intake
m_operatorController.leftTrigger().onTrue(LauncherCommands.LauncherOutput(-1));
m_operatorController.leftTrigger().onTrue(LauncherCommands.FeederOutput(-1));
m_operatorController.leftTrigger().onFalse(LauncherCommands.LauncherOutput(0));
m_operatorController.leftTrigger().onFalse(LauncherCommands.FeederOutput(0));

// outake
m_operatorController.rightTrigger().onTrue(LauncherCommands.LauncherOutput(1));
m_operatorController.rightBumper().onTrue(LauncherCommands.FeederOutput(1));
m_operatorController.rightTrigger().onFalse(LauncherCommands.LauncherOutput(0));
m_operatorController.rightBumper().onFalse(LauncherCommands.FeederOutput(0));

m_operatorController.a().onTrue(LauncherCommands.LauncherOutput(0.3));
m_operatorController.a().onTrue(LauncherCommands.FeederOutput(0.3));
m_operatorController.a().onFalse(LauncherCommands.LauncherOutput(0));
m_operatorController.a().onFalse(LauncherCommands.FeederOutput(0));

// m_driverController.rightTrigger().onFalse( new InstantCommand(()->
// {speedUp=0.0;}));

// piston
m_operatorController.b().onTrue(PneumaticCommands.pistonExtend());
m_operatorController.a().onTrue(PneumaticCommands.pistonRetract());
m_operatorController.x().onTrue(PneumaticCommands.solenoidOff());
m_operatorController.y().onTrue(PneumaticCommands.solenoidToggle());
}

/**
Expand All @@ -120,6 +96,6 @@ private void configureBindings() {
*/
public Command getAutonomousCommand() {
// An example command will be run in autonomous
return AutoCommands.driveAndShootAuto();
return null;
}
}
13 changes: 0 additions & 13 deletions src/main/java/frc/robot/commands/AutoCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,4 @@ public static InstantCommand setDriveSpeed(double leftSpeed, double rightSpeed)
public static SequentialCommandGroup driveTime(double time, double speed) {
return new SequentialCommandGroup(setDriveSpeed(speed, speed), new WaitCommand(time), setDriveSpeed(0, 0));
}

// NOTE: Assuming direction of speeds right now, change it at practice field
public static SequentialCommandGroup shootNote() {
return new SequentialCommandGroup(LauncherCommands.LauncherOutput(1), new WaitCommand(1),
LauncherCommands.FeederOutput(1), new WaitCommand(0.5), LauncherCommands.FeederStop(),
LauncherCommands.LauncherStop());
}

public static SequentialCommandGroup driveAndShootAuto() {
return new SequentialCommandGroup(shootNote(), new WaitCommand(Constants.AutoConstants.delay),
driveTime(Constants.AutoConstants.driveTime, Constants.AutoConstants.driveSpeed));
}

}
30 changes: 0 additions & 30 deletions src/main/java/frc/robot/commands/Autos.java

This file was deleted.

64 changes: 0 additions & 64 deletions src/main/java/frc/robot/commands/LaunchNote.java

This file was deleted.

23 changes: 0 additions & 23 deletions src/main/java/frc/robot/commands/LauncherCommands.java

This file was deleted.

60 changes: 0 additions & 60 deletions src/main/java/frc/robot/commands/PrepareLaunch.java

This file was deleted.

11 changes: 0 additions & 11 deletions src/main/java/frc/robot/commands/SolenoidCommands.java

This file was deleted.

70 changes: 0 additions & 70 deletions src/main/java/frc/robot/subsystems/CANLauncher.java

This file was deleted.

Loading

0 comments on commit 2838aee

Please sign in to comment.