forked from Team254/FRC-2019-Public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CargoShip1ToFeederPath.java
31 lines (23 loc) · 1004 Bytes
/
CargoShip1ToFeederPath.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 CargoShip1ToFeederPath implements PathContainer {
public static final String kLookForTargetMarker = "LOOK_FOR_TARGET";
boolean mLeft;
public CargoShip1ToFeederPath(boolean left) {
mLeft = left;
}
@Override
public Path buildPath() {
ArrayList<PathBuilder.Waypoint> sWaypoints = new ArrayList<PathBuilder.Waypoint>();
sWaypoints.add(new PathBuilder.Waypoint(205, (mLeft ? 1.0 : -1.0) * 5, 0, 120));
sWaypoints.add(new PathBuilder.Waypoint(105, (mLeft ? 1.0 : -1.0) * 40, 35, 100));
sWaypoints.add(new PathBuilder.Waypoint(55, (mLeft ? 1.0 : -1.0) * 75, 0, 120, kLookForTargetMarker));
sWaypoints.add(new PathBuilder.Waypoint(-20, (mLeft ? 1.0 : -1.0) * 75, 0, 120));
return PathBuilder.buildPathFromWaypoints(sWaypoints);
}
@Override
public boolean isReversed() {
return true;
}
}