Disable creating path from loaded auto

Fix PathPlanner task for macOS only
This commit is contained in:
nathanrsxtn
2022-02-28 17:56:17 -07:00
parent 3048a0567c
commit 40a4d6d369
2 changed files with 6 additions and 5 deletions
+4 -2
View File
@@ -17,8 +17,10 @@
}, },
{ {
"label": "pathPlanner", "label": "pathPlanner",
"type": "process", "type": "shell",
"command": "open -n /Applications/PathPlanner.app", "osx": {
"command": "open -n /Applications/PathPlanner.app"
},
"presentation": { "presentation": {
"echo": false, "echo": false,
"reveal": "silent", "reveal": "silent",
@@ -233,7 +233,7 @@ public class RobotContainer {
return m_operatorXbox; return m_operatorXbox;
} }
private /* final */ List<Waypoint> pathPoints = new ArrayList<>(); private final List<Waypoint> pathPoints = new ArrayList<>();
public void recordInit() { public void recordInit() {
SmartDashboard.putData("Recording", SmartDashboard.putData("Recording",
@@ -274,8 +274,7 @@ public class RobotContainer {
} }
public PathPlannerUtil.Path createPath(Double maxVelocity, Double maxAcceleration, Boolean isReversed) { public PathPlannerUtil.Path createPath(Double maxVelocity, Double maxAcceleration, Boolean isReversed) {
pathPoints = Arrays.stream(PathPlannerUtil.Path.read(autoChooser.getSelected()).waypoints.get()) // pathPoints = Arrays.stream(PathPlannerUtil.Path.read(autoChooser.getSelected()).waypoints.get()).collect(Collectors.toList());
.collect(Collectors.toList());
// Remove points whose angles to neighboring points are less than 10 degrees // Remove points whose angles to neighboring points are less than 10 degrees
// apart. // apart.
int j = 0; int j = 0;