diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 90a70daa..ba5aacaa 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -16,6 +16,7 @@ import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.button.CommandXboxController; import frc.robot.commands.DeployPneumatics; +import frc.robot.commands.DeployUrMom; import frc.robot.commands.EnterXMode; import frc.robot.commands.RunBelts; import frc.robot.commands.RunIntake; @@ -23,6 +24,7 @@ import frc.robot.commands.drive.DriveRobotOriented; import frc.robot.subsystems.Drive; import frc.robot.subsystems.Intake; +import frc.robot.subsystems.UrMom; import frc.robot.subsystems.mailbox.MailboxBelts; import frc.robot.subsystems.mailbox.MailboxPneumatics; @@ -51,6 +53,9 @@ public class RobotContainer { /** Singleton instance of {@link Intake} for the whole robot. */ public static Intake intake = new Intake(); + /** Singleton instance of {@link UrMom} for the whole robot. */ + public static UrMom urMom = new UrMom(); + /* * ************ * * COMMANDS * @@ -63,6 +68,7 @@ public class RobotContainer { private DeployPneumatics deployPneumatics = new DeployPneumatics(); private RunBelts runBelts = new RunBelts(); private RunIntake runIntake = new RunIntake(); + private DeployUrMom deployUrMom = new DeployUrMom(); /* * *********************** diff --git a/src/main/java/frc/robot/commands/DeployUrMom.java b/src/main/java/frc/robot/commands/DeployUrMom.java new file mode 100644 index 00000000..4fbf1be9 --- /dev/null +++ b/src/main/java/frc/robot/commands/DeployUrMom.java @@ -0,0 +1,47 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +/* + * Asimov's Laws: + * The First Law: A robot may not injure a human being or, through inaction, allow a human being to come to harm. + * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. + * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. + */ + +package frc.robot.commands; + +import edu.wpi.first.wpilibj2.command.Command; +import frc.robot.RobotContainer; +import frc.robot.subsystems.UrMom; + +/** Prints "your mom" */ +public class DeployUrMom extends Command { + private UrMom urMom; + + /** Creates a new DeployUrMom. */ + public DeployUrMom() { + this.urMom = RobotContainer.urMom; + addRequirements(urMom); + } + + // Called when the command is initially scheduled. + @Override + public void initialize() { + urMom.printUrMom(); + } + + // Called every time the scheduler runs while the command is scheduled. + @Override + public void execute() {} + + // Called once the command ends or is interrupted. + @Override + public void end(boolean interrupted) {} + + // Returns true when the command should end. + @Override + public boolean isFinished() { + return true; + } +} diff --git a/src/main/java/frc/robot/subsystems/UrMom.java b/src/main/java/frc/robot/subsystems/UrMom.java new file mode 100644 index 00000000..2d20af87 --- /dev/null +++ b/src/main/java/frc/robot/subsystems/UrMom.java @@ -0,0 +1,29 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +/* + * Asimov's Laws: + * The First Law: A robot may not injure a human being or, through inaction, allow a human being to come to harm. + * The Second Law: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. + * The Third Law: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. + */ + +package frc.robot.subsystems; + +import edu.wpi.first.wpilibj2.command.SubsystemBase; + +/** Subsystem for printing "your mom" */ +public class UrMom extends SubsystemBase { + /** Creates a new UrMom. */ + public UrMom() {} + + public void printUrMom() { + System.out.println("your mom"); + } + + @Override + public void periodic() { + // This method will be called once per scheduler run + } +}