Package org.team1126.lib.util.vendors
Class PhoenixUtil
java.lang.Object
org.team1126.lib.util.vendors.PhoenixUtil
Utilities for the CTRE Phoenix 6 API.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDisables background processes managed by Phoenix, intended for competition use.static booleanRuns a Phoenix API call and checks for errors.static booleanRuns a Phoenix API call and checks for errors.
-
Method Details
-
disableDaemons
public static void disableDaemons()Disables background processes managed by Phoenix, intended for competition use. Note that Phoenix Tuner X will not be able to connect to the robot when this method is in use. -
run
Runs a Phoenix API call and checks for errors. Will try up to 3 times if the target API call fails.- Parameters:
target- The target call to run.- Returns:
trueif success (StatusCode.isOK()),falseotherwise.
-
run
Runs a Phoenix API call and checks for errors.- Parameters:
target- The target call to run.maxTries- The number of times to try the call before failing.1only runs the call once.- Returns:
trueif success (StatusCode.isOK()),falseotherwise.
-