Package com.lightningrobotics.common
Class LightningContainer
- java.lang.Object
-
- com.lightningrobotics.common.LightningContainer
-
public abstract class LightningContainer extends java.lang.ObjectThis 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 theLightningRobotperiodic 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 voidconfigureAutonomousCommands()Configures list of possible commands that can be run during autonomousprotected abstract voidconfigureButtonBindings()Connects commands with buttons on joysticksprotected abstract voidconfigureDefaultCommands()Configures all default commands to run on subsystems when no other command requires that subsystemprotected abstract voidconfigureFaultCodes()Configures all robot-specific fault codesprotected abstract voidconfigureFaultMonitors()Configures listeners for fault codesprotected abstract voidconfigureSystemTests()Registers all systems tests for the robot to be runabstract LightningDrivetraingetDrivetrain()Thedrivetrainobject of the robotprotected abstract voidinitializeDashboardCommands()Puts command buttons on the dashboardprotected abstract voidreleaseDefaultCommands()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()
Thedrivetrainobject of the robot- Returns:
- The drivetrain object of the given robot
-
-