Package frc.alotobots.util
Class PhoenixUtil
java.lang.Object
frc.alotobots.util.PhoenixUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double[]static com.ctre.phoenix6.StatusCodetryUntilOk(int maxAttempts, Supplier<com.ctre.phoenix6.StatusCode> command) Attempts to run the command until no error is produced or max attempts are reached.
-
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 commandcommand- The command to execute- Returns:
- The final status code
-
getSimulationOdometryTimeStamps
public static double[] getSimulationOdometryTimeStamps()
-