generated from Team-Optix-3749/Robot-Code-Template
-
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.
- Loading branch information
Showing
23 changed files
with
656 additions
and
11 deletions.
There are no files selected for viewing
Empty file.
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 |
---|---|---|
|
@@ -91,7 +91,6 @@ | |
], | ||
"robotJoysticks": [ | ||
{ | ||
|
||
"guid": "Keyboard0" | ||
} | ||
] | ||
|
19 changes: 19 additions & 0 deletions
19
Team-3749-2025/src/main/java/frc/robot/BuildConstants.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package frc.robot; | ||
|
||
/** | ||
* Automatically generated file containing build version information. | ||
*/ | ||
public final class BuildConstants { | ||
public static final String MAVEN_GROUP = ""; | ||
public static final String MAVEN_NAME = "Team-3749-2025"; | ||
public static final String VERSION = "unspecified"; | ||
public static final int GIT_REVISION = 160; | ||
public static final String GIT_SHA = "036d8e339f0832bf1e0a3fe05cee0f4b0c16d30f"; | ||
public static final String GIT_DATE = "2025-01-25 01:05:41 GMT"; | ||
public static final String GIT_BRANCH = "advantage_kit"; | ||
public static final String BUILD_DATE = "2025-01-25 01:13:53 GMT"; | ||
public static final long BUILD_UNIX_TIME = 1737767633951L; | ||
public static final int DIRTY = 0; | ||
|
||
private BuildConstants(){} | ||
} |
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
58 changes: 58 additions & 0 deletions
58
Team-3749-2025/src/main/java/frc/robot/commands/integration/Handoff.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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package frc.robot.commands.integration; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.arm.coral.CoralArm; | ||
import frc.robot.subsystems.chute.Chute; | ||
import frc.robot.subsystems.elevator.Elevator; | ||
import frc.robot.subsystems.elevator.ElevatorConstants; | ||
import frc.robot.subsystems.elevator.ElevatorConstants.ElevatorStates; | ||
import frc.robot.subsystems.roller.RollerConstants; | ||
import frc.robot.subsystems.arm.coral.CoralArmConstants; | ||
import frc.robot.subsystems.roller.Roller; | ||
|
||
/* | ||
* Handoff command for coral intake to chute | ||
* | ||
* @author Dhyan Soni | ||
*/ | ||
|
||
public class Handoff extends Command { | ||
private final Chute chute; | ||
private final CoralArm coralArm; | ||
private final Elevator elevator; | ||
private final Roller coralRoller; | ||
|
||
public Handoff(Chute chute, CoralArm coralArm, Elevator elevator, Roller coralRoller) { | ||
this.chute = chute; | ||
this.coralArm = coralArm; | ||
this.elevator = elevator; | ||
this.coralRoller = coralRoller; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
coralArm.setState(CoralArmConstants.ArmStates.HAND_OFF); | ||
coralRoller.setState(RollerConstants.RollerStates.MAINTAIN); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
if (coralArm.getState() == CoralArmConstants.ArmStates.HAND_OFF && coralArm.getIsStableState()){ | ||
elevator.setState(ElevatorConstants.ElevatorStates.STOW); | ||
} | ||
if (elevator.getState() == ElevatorStates.STOW){ // might need to edit elevator.getIsStableState() | ||
coralRoller.setState(RollerConstants.RollerStates.SCORE); // reverse spinning | ||
} | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
coralArm.setState(CoralArmConstants.ArmStates.STOPPED); | ||
coralRoller.setState(RollerConstants.RollerStates.STOP); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return chute.hasPiece(); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
Team-3749-2025/src/main/java/frc/robot/commands/integration/IntakeFloor.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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package frc.robot.commands.integration; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.arm.coral.CoralArm; | ||
import frc.robot.subsystems.roller.RollerConstants; | ||
import frc.robot.subsystems.arm.coral.CoralArmConstants; | ||
import frc.robot.subsystems.roller.Roller; | ||
|
||
public class IntakeFloor extends Command { | ||
private final CoralArm coralArm; | ||
private final Roller coralRoller; | ||
|
||
public IntakeFloor(CoralArm coralArm, Roller coralRoller) { | ||
this.coralArm = coralArm; | ||
this.coralRoller = coralRoller; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
coralArm.setState(CoralArmConstants.ArmStates.CORAL_PICKUP); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
coralRoller.setState(RollerConstants.RollerStates.RUN); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
coralArm.setState(CoralArmConstants.ArmStates.STOPPED); | ||
coralRoller.setState(RollerConstants.RollerStates.MAINTAIN); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
if (coralArm.hasPiece()){ | ||
return true; | ||
} | ||
return false; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
Team-3749-2025/src/main/java/frc/robot/commands/integration/IntakeSource.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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package frc.robot.commands.integration; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.chute.Chute; | ||
import frc.robot.subsystems.elevator.Elevator; | ||
import frc.robot.subsystems.elevator.ElevatorConstants.ElevatorStates; | ||
import frc.robot.subsystems.roller.Roller; | ||
import frc.robot.subsystems.roller.RollerConstants; | ||
|
||
public class IntakeSource extends Command { | ||
private final Roller scoringRoller; | ||
private final Elevator elevator; | ||
private final Chute chute; | ||
|
||
public IntakeSource(Roller scoringRoller, Elevator elevator, Chute chute) { | ||
this.scoringRoller = scoringRoller; | ||
this.elevator = elevator; | ||
this.chute = chute; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
elevator.setState(ElevatorStates.SOURCE); | ||
scoringRoller.setState(RollerConstants.RollerStates.MAINTAIN); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
if (elevator.getState() == ElevatorStates.SOURCE && elevator.getIsStableState()) { | ||
scoringRoller.setState(RollerConstants.RollerStates.RUN); | ||
} | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
scoringRoller.setState(RollerConstants.RollerStates.STOP); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
if (scoringRoller.hasPiece()) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
Team-3749-2025/src/main/java/frc/robot/commands/integration/KnockAlgae.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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package frc.robot.commands.integration; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.elevator.Elevator; | ||
import frc.robot.subsystems.elevator.ElevatorConstants.ElevatorStates; | ||
import frc.robot.subsystems.roller.Roller; | ||
import frc.robot.subsystems.roller.RollerConstants; | ||
|
||
public class KnockAlgae extends Command { | ||
private final Elevator elevator; | ||
private final Roller algaeRoller; | ||
private final ElevatorStates state; | ||
|
||
public KnockAlgae(Elevator elevator, Roller algaeRoller, ElevatorStates state) { | ||
this.elevator = elevator; | ||
this.algaeRoller = algaeRoller; | ||
this.state = state; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
algaeRoller.setState(RollerConstants.RollerStates.MAINTAIN); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
algaeRoller.setState(RollerConstants.RollerStates.RUN); | ||
elevator.setState(state); | ||
System.out.println(elevator.getState()); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
elevator.setState(ElevatorStates.STOW); | ||
algaeRoller.setState(RollerConstants.RollerStates.STOP); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
if (elevator.getState() == state && elevator.getIsStableState()) { | ||
return true; | ||
} | ||
return false; // change later to isAlgaeRemoved() | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
Team-3749-2025/src/main/java/frc/robot/commands/integration/OuttakeCoral.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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package frc.robot.commands.integration; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.arm.coral.CoralArm; | ||
import frc.robot.subsystems.roller.RollerConstants; | ||
import frc.robot.subsystems.roller.Roller; | ||
|
||
public class OuttakeCoral extends Command { | ||
private final CoralArm coralArm; | ||
private final Roller coralRoller; | ||
|
||
public OuttakeCoral(CoralArm coralArm, Roller coralRoller) { | ||
this.coralArm = coralArm; | ||
this.coralRoller = coralRoller; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
coralRoller.setState(RollerConstants.RollerStates.SCORE); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
coralRoller.setState(RollerConstants.RollerStates.STOP); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return !coralArm.hasPiece(); | ||
} | ||
} |
Oops, something went wrong.