Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/main/java/com/team1816/season/subsystems/Climber.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class Climber extends SubsystemBase implements ITestableSubsystem {
private CLIMBER_STATE previousWantedState = CLIMBER_STATE.IDLING;

//MOTORS
private final IMotor flipMotor = (IMotor)factory.getDevice(NAME, "flipMotor");
private final IMotor linearSlideMotor = (IMotor)factory.getDevice(NAME, "linearSlideMotor");
private final IMotor flipMotor;
private final IMotor linearSlideMotor;

private final PositionVoltage positionReq = new PositionVoltage(0);

Expand All @@ -45,6 +45,9 @@ public class Climber extends SubsystemBase implements ITestableSubsystem {
public Climber () {
super();
SmartDashboard.putData("Climber", climberMech);

flipMotor = (IMotor)factory.getDevice(NAME, "flipMotor");
linearSlideMotor = (IMotor)factory.getDevice(NAME, "linearSlideMotor");
}

@Override
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/team1816/season/subsystems/Feeder.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ public class Feeder extends SubsystemBase implements ITestableSubsystem {
private FEEDER_STATE previousWantedState = FEEDER_STATE.IDLING;

//MOTORS
private final IMotor feedMotor = (IMotor)factory.getDevice(NAME, "feedMotor");
private final IMotor feedMotor;

private final VelocityVoltage velocityReq = new VelocityVoltage(0);

//PHYSICAL SUBSYSTEM DEPENDENT CONSTANTS
private static final double MIN_FEED_MOTOR_CLAMP = -80;
private static final double MAX_FEED_MOTOR_CLAMP = 80;

public Feeder () {
feedMotor = (IMotor)factory.getDevice(NAME, "feedMotor");
}
@Override
public void periodic() {
readFromHardware();
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/com/team1816/season/subsystems/Gatekeeper.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public class Gatekeeper extends SubsystemBase implements ITestableSubsystem {
private GATEKEEPER_STATE previousWantedState = GATEKEEPER_STATE.CLOSED;

//MOTORS
private final IMotor topMotor = (IMotor)factory.getDevice(NAME, "topMotor");
private final IMotor bottomMotor = (IMotor)factory.getDevice(NAME, "bottomMotor");
private final IMotor topMotor;
private final IMotor bottomMotor;

private final VelocityVoltage voltageReq = new VelocityVoltage(0);

Expand All @@ -29,6 +29,11 @@ public class Gatekeeper extends SubsystemBase implements ITestableSubsystem {
private static final double MIN_BOTTOM_MOTOR_CLAMP = 0;
private static final double MAX_BOTTOM_MOTOR_CLAMP = 80;

public Gatekeeper () {
topMotor = (IMotor) factory.getDevice(NAME, "topMotor");
bottomMotor = (IMotor) factory.getDevice(NAME, "bottomMotor");
}

@Override
public void periodic() {
readFromHardware();
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/team1816/season/subsystems/Intake.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public class Intake extends SubsystemBase implements ITestableSubsystem {
private INTAKE_STATE previousWantedState = INTAKE_STATE.INTAKE_UP;

//MOTORS
private final IMotor intakeMotor = (IMotor) factory.getDevice(NAME, "intakeMotor");
private final IMotor flipperMotor = (IMotor) factory.getDevice(NAME, "flipperMotor");
private final IMotor intakeMotor;
private final IMotor flipperMotor;

private final VelocityVoltage velocityControl = new VelocityVoltage(0);
private final PositionVoltage positionControl = new PositionVoltage(0);
Expand All @@ -46,6 +46,8 @@ public class Intake extends SubsystemBase implements ITestableSubsystem {
public Intake () {
super();
SmartDashboard.putData("Intake", intakeMech);
intakeMotor = (IMotor) factory.getDevice(NAME, "intakeMotor");
flipperMotor = (IMotor) factory.getDevice(NAME, "flipperMotor");
}

@Override
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/com/team1816/season/subsystems/Shooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public class Shooter extends SubsystemBase implements ITestableSubsystem {
private SHOOTER_STATE previousWantedState = SHOOTER_STATE.IDLE;

//MOTORS
private final IMotor topLaunchMotor = (IMotor) factory.getDevice(NAME, "topLaunchMotor");
private final IMotor bottomLaunchMotor = (IMotor) factory.getDevice(NAME, "bottomLaunchMotor");
private final IMotor launchAngleMotor = (IMotor) factory.getDevice(NAME, "launchAngleMotor");
private final IMotor rotationAngleMotor = (IMotor) factory.getDevice(NAME, "rotationAngleMotor");
private final IMotor topLaunchMotor;
private final IMotor bottomLaunchMotor;
private final IMotor launchAngleMotor;
private final IMotor rotationAngleMotor;

private final VelocityVoltage velocityControl = new VelocityVoltage(0);
private final PositionVoltage positionControl = new PositionVoltage(0);
Expand Down Expand Up @@ -138,6 +138,11 @@ public enum SHOOTER_STATE {
public Shooter(){
super();

topLaunchMotor = (IMotor) factory.getDevice(NAME, "topLaunchMotor");
bottomLaunchMotor = (IMotor) factory.getDevice(NAME, "bottomLaunchMotor");
launchAngleMotor = (IMotor) factory.getDevice(NAME, "launchAngleMotor");
rotationAngleMotor = (IMotor) factory.getDevice(NAME, "rotationAngleMotor");

MOTOR_ROTATIONS_PER_LAUNCH_ANGLE_DEGREE = factory.getConstant(NAME, "motorRotationsPerLaunchAngleDegree", 0); //TODO WHEN PHYSICAL SUBSYSTEM EXISTS, set this.
MOTOR_ROTATIONS_PER_ROTATION_ANGLE_DEGREE = factory.getConstant(NAME, "motorRotationsPerRotationAngleDegree", 0); //TODO WHEN PHYSICAL SUBSYSTEM EXISTS, set this.
SHOOTER_OFFSET = new Translation3d(factory.getConstant(NAME, "initialShooterOffsetX",0), factory.getConstant(NAME, "initialShooterOffsetY",0), factory.getConstant(NAME, "initialShooterOffsetZ",0)); //TODO WHEN PHYSICAL SUBSYSTEM EXISTS, set this.
Expand Down
Loading