Class BLineUtil.BLineConfig

java.lang.Object
com.stuypulse.robot.util.auton.BLineUtil.BLineConfig
Enclosing class:
BLineUtil

public static class BLineUtil.BLineConfig extends Object

BLine Configuration

Associates an autonomous routine name and one or more BLine path names with a factory method that creates the corresponding BLineAuton. Create one configuration for each routine, then call one of the register methods to add it to an autonomous chooser.

  • Field Details

  • Constructor Details

    • BLineConfig

      public BLineConfig(String name, Function<bline.path.Path[], BLineAuton> auton, String... paths)

      Constructor for a BLineConfig

      Stores the routine name, path names, and factory. Checks if every path exists and reports missing paths and suggested closest matches to the Driver Station.

      Parameters:
      name - The name to display for this autonomous routine
      auton - Factory that creates the routine from the loaded paths
      paths - BLine path names used by the routine, in the order expected by the factory
  • Method Details

    • buildBLineAuton

      Loads the configured paths and passes them to the routine factory.
      Returns:
      The autonomous routine created from the configured paths
    • register

      public BLineUtil.BLineConfig register(org.littletonrobotics.junction.networktables.LoggedNetworkChooser<Auton> chooser)
      Adds this routine to a LoggedNetworkChooser under the configured name.
      Parameters:
      chooser - The chooser that will display this routine
      Returns:
      This instance of the class, for method chaining
    • register

      Registers this routine with AutonOpMode's internal chooser.
      Returns:
      This instance of the class, for method chaining
    • registerDefault

      public BLineUtil.BLineConfig registerDefault(org.littletonrobotics.junction.networktables.LoggedNetworkChooser<Auton> chooser)
      Adds this routine as the default option in a LoggedNetworkChooser.
      Parameters:
      chooser - The chooser that will display this routine
      Returns:
      This instance of the class, for method chaining
    • registerDefault

      Registers this routine as the default with AutonOpMode's internal chooser.
      Returns:
      This instance of the class, for method chaining