Interface WristIO

All Known Implementing Classes:
WristIOTalonFXReal, WristIOTalonFXSim

public interface WristIO
Interface defining the hardware abstraction layer for the wrist subsystem. This interface allows for different hardware implementations (real, simulated, etc.) while maintaining consistent functionality.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Data structure for inputs from wrist hardware.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    setWristOpenLoop(double percentOutput)
    Runs the wrist using direct percentage output (open-loop control).
    default void
    setWristPosition(Angle position, int pidSlot)
    Sets the wrist to run to a target position using closed-loop control.
    default void
    setWristPositionMotionMagic(Angle position, int pidSlot)
    Sets the wrist to run at a target position using motion magic control.
    default void
    setWristVelocity(AngularVelocity velocity, int pidSlot)
    Sets the wrist to run at a target velocity using closed-loop control.
    default void
    Stops all wrist motor movement.
    default void
    Updates the wrist input values from hardware.
  • Method Details

    • updateInputs

      default void updateInputs(WristIO.WristIOInputs inputs)
      Updates the wrist input values from hardware.
      Parameters:
      inputs - The input object to update with the latest hardware state
    • setWristPosition

      default void setWristPosition(Angle position, int pidSlot)
      Sets the wrist to run to a target position using closed-loop control.
      Parameters:
      position - The target angle to move to
      pidSlot - The PID slot to use (0 for velocity, 1 for position)
    • setWristVelocity

      default void setWristVelocity(AngularVelocity velocity, int pidSlot)
      Sets the wrist to run at a target velocity using closed-loop control.
      Parameters:
      velocity - The target velocity to move at
      pidSlot - The PID slot to use (0 for velocity, 1 for position)
    • setWristPositionMotionMagic

      default void setWristPositionMotionMagic(Angle position, int pidSlot)
      Sets the wrist to run at a target position using motion magic control.
      Parameters:
      position - The target position to move to
      pidSlot - The PID slot to use (0 for velocity, 1 for position)
    • setWristOpenLoop

      default void setWristOpenLoop(double percentOutput)
      Runs the wrist using direct percentage output (open-loop control).
      Parameters:
      percentOutput - The motor output as a percentage (-1.0 to 1.0)
    • stop

      default void stop()
      Stops all wrist motor movement.