Skip to content

Commit

Permalink
Created SetDrivePerspectiveRobotOriented
Browse files Browse the repository at this point in the history
  • Loading branch information
AraReighard committed Mar 20, 2024
1 parent a9e51fd commit e1903d1
Showing 1 changed file with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit e1903d1

Please sign in to comment.