From e1903d1ad1ecf8fe766f216d1872fd7ca559e512 Mon Sep 17 00:00:00 2001 From: Berdenson <91093973+Berdenson@users.noreply.github.com> Date: Wed, 20 Mar 2024 17:45:16 -0500 Subject: [PATCH] Created SetDrivePerspectiveRobotOriented --- .../SetDrivePerspectiveRobotOriented.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java diff --git a/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java new file mode 100644 index 00000000..37646d5e --- /dev/null +++ b/src/main/java/frc/robot/commands/drive/SetDrivePerspectiveRobotOriented.java @@ -0,0 +1,39 @@ +// 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. + +package frc.robot.commands.drive; + +import edu.wpi.first.wpilibj2.command.Command; +import frc.robot.RobotContainer; +import frc.robot.subsystems.Drive; + +public class SetDrivePerspectiveRobotOriented extends Command { + /** Creates a new SetDrivePerspectiveFieldOriented. */ + + private Drive drive; + public SetDrivePerspectiveRobotOriented() { + this.drive = RobotContainer.drive; + addRequirements(drive); + } + + // Called when the command is initially scheduled. + @Override + public void initialize() { + drive.setDefaultCommand(RobotContainer.driveRobotOriented); + } + + // 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; + } +}