-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating some subsystems and adding some variables to constants
- Loading branch information
Showing
7 changed files
with
67 additions
and
39 deletions.
There are no files selected for viewing
35 changes: 15 additions & 20 deletions
35
main/java/frc/robot/Commands/PostionsCommands/ElevatorGroundPickUp.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,26 +1,21 @@ | ||
import frc.robot.subsystems.MechanicalParts.ElevatorSubsystem; | ||
import frc.robot.Commands.PostionsCommands; | ||
|
||
|
||
|
||
public class ElevatorGroundPickUp { | ||
|
||
private final Elevator elevator; | ||
|
||
public ElevatorGroundPickUp(Elevator elevator) { | ||
this.elevator = elevator; | ||
private final Elevator elevator; | ||
|
||
public ElevatorGroundPickUp(Elevator elevator) { | ||
this.elevator = elevator; | ||
|
||
addRequirements(elevator); | ||
} | ||
addRequirements(elevator); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
if (!elevator.atTargetExtent()) return; | ||
elevator.setDegrees(ElevatorGroundPickUp.ElevatorPosition); | ||
} | ||
@Override | ||
public void execute() { | ||
if (!elevator.atTargetExtent()) return; | ||
elevator.setDegrees(ElevatorGroundPickUp.ElevatorPosition); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
elevator.hold(); | ||
} | ||
@Override | ||
public void end(boolean interrupted) { | ||
elevator.hold(); | ||
} | ||
} |
28 changes: 14 additions & 14 deletions
28
main/java/frc/robot/Commands/PostionsCommands/ElevatorL1.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,20 +1,20 @@ | ||
public class ElevatorL1 { | ||
private final Elevator elevator; | ||
private final Elevator elevator; | ||
|
||
public ElevatorL1(Elevator elevator) { | ||
this.elevator = elevator; | ||
public ElevatorL1(Elevator elevator) { | ||
this.elevator = elevator; | ||
|
||
addRequirements(elevator); | ||
} | ||
addRequirements(elevator); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
if (!elevator.atTargetExtent()) return; | ||
elevator.setDegrees(ElevatorL1.ElevatorPosition); | ||
} | ||
@Override | ||
public void execute() { | ||
if (!elevator.atTargetExtent()) return; | ||
elevator.setDegrees(ElevatorL1.ElevatorPosition); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
elevator.hold(); | ||
} | ||
@Override | ||
public void end(boolean interrupted) { | ||
elevator.hold(); | ||
} | ||
} |
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
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,3 +1,28 @@ | ||
public class AlgaeIntake { | ||
import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||
|
||
public class AlgaeIntake extends SubsystemBase { | ||
private final CANSparkMax AlgaeIntakeMotor; | ||
public AlgaeIntake(int AlgaeIntakeMotorID) { | ||
AlgaeIntakeMotor = | ||
new CANSparkMax(AlgaeIntakeConstants.AlgaeIntakeMotorID, CANSparkMax.MotorType.kBrushless); | ||
|
||
} | ||
} | ||
public void RotateRight() { | ||
AlgaeIntakeMotor.set(1); | ||
} | ||
|
||
public void down() { | ||
AlgaeIntakeMotor.set(-1); | ||
} | ||
|
||
public void hold() { | ||
AlgaeIntakeMotor.set(0); | ||
} | ||
|
||
@Override | ||
public void periodic() {} | ||
|
||
public void stop() { | ||
AlgaeIntakeMotor.stopMotor(); | ||
} | ||
} |
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,3 +1,6 @@ | ||
import edu.wpi.first.wpilibj2.command.Subsystem; | ||
|
||
public class Arm { | ||
|
||
|
||
} |
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 @@ | ||
public class CoralIntake {} |