File tree Expand file tree Collapse file tree
TeamCode/src/main/java/org/firstinspires/ftc/teamcode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ public enum BallColor {
4040
4141 private Position currentPosition = Position .RESET ;
4242 /** How long it takes to move between positions in milliseconds */
43- private final double MOVE_TIME = 1.25 ;
43+ private final int MOVE_TIME = 1250 ;
4444 /** How long it takes to move between positions and get the ball into the intake in milliseconds */
45- private final double MOVE_DROP_TIME = MOVE_TIME + 1.75 ;
46- private final double MOVE_DROP_SHOOT_TIME = MOVE_DROP_TIME + 2.5 ;
45+ private final int MOVE_DROP_TIME = MOVE_TIME + 1750 ;
46+ private final int MOVE_DROP_SHOOT_TIME = MOVE_DROP_TIME + 2500 ;
4747 ElapsedTime positionTimer = new ElapsedTime ();
4848
4949 /**
Original file line number Diff line number Diff line change @@ -92,10 +92,8 @@ public void init_loop() {
9292 @ Override
9393 public void start () {
9494 timer .reset ();
95- shootTimer .reset ();
9695 }
9796
98- private ElapsedTime shootTimer = new ElapsedTime ();
9997 /*
10098 * Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP
10199 */
@@ -163,14 +161,12 @@ public void loop() {
163161 robot .shooter .setRPM (shooterRpm );
164162 boolean xReady = Math .abs (tagX ) <= xTolerance ;
165163 if (robot .shooter .atSpeedRPM (shooterRpm ) && xReady && patternIndex < obeliskMotif .getPattern ().length ) {
166- if (!robot .indexer .isShooting ()) {
164+ if (!robot .indexer .isShooting () || patternIndex == 0 ) {
167165 robot .indexer .setPosition (obeliskMotif .getPattern ()[patternIndex ], true );
168166 patternIndex ++;
169- shootTimer .reset ();
170167 }
171168 } else if (patternIndex >= obeliskMotif .getPattern ().length ) {
172169 // All done shooting
173- robot .shooter .setRPM (0 );
174170 robot .indexer .setPosition (Indexer .Position .RESET );
175171 }
176172 }
You can’t perform that action at this time.
0 commit comments