Skip to content

Commit

Permalink
Improve docs & parameter names in AutoSegment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Nov 19, 2024
1 parent 8b025c9 commit 23bf6a3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/main/java/frc/robot/autos/trailblazer/AutoSegment.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@
import frc.robot.autos.trailblazer.constraints.AutoPointConstraint;
import java.util.List;

/**
* A segment is a path (a continuous set of {@link AutoPoint points}) that the roobt will follow.
*/
public class AutoSegment {
public final List<AutoPoint> points;

/**
* Constraints to apply to any points that don't have their own constraints specified. If a point
* specifies its own constraints, this field will be ignored.
*/
public final List<AutoPointConstraint> defaultConstraints;

public AutoSegment(List<AutoPointConstraint> globalConstraints, List<AutoPoint> points) {
this.defaultConstraints = globalConstraints;
public AutoSegment(List<AutoPointConstraint> defaultConstraints, List<AutoPoint> points) {
this.defaultConstraints = defaultConstraints;
this.points = points;
}

public AutoSegment(List<AutoPointConstraint> globalConstraints, AutoPoint... points) {
this(globalConstraints, List.of(points));
public AutoSegment(List<AutoPointConstraint> defaultConstraints, AutoPoint... points) {
this(defaultConstraints, List.of(points));
}

public AutoSegment(List<AutoPoint> points) {
Expand Down

0 comments on commit 23bf6a3

Please sign in to comment.