From b82308fa18f72859b3da6576ecd46081aa49062e Mon Sep 17 00:00:00 2001 From: MarissaKoglesby <156854363+MarissaKoglesby@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:42:16 -0500 Subject: [PATCH] Basic skeleton --- src/main/java/frc/robot/Constants.java | 3 +++ .../robot/commands/auto/DelayedTaxiAuto.java | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/main/java/frc/robot/commands/auto/DelayedTaxiAuto.java diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index c79960c..33a9060 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -123,6 +123,9 @@ public static class Auto { /** The amount of time that we want to run the fire note command in auto. */ public static final double FIRE_NOTE_FOR_TIME = 4.0; + + /** Time in seconds that we delay our taxi in the delayed taxi auto. */ + public static final double TAXI_DELAY_TIME = 10.0; } /** Constants for the Intake System */ diff --git a/src/main/java/frc/robot/commands/auto/DelayedTaxiAuto.java b/src/main/java/frc/robot/commands/auto/DelayedTaxiAuto.java new file mode 100644 index 0000000..9a68507 --- /dev/null +++ b/src/main/java/frc/robot/commands/auto/DelayedTaxiAuto.java @@ -0,0 +1,26 @@ +// 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.auto; + +import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; +import edu.wpi.first.wpilibj2.command.WaitCommand; +import frc.robot.Constants; + +/** Taxi auto that waits a bit before it taxis. */ +public class DelayedTaxiAuto extends SequentialCommandGroup { + /** Creates a new DelayedTaxiAuto. */ + public DelayedTaxiAuto() { + // Add your commands in the addCommands() call, e.g. + // addCommands(new FooCommand(), new BarCommand()); + addCommands(new WaitCommand(Constants.Auto.TAXI_DELAY_TIME), new TaxiAuto()); + } +}