Class ChoreoAlert

java.lang.Object
choreo.util.ChoreoAlert

public class ChoreoAlert extends Object
A utility class for creating alerts under the "Choreo Alerts" group.
  • Field Details

    • allianceNotReady

      public static final org.wpilib.util.Alert allianceNotReady
      An alert to be used when alliance-dependent logic is called before an alliance has been determined.
  • Method Details

    • alert

      public static org.wpilib.util.Alert alert(String name, org.wpilib.util.Alert.Level level)
      Creates an alert under the "Choreo" group, using the name as the displayed text.
      Parameters:
      name - The name of the alert; this must be unique within the group
      level - The level of alert
      Returns:
      an Alert published under the "Choreo" group
    • alert

      public static org.wpilib.util.Alert alert(String name, String text, org.wpilib.util.Alert.Level level)
      Creates an alert under the "Choreo" group.
      Parameters:
      name - The name of the alert; this must be unique within the group
      text - The text to display when the alert is active
      level - The level of alert
      Returns:
      an Alert published under the "Choreo" group
    • multiAlert

      public static ChoreoAlert.MultiAlert multiAlert(Function<List<String>, String> textGenerator, org.wpilib.util.Alert.Level level)
      Creates a ChoreoAlert.MultiAlert under the "Choreo" group, using the text generated from an empty list of causes as the name.
      Parameters:
      textGenerator - A function that accepts a list of causes and returns an alert message
      level - The level of alert
      Returns:
      a MultiAlert published under the "Choreo" group
    • multiAlert

      public static ChoreoAlert.MultiAlert multiAlert(String name, Function<List<String>, String> textGenerator, org.wpilib.util.Alert.Level level)
      Creates a ChoreoAlert.MultiAlert under the "Choreo" group.
      Parameters:
      name - The name of the alert; this must be unique within the group
      textGenerator - A function that accepts a list of causes and returns an alert message
      level - The level of alert
      Returns:
      a MultiAlert published under the "Choreo" group