Skip to content

Commit

Permalink
Fixed Dump
Browse files Browse the repository at this point in the history
Dump commands were flipped (fixed), openThenClose starts death spiral that disables the bot. As a result, openThenClose has been abandoned for the time being.
  • Loading branch information
OakvilleDynamicsProgrammer committed Mar 8, 2024
1 parent d1c991a commit a35a082
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/commands/ConveyorCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.OperatorConstants;
import frc.robot.subsystems.Conveyor;

public class ConveyorCommand extends Command {
private final Conveyor m_ConveyorSubsystem;
// controller
// TODO: Change this to the correct controller
private final Joystick ConveyorJoystick = new Joystick(1);
private final Joystick ConveyorJoystick = new Joystick(OperatorConstants.COPILOT_CONTROLLER);

public ConveyorCommand(Conveyor subsystem) {
m_ConveyorSubsystem = subsystem;
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/frc/robot/commands/FlyWCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.OperatorConstants;
import frc.robot.subsystems.FlyWheel;

public class FlyWCommand extends Command {
private final FlyWheel m_FlyWSubsystem;
// controller
// TODO: Change this to the correct controller
private final Joystick FlyWJoystick = new Joystick(1);
private final Joystick FlyWJoystick = new Joystick(OperatorConstants.COPILOT_CONTROLLER);

public FlyWCommand(FlyWheel subsystem) {
m_FlyWSubsystem = subsystem;
Expand All @@ -26,7 +27,9 @@ public void initialize() {}
public void execute() {
if (FlyWJoystick.getPOV() == 315 | FlyWJoystick.getPOV() == 0 | FlyWJoystick.getPOV() == 45) {
m_FlyWSubsystem.enableflywheelfull();
} else if (FlyWJoystick.getPOV() == 225 | FlyWJoystick.getPOV() == 180 | FlyWJoystick.getPOV() == 135) {
} else if (FlyWJoystick.getPOV() == 225
| FlyWJoystick.getPOV() == 180
| FlyWJoystick.getPOV() == 135) {
m_FlyWSubsystem.enableflywheellow();
} else if (FlyWJoystick.getRawButton(12) == true) {
m_FlyWSubsystem.enableflywheelreduced();
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/commands/IntakeCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.Constants.OperatorConstants;
import frc.robot.subsystems.Intake;

public class IntakeCommand extends Command {
private final Intake m_intakeSubsystem;
// controller
// TODO: Change this to the correct controller
private final Joystick IntakeJoystick = new Joystick(1);
private final Joystick IntakeJoystick = new Joystick(OperatorConstants.COPILOT_CONTROLLER);

public IntakeCommand(Intake subsystem) {
m_intakeSubsystem = subsystem;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/Dump.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public Dump() {
}

/** Opens the piston */
public void open() {
public void close() {
doubleSolenoid.set(DoubleSolenoid.Value.kForward);
SmartDashboard.putBoolean(getName(), true);
}

/** Closes the piston */
public void close() {
public void open() {
doubleSolenoid.set(DoubleSolenoid.Value.kReverse);
SmartDashboard.putBoolean(getName(), false);
}
Expand Down

0 comments on commit a35a082

Please sign in to comment.