-
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.
- Loading branch information
Showing
8 changed files
with
84 additions
and
11 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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package frc.robot.subsystems.elevator; | ||
|
||
import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||
|
||
public class Elevator extends SubsystemBase { | ||
/** Creates a new Elevator. */ | ||
private ElevatorInterface elevatorInterface; | ||
private ElevatorInputsAutoLogged inputs = new ElevatorInputsAutoLogged(); | ||
|
||
public Elevator(ElevatorInterface elevatorInterface) { | ||
this.elevatorInterface = elevatorInterface; | ||
} | ||
|
||
@Override | ||
public void periodic() { | ||
// This method will be called once per scheduler run | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/frc/robot/subsystems/elevator/ElevatorConstants.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,15 @@ | ||
package frc.robot.subsystems.elevator; | ||
|
||
public class ElevatorConstants { | ||
public static final double DRUM_RADIUS = 0 - 9; | ||
public static final double ELEVATOR_GEAR_RATIO = 2; | ||
public static final double ENCODER_CONVERSION_FACTOR = 71.81; | ||
public static final double MIN_HEIGHT = 0; | ||
public static final double MAX_HEIGHT = 0 - 9; | ||
|
||
public static final double INTAKE_POSITION = MIN_HEIGHT; | ||
public static final double SHOOT_AMP_POSITION = 0 - 9; | ||
public static final double SHOOT_SPEAKER_POSITION = 0 - 9; | ||
public static final double SHOOT_PASS_POSITION = 0 - 9; | ||
public static final double ELEVATOR_OVER_DEFENSE = MAX_HEIGHT; | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/frc/robot/subsystems/elevator/ElevatorInterface.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.subsystems.elevator; | ||
|
||
import org.littletonrobotics.junction.AutoLog; | ||
|
||
public interface ElevatorInterface { | ||
|
||
@AutoLog | ||
public static class ElevatorInputs { | ||
public double leaderMotorPosition = 0.0; | ||
public double leaderMotorVelocity = 0.0; | ||
public double leaderMotorAppliedVolts = 0.0; | ||
public double leaderMotorCurrentAmps = 0.0; | ||
|
||
public double followerMotorPosition = 0.0; | ||
public double followerMotorVelocity = 0.0; | ||
public double followerMotorAppliedVolts = 0.0; | ||
public double followerMotorCurrentAmps = 0.0; | ||
} | ||
|
||
public default void updateInputs(ElevatorInputs inputs) {} | ||
|
||
public default double getElevatorPosition() { | ||
return 0.0; | ||
} | ||
|
||
public default void setElevatorPosition(double position) {} | ||
|
||
public default void setElevatorSpeed(double speed) {} | ||
|
||
public default void setVolts(double volts) {} | ||
|
||
public default double getVolts() { | ||
return 0.0; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/frc/robot/subsystems/elevator/PhysicalElevator.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,4 @@ | ||
package frc.robot.subsystems.elevator; | ||
|
||
/** Add your docs here. */ | ||
public class PhysicalElevator {} |
4 changes: 4 additions & 0 deletions
4
src/main/java/frc/robot/subsystems/elevator/SimulatedElevator.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,4 @@ | ||
package frc.robot.subsystems.elevator; | ||
|
||
/** Add your docs here. */ | ||
public class SimulatedElevator {} |