diff --git a/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/Intake2017.java b/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/Intake2017.java index dd610f8b..654539d7 100644 --- a/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/Intake2017.java +++ b/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/Intake2017.java @@ -14,7 +14,6 @@ public class Intake2017 extends MappedSubsystem { private DoubleSolenoid piston; public boolean isIntaking; public boolean intakeUp; - double fixedPctShoot, movingPctShoot, fixedPctPickup, movingPctPickup; /** * Creates a mapped subsystem and sets its map @@ -29,10 +28,6 @@ public Intake2017(maps.org.usfirst.frc.team449.robot.mechanism.intake.Intake2017 this.actuatedVictor = new VictorSP(map.getActuatedVictor().getPort()); actuatedVictor.setInverted(map.getActuatedVictor().getInverted()); this.piston = new DoubleSolenoid(map.getPistonModuleNum(), map.getPiston().getForward(), map.getPiston().getReverse()); - this.fixedPctPickup = map.getFixedPctPickup(); - this.movingPctPickup = map.getMovingPctPickup(); - this.fixedPctShoot = map.getFixedPctShoot(); - this.movingPctShoot = map.getMovingPctShoot(); } public void setFixedVictor(double speed) { @@ -49,16 +44,6 @@ public void setPiston(DoubleSolenoid.Value value) { intakeUp = (value == DoubleSolenoid.Value.kReverse); } - public void pickupBalls(){ - setFixedVictor(fixedPctPickup); - setActuatedVictor(movingPctPickup); - } - - public void prepareToShoot(){ - setFixedVictor(fixedPctShoot); - setActuatedVictor(movingPctShoot); - } - public void setIntaking(boolean isIntaking){ this.isIntaking = isIntaking; } diff --git a/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/commands/spin/SIDI.java b/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/commands/spin/SIDI.java index fbb2b976..3b5dc771 100644 --- a/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/commands/spin/SIDI.java +++ b/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/commands/spin/SIDI.java @@ -1,12 +1,10 @@ package org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.commands.spin; -import maps.org.usfirst.frc.team449.robot.mechanism.intake.Intake2017Map; import org.usfirst.frc.team449.robot.ReferencingCommand; import org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.Intake2017; /** * Created by ryant on 2017-02-19. - * Sets the intake subsystem to the speed presets for intaking balls. */ public class SIDI extends ReferencingCommand { @@ -19,7 +17,8 @@ public SIDI(Intake2017 intake) { @Override protected void initialize() { - intake.pickupBalls(); + intake.setFixedVictor(-0.7); + intake.setActuatedVictor(1); } @Override diff --git a/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/commands/spin/SIDS.java b/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/commands/spin/SIDS.java index b2b2f5d4..59950634 100644 --- a/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/commands/spin/SIDS.java +++ b/src/main/java/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017/commands/spin/SIDS.java @@ -17,7 +17,8 @@ public SIDS(Intake2017 intake) { @Override protected void initialize() { - intake.prepareToShoot(); + intake.setFixedVictor(-0.3); + intake.setActuatedVictor(0); } @Override diff --git a/src/main/java/org/usfirst/frc/team449/robot/mechanism/singleflywheelshooter/SingleFlywheelShooter.java b/src/main/java/org/usfirst/frc/team449/robot/mechanism/singleflywheelshooter/SingleFlywheelShooter.java index 24a069f7..b576a2fe 100644 --- a/src/main/java/org/usfirst/frc/team449/robot/mechanism/singleflywheelshooter/SingleFlywheelShooter.java +++ b/src/main/java/org/usfirst/frc/team449/robot/mechanism/singleflywheelshooter/SingleFlywheelShooter.java @@ -17,7 +17,7 @@ public class SingleFlywheelShooter extends MappedSubsystem { public boolean spinning; private UnitlessCANTalonSRX talon; - public double throttle; + public double throttle=0.5; /** * Counts per revolution */ @@ -92,6 +92,7 @@ protected void initDefaultCommand() { e.printStackTrace(); } startTime = System.nanoTime(); +// setDefaultCommand(new PIDTune(this)); System.out.println("Finished init default command"); } } diff --git a/src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/IntakeBalls.java b/src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/LoadShooter.java similarity index 91% rename from src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/IntakeBalls.java rename to src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/LoadShooter.java index ac24bbf7..4ac8b15b 100644 --- a/src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/IntakeBalls.java +++ b/src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/LoadShooter.java @@ -15,8 +15,8 @@ /** * Created by ryant on 2017-02-18. */ -public class IntakeBalls extends CommandGroup { - public IntakeBalls(SingleFlywheelShooter sfs, Intake2017 intake, FeederSubsystem feeder) { +public class LoadShooter extends CommandGroup { + public LoadShooter(SingleFlywheelShooter sfs, Intake2017 intake, FeederSubsystem feeder) { requires(intake); addParallel(new DecelerateFlywheel(sfs, 5)); diff --git a/src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/PrepareToShoot.java b/src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/RackShooter.java similarity index 82% rename from src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/PrepareToShoot.java rename to src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/RackShooter.java index 6abea058..524f67b6 100644 --- a/src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/PrepareToShoot.java +++ b/src/main/java/org/usfirst/frc/team449/robot/mechanism/topcommands/shooter/RackShooter.java @@ -9,7 +9,6 @@ import org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.commands.spin.SIDI; import org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.commands.spin.SIDS; import org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.commands.spin.StaticIntakeStop; -import org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.commands.updown.IntakeDown; import org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.commands.updown.IntakeUp; import org.usfirst.frc.team449.robot.mechanism.singleflywheelshooter.SingleFlywheelShooter; import org.usfirst.frc.team449.robot.mechanism.singleflywheelshooter.commands.AccelerateFlywheel; @@ -18,13 +17,13 @@ /** * Created by ryant on 2017-02-18. */ -public class PrepareToShoot extends CommandGroup { - public PrepareToShoot(SingleFlywheelShooter sfs, Intake2017 intake, FeederSubsystem feeder) { +public class RackShooter extends CommandGroup { + public RackShooter(SingleFlywheelShooter sfs, Intake2017 intake, FeederSubsystem feeder) { requires(intake); addParallel(new AccelerateFlywheel(sfs, 5)); - addParallel(new IntakeDown(intake)); + addParallel(new IntakeUp(intake)); addParallel(new SIDS(intake)); addParallel(new StopFeeder(feeder)); diff --git a/src/main/java/org/usfirst/frc/team449/robot/oi/OI2017ArcadeGamepad.java b/src/main/java/org/usfirst/frc/team449/robot/oi/OI2017ArcadeGamepad.java index 293eeff9..2f977757 100644 --- a/src/main/java/org/usfirst/frc/team449/robot/oi/OI2017ArcadeGamepad.java +++ b/src/main/java/org/usfirst/frc/team449/robot/oi/OI2017ArcadeGamepad.java @@ -15,10 +15,12 @@ import org.usfirst.frc.team449.robot.mechanism.climber.commands.StopClimbing; import org.usfirst.frc.team449.robot.mechanism.feeder.commands.ToggleFeeder; import org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.commands.ToggleIntakeUpDown; +import org.usfirst.frc.team449.robot.mechanism.intake.Intake2017.commands.ToggleIntaking; +import org.usfirst.frc.team449.robot.mechanism.singleflywheelshooter.commands.ToggleFlywheel; import org.usfirst.frc.team449.robot.mechanism.singleflywheelshooter.commands.ToggleShooter; import org.usfirst.frc.team449.robot.mechanism.topcommands.shooter.FireShooter; -import org.usfirst.frc.team449.robot.mechanism.topcommands.shooter.IntakeBalls; -import org.usfirst.frc.team449.robot.mechanism.topcommands.shooter.PrepareToShoot; +import org.usfirst.frc.team449.robot.mechanism.topcommands.shooter.LoadShooter; +import org.usfirst.frc.team449.robot.mechanism.topcommands.shooter.RackShooter; import org.usfirst.frc.team449.robot.oi.components.SmoothedThrottle; import org.usfirst.frc.team449.robot.oi.components.Throttle; import org.usfirst.frc.team449.robot.vision.commands.ChangeCam; @@ -193,10 +195,10 @@ public void mapButtons() { shoot.whenPressed(new ToggleShooter(Robot.singleFlywheelShooterSubsystem)); } if (loadShooter != null) { - loadShooter.whenPressed(new IntakeBalls(Robot.singleFlywheelShooterSubsystem, Robot.intakeSubsystem, Robot.feederSubsystem)); + loadShooter.whenPressed(new LoadShooter(Robot.singleFlywheelShooterSubsystem, Robot.intakeSubsystem, Robot.feederSubsystem)); } if (rackShooter != null) { - rackShooter.whenPressed(new PrepareToShoot(Robot.singleFlywheelShooterSubsystem, Robot.intakeSubsystem, Robot.feederSubsystem)); + rackShooter.whenPressed(new RackShooter(Robot.singleFlywheelShooterSubsystem, Robot.intakeSubsystem, Robot.feederSubsystem)); } if (fireShooter != null) { fireShooter.whenPressed(new FireShooter(Robot.singleFlywheelShooterSubsystem, Robot.intakeSubsystem, Robot.feederSubsystem)); diff --git a/src/main/proto/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017.proto b/src/main/proto/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017.proto index c095bc83..ebc51e66 100644 --- a/src/main/proto/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017.proto +++ b/src/main/proto/org/usfirst/frc/team449/robot/mechanism/intake/Intake2017.proto @@ -12,8 +12,4 @@ message Intake2017 { required Motor actuated_victor = 3; required DoubleSolenoid piston = 4; required int32 pistonModuleNum = 5; - required double fixed_pct_pickup = 6; - required double moving_pct_pickup = 7; - required double fixed_pct_shoot = 8; - required double moving_pct_shoot = 9; } \ No newline at end of file diff --git a/src/main/resources/final_map.cfg b/src/main/resources/final_map.cfg index 1a66602b..2627d628 100644 --- a/src/main/resources/final_map.cfg +++ b/src/main/resources/final_map.cfg @@ -371,10 +371,6 @@ intake { reverse: 4 } pistonModuleNum: 15 - fixed_pct_pickup: -0.7 - moving_pct_pickup: 1 - fixed_pct_shoot: -0.3 - moving_pct_pickup: 0 } camera { server {