forked from Team254/FRC-2019-Public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RocketFarToFeederPath.java
32 lines (24 loc) · 984 Bytes
/
RocketFarToFeederPath.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
32
package com.team254.frc2019.paths;
import com.team254.frc2019.paths.PathBuilder.Waypoint;
import com.team254.lib.control.Path;
import java.util.ArrayList;
public class RocketFarToFeederPath implements PathContainer {
public static final String kLookForTargetMarker = "LOOK_FOR_TARGET";
boolean mLeft;
public RocketFarToFeederPath(boolean left) {
mLeft = left;
}
@Override
public Path buildPath() {
ArrayList<Waypoint> sWaypoints = new ArrayList<Waypoint>();
sWaypoints.add(new Waypoint(205, (mLeft ? 1.0 : -1.0) * 83, 0, 0));
sWaypoints.add(new Waypoint(170, (mLeft ? 1.0 : -1.0) * 40, 40, 120));
sWaypoints.add(new Waypoint(55, (mLeft ? 1.0 : -1.0) * 80, 60, 120, kLookForTargetMarker));
sWaypoints.add(new Waypoint(-20, (mLeft ? 1.0 : -1.0) * 80, 0, 120));
return PathBuilder.buildPathFromWaypoints(sWaypoints);
}
@Override
public boolean isReversed() {
return true;
}
}