Record Class ShotGate.Decision
java.lang.Object
java.lang.Record
frc.robot.subsystems.ShotGate.Decision
- Record Components:
ready- every start check passes right now (what the driver waits for; also shown while tracking, before the trigger is pulled)feed- fuel may go into the flywheel this loopreason- why it may or may notblocker- what is holding the feed (ShotGate.Blocker.NONEwhile a volley is open). When the override or timeout feeds, this is what they bypass. Not launching, this is what would hold a volley that started nowsecondsHeld- how long this launch has been held so far, 0 while feeding
- Enclosing class:
ShotGate
public static record ShotGate.Decision(boolean ready, boolean feed, ShotGate.FeedReason reason, ShotGate.Blocker blocker, double secondsHeld)
extends Record
The gate's answer for one loop.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDecision(boolean ready, boolean feed, ShotGate.FeedReason reason, ShotGate.Blocker blocker, double secondsHeld) Creates an instance of aDecisionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblocker()Returns the value of theblockerrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfeed()Returns the value of thefeedrecord component.final inthashCode()Returns a hash code value for this object.booleanready()Returns the value of thereadyrecord component.reason()Returns the value of thereasonrecord component.doubleReturns the value of thesecondsHeldrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
IDLE
-
-
Constructor Details
-
Decision
public Decision(boolean ready, boolean feed, ShotGate.FeedReason reason, ShotGate.Blocker blocker, double secondsHeld) Creates an instance of aDecisionrecord class.- Parameters:
ready- the value for thereadyrecord componentfeed- the value for thefeedrecord componentreason- the value for thereasonrecord componentblocker- the value for theblockerrecord componentsecondsHeld- the value for thesecondsHeldrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
ready
-
feed
-
reason
-
blocker
-
secondsHeld
public double secondsHeld()Returns the value of thesecondsHeldrecord component.- Returns:
- the value of the
secondsHeldrecord component
-