Package frc.robot
Class RobotContainer
java.lang.Object
frc.robot.RobotContainer
This class is where the bulk of the robot should be declared. Since
Command-based is a
"declarative" paradigm, very little robot logic should actually be handled in
the
Robot
periodic methods (other than the scheduler calls). Instead, the structure of
the robot (including
subsystems, commands, and trigger mappings) should be declared here.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal CommandSwerveDrivetrainfinal DrivetrainControlsfinal DigitalInputThe beam break on the uptake.final DIOSim -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidautoInit()This method is run at the start of Auto.Use this to pass the autonomous command to the mainRobotclass.booleanGets the current value of the uptake beam break.voidsetAutoChooser(SendableChooser<Command> auto) voidThis function is called once when the robot is first started up whilst in simulation.voidThis function is called periodically whilst in simulation.voidThis method handles the periodic functionality for the superstructure.voidThis method is run at the start of Teleop.
-
Field Details
-
drive
-
spin
-
uptakeBeamBreak
The beam break on the uptake.Reads true if there is a ball going through uptake, false otherwise.
-
uptakeBeamBreakSim
-
drivetrain
-
drivetrainControls
-
-
Constructor Details
-
RobotContainer
public RobotContainer()The container for the robot. Contains subsystems, OI devices, and commands.
-
-
Method Details
-
autoInit
public void autoInit()This method is run at the start of Auto. -
teleopInit
public void teleopInit()This method is run at the start of Teleop. -
simulationInit
public void simulationInit()This function is called once when the robot is first started up whilst in simulation. -
simulationPeriodic
public void simulationPeriodic()This function is called periodically whilst in simulation. -
superstructurePeriodic
public void superstructurePeriodic()This method handles the periodic functionality for the superstructure. This is done seperate from the subsystem periodic so it can be updated more frequently. -
getAutonomousCommand
Use this to pass the autonomous command to the mainRobotclass.- Returns:
- the command to run in autonomous
-
setAutoChooser
-
getIsBallInUptake
public boolean getIsBallInUptake()Gets the current value of the uptake beam break.- Returns:
- True if there is a ball in uptake, false otherwise.
-