Package com.lightningrobotics.common
Class LightningContainer
- java.lang.Object
-
- com.lightningrobotics.common.LightningContainer
-
public abstract class LightningContainer extends java.lang.Object
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 theLightningRobot
periodic methods (other than the scheduler calls). Instead, the structure of the robot (including subsystems, commands, and button mappings) should be declared in a subclass of this class.
-
-
Constructor Summary
Constructors Constructor Description LightningContainer()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract void
configureAutonomousCommands()
Configures list of possible commands that can be run during autonomousprotected abstract void
configureButtonBindings()
Connects commands with buttons on joysticksprotected abstract void
configureDefaultCommands()
Configures all default commands to run on subsystems when no other command requires that subsystemprotected abstract void
configureFaultCodes()
Configures all robot-specific fault codesprotected abstract void
configureFaultMonitors()
Configures listeners for fault codesprotected abstract void
configureSystemTests()
Registers all systems tests for the robot to be runabstract LightningDrivetrain
getDrivetrain()
Thedrivetrain
object of the robotprotected abstract void
initializeDashboardCommands()
Puts command buttons on the dashboardprotected abstract void
releaseDefaultCommands()
Cancles all default commands
-
-
-
Method Detail
-
configureButtonBindings
protected abstract void configureButtonBindings()
Connects commands with buttons on joysticks
-
configureSystemTests
protected abstract void configureSystemTests()
Registers all systems tests for the robot to be run
-
configureDefaultCommands
protected abstract void configureDefaultCommands()
Configures all default commands to run on subsystems when no other command requires that subsystem
-
releaseDefaultCommands
protected abstract void releaseDefaultCommands()
Cancles all default commands
-
initializeDashboardCommands
protected abstract void initializeDashboardCommands()
Puts command buttons on the dashboard
-
configureAutonomousCommands
protected abstract void configureAutonomousCommands()
Configures list of possible commands that can be run during autonomous
-
configureFaultCodes
protected abstract void configureFaultCodes()
Configures all robot-specific fault codes
-
configureFaultMonitors
protected abstract void configureFaultMonitors()
Configures listeners for fault codes
-
getDrivetrain
public abstract LightningDrivetrain getDrivetrain()
Thedrivetrain
object of the robot- Returns:
- The drivetrain object of the given robot
-
-