Class QuestCommandRetryHandler

java.lang.Object
frc.alotobots.library.subsystems.vision.oculus.util.QuestCommandRetryHandler

public class QuestCommandRetryHandler extends Object
Handler for retrying Quest commands with proper delays between attempts.
  • Constructor Details

    • QuestCommandRetryHandler

      public QuestCommandRetryHandler(IntegerPublisher questMosi)
      Creates a new command retry handler with default timing values
      Parameters:
      questMosi - MOSI publisher for sending commands
    • QuestCommandRetryHandler

      public QuestCommandRetryHandler(IntegerPublisher questMosi, double commandDelaySeconds, double retryDelaySeconds)
      Creates a new command retry handler with custom timing values
      Parameters:
      questMosi - MOSI publisher for sending commands
      commandDelaySeconds - Delay between clear and command (seconds)
      retryDelaySeconds - Delay between retry attempts (seconds)
  • Method Details

    • startRetry

      public void startRetry(int maxAttempts, int command, int expectedResponse, int clearCommand, Runnable onSuccess, Runnable onFailure)
      Start a new command retry sequence
    • startRetry

      public void startRetry(int maxAttempts, int command, int expectedResponse, int clearCommand)
      Simplified method that allows skipping callbacks
    • update

      public void update(int currentResponse)
      Update method to be called in updateInputs
      Parameters:
      currentResponse - Current response value
    • isCommandActive

      public boolean isCommandActive()
      Returns whether a command is currently being executed