suprimer des truc
This commit is contained in:
parent
b4c06e2844
commit
750c3d67af
@ -6,8 +6,7 @@ package frc.robot;
|
|||||||
|
|
||||||
import edu.wpi.first.wpilibj.GenericHID;
|
import edu.wpi.first.wpilibj.GenericHID;
|
||||||
import edu.wpi.first.wpilibj.XboxController;
|
import edu.wpi.first.wpilibj.XboxController;
|
||||||
import frc.robot.commands.ExampleCommand;
|
|
||||||
import frc.robot.subsystems.ExampleSubsystem;
|
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,9 +17,7 @@ import edu.wpi.first.wpilibj2.command.Command;
|
|||||||
*/
|
*/
|
||||||
public class RobotContainer {
|
public class RobotContainer {
|
||||||
// The robot's subsystems and commands are defined here...
|
// The robot's subsystems and commands are defined here...
|
||||||
private final ExampleSubsystem m_exampleSubsystem = new ExampleSubsystem();
|
|
||||||
|
|
||||||
private final ExampleCommand m_autoCommand = new ExampleCommand(m_exampleSubsystem);
|
|
||||||
|
|
||||||
/** The container for the robot. Contains subsystems, OI devices, and commands. */
|
/** The container for the robot. Contains subsystems, OI devices, and commands. */
|
||||||
public RobotContainer() {
|
public RobotContainer() {
|
||||||
@ -43,6 +40,6 @@ public class RobotContainer {
|
|||||||
*/
|
*/
|
||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
// An ExampleCommand will run in autonomous
|
// An ExampleCommand will run in autonomous
|
||||||
return m_autoCommand;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
// 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;
|
|
||||||
|
|
||||||
import frc.robot.subsystems.ExampleSubsystem;
|
|
||||||
import edu.wpi.first.wpilibj2.command.CommandBase;
|
|
||||||
|
|
||||||
/** An example command that uses an example subsystem. */
|
|
||||||
public class ExampleCommand extends CommandBase {
|
|
||||||
@SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"})
|
|
||||||
private final ExampleSubsystem m_subsystem;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new ExampleCommand.
|
|
||||||
*
|
|
||||||
* @param subsystem The subsystem used by this command.
|
|
||||||
*/
|
|
||||||
public ExampleCommand(ExampleSubsystem subsystem) {
|
|
||||||
m_subsystem = subsystem;
|
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
|
||||||
addRequirements(subsystem);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called when the command is initially scheduled.
|
|
||||||
@Override
|
|
||||||
public void initialize() {}
|
|
||||||
|
|
||||||
// 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 false;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
// 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.subsystems;
|
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
|
||||||
|
|
||||||
public class ExampleSubsystem extends SubsystemBase {
|
|
||||||
/** Creates a new ExampleSubsystem. */
|
|
||||||
public ExampleSubsystem() {}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void periodic() {
|
|
||||||
// This method will be called once per scheduler run
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void simulationPeriodic() {
|
|
||||||
// This method will be called once per scheduler run during simulation
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user