001package tagalong.logging;
002
003import java.lang.Cloneable;
004import java.lang.Override;
005import org.littletonrobotics.junction.LogTable;
006import org.littletonrobotics.junction.inputs.LoggableInputs;
007
008/**
009 * Logger for elevator inputs
010 */
011public class ElevatorIOInputsAutoLogged
012    extends ElevatorIO.ElevatorIOInputs implements LoggableInputs, Cloneable {
013  @Override
014  public void toLog(LogTable table) {
015    table.put("ElevatorHeightM", elevatorHeightM);
016    table.put("ElevatorVelocityMPS", elevatorVelocityMPS);
017    table.put("ElevatorAppliedVolts", elevatorAppliedVolts);
018    table.put("ElevatorCurrentAmps", elevatorCurrentAmps);
019  }
020
021  @Override
022  public void fromLog(LogTable table) {
023    elevatorHeightM = table.get("ElevatorHeightM", elevatorHeightM);
024    elevatorVelocityMPS = table.get("ElevatorVelocityMPS", elevatorVelocityMPS);
025    elevatorAppliedVolts = table.get("ElevatorAppliedVolts", elevatorAppliedVolts);
026    elevatorCurrentAmps = table.get("ElevatorCurrentAmps", elevatorCurrentAmps);
027  }
028
029  /**
030   * Returns a copy of ElevatorIOInputsAutoLogged
031   */
032  public ElevatorIOInputsAutoLogged clone() {
033    ElevatorIOInputsAutoLogged copy = new ElevatorIOInputsAutoLogged();
034    copy.elevatorHeightM = this.elevatorHeightM;
035    copy.elevatorVelocityMPS = this.elevatorVelocityMPS;
036    copy.elevatorAppliedVolts = this.elevatorAppliedVolts;
037    copy.elevatorCurrentAmps = this.elevatorCurrentAmps;
038    return copy;
039  }
040}