Skip to content

Commit 4afdf88

Browse files
committed
Keep hood up
1 parent 4cfa574 commit 4afdf88

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

src/main/java/frc/robot/RobotContainer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
1414
import edu.wpi.first.wpilibj2.command.button.POVButton;
1515
import frc.robot.shuffleboard.GRTShuffleboardTab;
16+
import frc.robot.subsystems.HoodSubsystem;
1617
import frc.robot.subsystems.IntakeSubsystem;
1718
import frc.robot.subsystems.InternalsSubsystem;
1819
import frc.robot.subsystems.swerve.SwerveSubsystem;
@@ -29,9 +30,10 @@ public class RobotContainer {
2930
private final SwerveSubsystem swerveSubsystem;
3031
private final IntakeSubsystem intakeSubsystem;
3132
private final InternalsSubsystem internalsSubsystem;
33+
private final HoodSubsystem hoodSubsystem;
3234

3335
// Controllers and buttons
34-
private final XboxController driveController = new XboxController(1);
36+
private final XboxController driveController = new XboxController(0);
3537
private final JoystickButton
3638
driveAButton = new JoystickButton(driveController, XboxController.Button.kA.value),
3739
driveBButton = new JoystickButton(driveController, XboxController.Button.kB.value),
@@ -40,7 +42,7 @@ public class RobotContainer {
4042
driveLBumper = new JoystickButton(driveController, XboxController.Button.kLeftBumper.value),
4143
driveRBumper = new JoystickButton(driveController, XboxController.Button.kRightBumper.value);
4244

43-
private final XboxController mechController = new XboxController(0);
45+
private final XboxController mechController = new XboxController(1);
4446
private final JoystickButton
4547
mechAButton = new JoystickButton(mechController, XboxController.Button.kA.value),
4648
mechBButton = new JoystickButton(mechController, XboxController.Button.kB.value),
@@ -59,6 +61,7 @@ public RobotContainer() {
5961
swerveSubsystem = new SwerveSubsystem();
6062
intakeSubsystem = new IntakeSubsystem();
6163
internalsSubsystem = new InternalsSubsystem();
64+
hoodSubsystem = new HoodSubsystem();
6265

6366
// Configure the button bindings
6467
configureButtonBindings();
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package frc.robot.subsystems;
2+
3+
import edu.wpi.first.wpilibj.PneumaticsModuleType;
4+
import edu.wpi.first.wpilibj.Solenoid;
5+
import edu.wpi.first.wpilibj2.command.SubsystemBase;
6+
7+
public class HoodSubsystem extends SubsystemBase {
8+
private Solenoid hoodSol;
9+
private boolean hoodUp;
10+
11+
public HoodSubsystem()
12+
{
13+
hoodSol = new Solenoid(PneumaticsModuleType.CTREPCM, 6);
14+
this.hoodUp = true;
15+
}
16+
17+
public void periodic() {
18+
hoodSol.set(hoodUp);
19+
}
20+
21+
}

0 commit comments

Comments
 (0)