Record Class ShotGate.Inputs

java.lang.Object
java.lang.Record
frc.robot.subsystems.ShotGate.Inputs
Record Components:
launching - the super state is one that feeds
override - the operator is holding the bypass
nowSeconds - the robot clock (replayed, pinned per loop)
flywheelTargetRpm - flywheel speed the shot wants; 0 or less when not on a shot
hoodDeg - measured hood angle
hoodDegPerSec - measured hood speed
hoodTargetDeg - hood angle the shot wants
hoodZeroed - the hood has homed since boot
checkAim - whether heading votes (false when nothing is aiming the drivetrain: the set shot, where the driver aims, and the X-brake launch)
headingErrorRad - fused heading minus the heading being held
aimToleranceRad - start tolerance for headingErrorRad
checkRange - whether range votes (false for the set shot, and while the pose is not trusted, when range is not measuring anything)
shotValid - the distance is inside the shot model's fitted range
Enclosing class:
ShotGate

public static record ShotGate.Inputs(boolean launching, boolean override, double nowSeconds, double flywheelTargetRpm, double hoodDeg, double hoodDegPerSec, double hoodTargetDeg, boolean hoodZeroed, boolean checkAim, double headingErrorRad, double aimToleranceRad, boolean checkRange, boolean shotValid) extends Record
One loop's view of the shot, every field from a logged input or something computed from one.
  • Constructor Details

    • Inputs

      public Inputs(boolean launching, boolean override, double nowSeconds, double flywheelTargetRpm, double hoodDeg, double hoodDegPerSec, double hoodTargetDeg, boolean hoodZeroed, boolean checkAim, double headingErrorRad, double aimToleranceRad, boolean checkRange, boolean shotValid)
      Creates an instance of a Inputs record class.
      Parameters:
      launching - the value for the launching record component
      override - the value for the override record component
      nowSeconds - the value for the nowSeconds record component
      flywheelTargetRpm - the value for the flywheelTargetRpm record component
      hoodDeg - the value for the hoodDeg record component
      hoodDegPerSec - the value for the hoodDegPerSec record component
      hoodTargetDeg - the value for the hoodTargetDeg record component
      hoodZeroed - the value for the hoodZeroed record component
      checkAim - the value for the checkAim record component
      headingErrorRad - the value for the headingErrorRad record component
      aimToleranceRad - the value for the aimToleranceRad record component
      checkRange - the value for the checkRange record component
      shotValid - the value for the shotValid record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • launching

      public boolean launching()
      Returns the value of the launching record component.
      Returns:
      the value of the launching record component
    • override

      public boolean override()
      Returns the value of the override record component.
      Returns:
      the value of the override record component
    • nowSeconds

      public double nowSeconds()
      Returns the value of the nowSeconds record component.
      Returns:
      the value of the nowSeconds record component
    • flywheelTargetRpm

      public double flywheelTargetRpm()
      Returns the value of the flywheelTargetRpm record component.
      Returns:
      the value of the flywheelTargetRpm record component
    • hoodDeg

      public double hoodDeg()
      Returns the value of the hoodDeg record component.
      Returns:
      the value of the hoodDeg record component
    • hoodDegPerSec

      public double hoodDegPerSec()
      Returns the value of the hoodDegPerSec record component.
      Returns:
      the value of the hoodDegPerSec record component
    • hoodTargetDeg

      public double hoodTargetDeg()
      Returns the value of the hoodTargetDeg record component.
      Returns:
      the value of the hoodTargetDeg record component
    • hoodZeroed

      public boolean hoodZeroed()
      Returns the value of the hoodZeroed record component.
      Returns:
      the value of the hoodZeroed record component
    • checkAim

      public boolean checkAim()
      Returns the value of the checkAim record component.
      Returns:
      the value of the checkAim record component
    • headingErrorRad

      public double headingErrorRad()
      Returns the value of the headingErrorRad record component.
      Returns:
      the value of the headingErrorRad record component
    • aimToleranceRad

      public double aimToleranceRad()
      Returns the value of the aimToleranceRad record component.
      Returns:
      the value of the aimToleranceRad record component
    • checkRange

      public boolean checkRange()
      Returns the value of the checkRange record component.
      Returns:
      the value of the checkRange record component
    • shotValid

      public boolean shotValid()
      Returns the value of the shotValid record component.
      Returns:
      the value of the shotValid record component