Class SuperStructure
java.lang.Object
org.wpilib.command2.SubsystemBase
frc.robot.subsystems.SuperStructure
- All Implemented Interfaces:
Subsystem, org.wpilib.util.sendable.Sendable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionSuperStructure(Swerve swerve, FuelIntake fuelIntake, IntakeExtension intakeExtension, IndexerTower indexerTower, IndexerBed indexerBed, Launcher launcher, Hood hood) -
Method Summary
Modifier and TypeMethodDescriptionReleases every mechanism held by its tracking stop; one still stuck stops again.getHood()This loop's gate decision.booleanisAiming()Whether the robot is tracking or launching at a target.booleanWhether fuel is being fed into the flywheel this loop.booleanWhether the current state is one that feeds the flywheel.booleanbooleanbooleanbooleanvoidperiodic()voidsetFeedOverride(BooleanSupplier override) Sets the control that bypasses the gate while held.Picks a fixed shot and requestsSuperStructure.WantedSuperState.SET_SHOTin one command.voidMethods inherited from class SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Subsystem
defer, getCurrentCommand, getDefaultCommand, idle, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
SuperStructure
public SuperStructure(Swerve swerve, FuelIntake fuelIntake, IntakeExtension intakeExtension, IndexerTower indexerTower, IndexerBed indexerBed, Launcher launcher, Hood hood)
-
-
Method Details
-
periodic
public void periodic() -
setFeedOverride
Sets the control that bypasses the gate while held. Polled every loop (a supplier, not a scheduled command, so there is no interrupt edge case).- Parameters:
override- true while the operator wants the gate ignored
-
isLaunching
public boolean isLaunching()Whether the current state is one that feeds the flywheel. -
isAiming
public boolean isAiming()Whether the robot is tracking or launching at a target. -
isFeeding
public boolean isFeeding()Whether fuel is being fed into the flywheel this loop. -
coastMechanisms
-
clearTrackingStops
Releases every mechanism held by its tracking stop; one still stuck stops again. -
brakeMechanisms
-
isRobotInNeutralZone
public boolean isRobotInNeutralZone() -
isRobotInEnemyZone
public boolean isRobotInEnemyZone() -
isRobotInFeedZone
public boolean isRobotInFeedZone() -
isRobotInScoreZone
public boolean isRobotInScoreZone() -
robotInNeutralZone
-
robotInEnemyZone
-
robotInFeedZone
-
robotInScoreZone
-
setWantedSuperState
-
setStateCommand
-
setShotCommand
Picks a fixed shot and requestsSuperStructure.WantedSuperState.SET_SHOTin one command.- Parameters:
shot- the parking spot- Returns:
- the command
-
getSwerve
-
getFuelIntake
-
getIntakeExtension
-
getIndexerTower
-
getIndexerBed
-
getLauncher
-
getHood
-
getWantedSuperState
-
getCurrentSuperState
-
getShotDecision
This loop's gate decision.
-