Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen756 committed Sep 14, 2024
1 parent 485f170 commit 846915b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/main/java/frc/robot/intake/IntakeSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import com.ctre.phoenix6.hardware.TalonFX;
import com.revrobotics.CANSparkMax;
import dev.doglog.DogLog;
import edu.wpi.first.math.filter.Debouncer;
import frc.robot.config.RobotConfig;
import frc.robot.util.scheduling.SubsystemPriority;
import frc.robot.util.state_machines.StateMachine;

public class IntakeSubsystem extends StateMachine<IntakeState> {
private final TalonFX mainMotor;
private final CANSparkMax centeringMotor;
private final Debouncer debouncer = RobotConfig.get().intake().debouncer();

public IntakeSubsystem(TalonFX mainMotor, CANSparkMax centeringMotor) {
super(SubsystemPriority.INTAKE, IntakeState.IDLE);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/queuer/QueuerSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class QueuerSubsystem extends StateMachine<QueuerState> {
private final Debouncer debouncer = RobotConfig.get().queuer().debouncer();

public QueuerSubsystem(TalonFX motor, DigitalInput sensor) {
super(SubsystemPriority.QUEUER, queuer.setState(QueuerState.IDLE));
super(SubsystemPriority.QUEUER, QueuerState.IDLE);

this.sensor = sensor;
this.motor = motor;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/robot_manager/RobotManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,19 @@ protected void afterTransition(RobotState newState) {
arm.setState(ArmState.CLIMBING_1_LINEUP);
shooter.setState(ShooterState.IDLE_STOPPED);
intake.setState(IntakeState.IDLE);
queuer.setState(queuer.setState(QueuerState.IDLE));
queuer.setState(QueuerState.IDLE);
}
case CLIMBING_2_HANGING -> {
arm.setState(ArmState.CLIMBING_2_HANGING);
shooter.setState(ShooterState.IDLE_STOPPED);
intake.setState(IntakeState.IDLE);
queuer.setState(queuer.setState(QueuerState.IDLE));
queuer.setState(QueuerState.IDLE);
}
case IDLE_NO_GP -> {
arm.setState(ArmState.IDLE);
shooter.setState(ShooterState.IDLE_STOPPED);
intake.setState(IntakeState.IDLE);
queuer.setState(queuer.setState(QueuerState.IDLE));
queuer.setState(QueuerState.IDLE);
}
case IDLE_WITH_GP -> {
arm.setState(ArmState.IDLE);
Expand Down

0 comments on commit 846915b

Please sign in to comment.