forked from Team254/FRC-2019-Public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FeederToCargoShip1Path.java
31 lines (23 loc) · 998 Bytes
/
FeederToCargoShip1Path.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.team254.frc2019.paths;
import com.team254.lib.control.Path;
import java.util.ArrayList;
public class FeederToCargoShip1Path implements PathContainer {
public static final String kTurnTurretMarker = "READY_TO_TURN";
boolean mLeft;
public FeederToCargoShip1Path(boolean left) {
mLeft = left;
}
@Override
public Path buildPath() {
ArrayList<PathBuilder.Waypoint> sWaypoints = new ArrayList<PathBuilder.Waypoint>();
sWaypoints.add(new PathBuilder.Waypoint(-73, (mLeft ? 1.0 : -1.0) * 80, 0, 120));
sWaypoints.add(new PathBuilder.Waypoint(-25, (mLeft ? 1.0 : -1.0) * 80, 0, 120, kTurnTurretMarker));
sWaypoints.add(new PathBuilder.Waypoint(100, (mLeft ? 1.0 : -1.0) * 40, 40, 100));
sWaypoints.add(new PathBuilder.Waypoint(195, (mLeft ? 1.0 : -1.0) * 0, 0, 120));
return PathBuilder.buildPathFromWaypoints(sWaypoints);
}
@Override
public boolean isReversed() {
return false;
}
}