Class PhoenixUtil

java.lang.Object
frc.alotobots.util.PhoenixUtil

public final class PhoenixUtil extends Object
  • Constructor Details

    • PhoenixUtil

      public PhoenixUtil()
  • Method Details

    • tryUntilOk

      public static com.ctre.phoenix6.StatusCode tryUntilOk(int maxAttempts, Supplier<com.ctre.phoenix6.StatusCode> command)
      Attempts to run the command until no error is produced or max attempts are reached. Records the result for diagnostic tracking.
      Parameters:
      maxAttempts - Maximum number of attempts to try the command
      command - The command to execute
      Returns:
      The final status code
    • getSimulationOdometryTimeStamps

      public static double[] getSimulationOdometryTimeStamps()