Record Class ShotGate.Inputs
java.lang.Object
java.lang.Record
frc.robot.subsystems.ShotGate.Inputs
- Record Components:
launching- the super state is one that feedsoverride- the operator is holding the bypassnowSeconds- the robot clock (replayed, pinned per loop)flywheelTargetRpm- flywheel speed the shot wants; 0 or less when not on a shothoodDeg- measured hood anglehoodDegPerSec- measured hood speedhoodTargetDeg- hood angle the shot wantshoodZeroed- the hood has homed since bootcheckAim- 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 heldaimToleranceRad- start tolerance forheadingErrorRadcheckRange- 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 Summary
ConstructorsConstructorDescriptionInputs(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 aInputsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theaimToleranceRadrecord component.booleancheckAim()Returns the value of thecheckAimrecord component.booleanReturns the value of thecheckRangerecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theflywheelTargetRpmrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theheadingErrorRadrecord component.doublehoodDeg()Returns the value of thehoodDegrecord component.doubleReturns the value of thehoodDegPerSecrecord component.doubleReturns the value of thehoodTargetDegrecord component.booleanReturns the value of thehoodZeroedrecord component.booleanReturns the value of thelaunchingrecord component.doubleReturns the value of thenowSecondsrecord component.booleanoverride()Returns the value of theoverriderecord component.booleanReturns the value of theshotValidrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aInputsrecord class.- Parameters:
launching- the value for thelaunchingrecord componentoverride- the value for theoverriderecord componentnowSeconds- the value for thenowSecondsrecord componentflywheelTargetRpm- the value for theflywheelTargetRpmrecord componenthoodDeg- the value for thehoodDegrecord componenthoodDegPerSec- the value for thehoodDegPerSecrecord componenthoodTargetDeg- the value for thehoodTargetDegrecord componenthoodZeroed- the value for thehoodZeroedrecord componentcheckAim- the value for thecheckAimrecord componentheadingErrorRad- the value for theheadingErrorRadrecord componentaimToleranceRad- the value for theaimToleranceRadrecord componentcheckRange- the value for thecheckRangerecord componentshotValid- the value for theshotValidrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
launching
-
override
-
nowSeconds
public double nowSeconds()Returns the value of thenowSecondsrecord component.- Returns:
- the value of the
nowSecondsrecord component
-
flywheelTargetRpm
public double flywheelTargetRpm()Returns the value of theflywheelTargetRpmrecord component.- Returns:
- the value of the
flywheelTargetRpmrecord component
-
hoodDeg
-
hoodDegPerSec
public double hoodDegPerSec()Returns the value of thehoodDegPerSecrecord component.- Returns:
- the value of the
hoodDegPerSecrecord component
-
hoodTargetDeg
public double hoodTargetDeg()Returns the value of thehoodTargetDegrecord component.- Returns:
- the value of the
hoodTargetDegrecord component
-
hoodZeroed
public boolean hoodZeroed()Returns the value of thehoodZeroedrecord component.- Returns:
- the value of the
hoodZeroedrecord component
-
checkAim
-
headingErrorRad
public double headingErrorRad()Returns the value of theheadingErrorRadrecord component.- Returns:
- the value of the
headingErrorRadrecord component
-
aimToleranceRad
public double aimToleranceRad()Returns the value of theaimToleranceRadrecord component.- Returns:
- the value of the
aimToleranceRadrecord component
-
checkRange
public boolean checkRange()Returns the value of thecheckRangerecord component.- Returns:
- the value of the
checkRangerecord component
-
shotValid
-