Skip to content

Commit

Permalink
Simplify PathPlanner conditional in swerve subsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettsummerfi3ld committed Mar 21, 2024
1 parent 33617ba commit 63863d9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void setupPathPlanner() {
// This will flip the path being followed to the red side of the field.
// THE ORIGIN WILL REMAIN ON THE BLUE SIDE
var alliance = DriverStation.getAlliance();
return alliance.isPresent() ? alliance.get() == DriverStation.Alliance.Red : false;
return alliance.isPresent() && alliance.get() == DriverStation.Alliance.Red;
},
this // Reference to this subsystem to set requirements
);
Expand Down

0 comments on commit 63863d9

Please sign in to comment.