Class HoodIOServo

java.lang.Object
frc.robot.subsystems.shooter.hood.HoodIOServo
All Implemented Interfaces:
HoodIO

public class HoodIOServo extends Object implements HoodIO
Real IO implementation for the shooter hood using a PWM servo.

This implementation maps the desired hood length to a servo position, and models the servo's movement in updateInputs(HoodIOInputs) to provide realistic feedback for simulation and logging.

  • Constructor Details

    • HoodIOServo

      public HoodIOServo()
      Creates a new HoodIOServo and configures the servo PWM bounds.
  • Method Details

    • updateInputs

      public void updateInputs(HoodIO.HoodIOInputs inputs)
      Updates inputs by modeling the servo movement over time.
      Specified by:
      updateInputs in interface HoodIO
      Parameters:
      inputs - The inputs object to update.
    • setLength

      public void setLength(Distance length)
      Commands the servo to a specific position corresponding to a desired hood length.
      Specified by:
      setLength in interface HoodIO
      Parameters:
      length - The target length for the actuator.