-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coment out drive (we took off all the motors)
- Loading branch information
1 parent
925bb93
commit ffff640
Showing
5 changed files
with
113 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 47 additions & 47 deletions
94
src/main/java/frc/robot/commands/ShootNearSpeakerCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
package frc.robot.commands; | ||
|
||
import edu.wpi.first.wpilibj.DriverStation; | ||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.Constants; | ||
import frc.robot.Robot; | ||
import frc.robot.subsystems.manager.ManagerStates; | ||
|
||
public class ShootNearSpeakerCommand extends Command { | ||
|
||
// Kinda an auto command, but it has a is finished condition soooo too bad so sad | ||
|
||
Robot robot = null; | ||
public boolean shot = false; | ||
|
||
public ShootNearSpeakerCommand(Robot robot) { | ||
this.robot = robot; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
robot.managerSubsystem.setState(ManagerStates.SPINNING_UP); | ||
shot = false; | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
if ( | ||
robot.managerSubsystem.driveNearSetPose( | ||
(DriverStation.getAlliance().get() == DriverStation.Alliance.Blue | ||
? Constants.AutoAlign.blueSpeakerPose | ||
: Constants.AutoAlign.redSpeakerPose) | ||
) && | ||
!shot && | ||
robot.managerSubsystem.intakeNearSetpoints() | ||
) { | ||
// Good practice to do this? Prob not. Not too important so idc | ||
robot.managerSubsystem.setState(ManagerStates.SHOOTING); | ||
shot = true; | ||
} | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return shot && robot.managerSubsystem.getState() == ManagerStates.IDLE; | ||
} | ||
} | ||
// package frc.robot.commands; | ||
|
||
// import edu.wpi.first.wpilibj.DriverStation; | ||
// import edu.wpi.first.wpilibj2.command.Command; | ||
// import frc.robot.Constants; | ||
// import frc.robot.Robot; | ||
// import frc.robot.subsystems.manager.ManagerStates; | ||
|
||
// public class ShootNearSpeakerCommand extends Command { | ||
|
||
// // Kinda an auto command, but it has a is finished condition soooo too bad so sad | ||
|
||
// Robot robot = null; | ||
// public boolean shot = false; | ||
|
||
// public ShootNearSpeakerCommand(Robot robot) { | ||
// this.robot = robot; | ||
// } | ||
|
||
// @Override | ||
// public void initialize() { | ||
// robot.managerSubsystem.setState(ManagerStates.SPINNING_UP); | ||
// shot = false; | ||
// } | ||
|
||
// @Override | ||
// public void execute() { | ||
// if ( | ||
// robot.managerSubsystem.driveNearSetPose( | ||
// (DriverStation.getAlliance().get() == DriverStation.Alliance.Blue | ||
// ? Constants.AutoAlign.blueSpeakerPose | ||
// : Constants.AutoAlign.redSpeakerPose) | ||
// ) && | ||
// !shot && | ||
// robot.managerSubsystem.intakeNearSetpoints() | ||
// ) { | ||
// // Good practice to do this? Prob not. Not too important so idc | ||
// robot.managerSubsystem.setState(ManagerStates.SHOOTING); | ||
// shot = true; | ||
// } | ||
// } | ||
|
||
// @Override | ||
// public boolean isFinished() { | ||
// return shot && robot.managerSubsystem.getState() == ManagerStates.IDLE; | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters