Class ClimberReal

java.lang.Object
frc.robot.subsystems.climber.ClimberReal
All Implemented Interfaces:
ClimberIO

public class ClimberReal extends Object implements ClimberIO
Real hardware implementation of the climber subsystem.

This class interfaces with actual TalonFX motor controllers for both the telescope extension and pivot rotation mechanisms. It configures motors with Phoenix 6 features including motion magic control for the pivot and voltage control for the telescope.

See Also:
  • Constructor Details

    • ClimberReal

      public ClimberReal()
      Constructs a new ClimberReal instance and configures all motors and sensors.
  • Method Details

    • setVoltageTelescope

      public void setVoltageTelescope(double volts)
      Sets the voltage for the telescope motor.
      Specified by:
      setVoltageTelescope in interface ClimberIO
      Parameters:
      volts - the voltage to apply to the telescope motor
    • setHeightTelescope

      public void setHeightTelescope(Distance height)
      Sets the target height for the telescope mechanism using pid
      Specified by:
      setHeightTelescope in interface ClimberIO
      Parameters:
      height - the desired height in any distance unit
    • setVoltagePivot

      public void setVoltagePivot(double volts)
      Sets the voltage for the pivot motor.
      Specified by:
      setVoltagePivot in interface ClimberIO
      Parameters:
      volts - the voltage to apply to the pivot motor
    • setAnglePivot

      public void setAnglePivot(Angle angle)
      Sets the target angle for the pivot mechanism using motion magic control.
      Specified by:
      setAnglePivot in interface ClimberIO
      Parameters:
      angle - the desired pivot angle in any angle unit
    • updateInputs

      public void updateInputs(ClimberIO.ClimberInputs inputs)
      Updates the input container with current sensor readings from all motors.

      Refreshes all status signals and updates the input object with current positions, velocities, voltages, and currents for both mechanisms.

      Specified by:
      updateInputs in interface ClimberIO
      Parameters:
      inputs - the input container to populate with current hardware state