2023-10-03 19:22:33 -04:00
|
|
|
// 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;
|
2023-10-31 18:52:23 -04:00
|
|
|
import edu.wpi.first.wpilibj.Joystick;
|
2023-10-25 20:02:03 -04:00
|
|
|
import edu.wpi.first.wpilibj.XboxController;
|
2023-10-03 19:22:33 -04:00
|
|
|
import edu.wpi.first.wpilibj2.command.Command;
|
|
|
|
import edu.wpi.first.wpilibj2.command.Commands;
|
2023-10-25 20:02:03 -04:00
|
|
|
import edu.wpi.first.wpilibj2.command.RunCommand;
|
2023-11-06 19:07:28 -05:00
|
|
|
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
|
2023-10-25 20:02:03 -04:00
|
|
|
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
2023-10-31 19:10:05 -04:00
|
|
|
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
|
2023-10-25 20:02:03 -04:00
|
|
|
import frc.robot.subsystems.Drive;
|
2023-10-03 19:22:33 -04:00
|
|
|
|
|
|
|
public class RobotContainer {
|
2023-10-31 19:10:05 -04:00
|
|
|
CommandXboxController manette = new CommandXboxController(0);
|
|
|
|
Joystick joystick1 = new Joystick(0);
|
2023-10-25 20:02:03 -04:00
|
|
|
Drive drive = new Drive();
|
2023-10-03 19:22:33 -04:00
|
|
|
public RobotContainer() {
|
|
|
|
configureBindings();
|
2023-10-31 18:51:46 -04:00
|
|
|
// drive.setDefaultCommand(new RunCommand(()->{
|
2023-10-31 19:10:05 -04:00
|
|
|
// drive.drive(manette.getLeftX(), manette.getLeftY(), manette.getRightX());
|
2023-10-31 18:51:46 -04:00
|
|
|
//},drive));
|
2023-10-31 19:10:05 -04:00
|
|
|
drive.setDefaultCommand(new RunCommand(()->{
|
2023-11-01 18:04:47 -04:00
|
|
|
drive.drive(joystick1.getX(), -joystick1.getY(), -joystick1.getZ());
|
2023-10-31 19:10:05 -04:00
|
|
|
},drive));
|
2023-10-03 19:22:33 -04:00
|
|
|
}
|
2023-10-25 19:01:18 -04:00
|
|
|
|
2023-10-31 19:10:05 -04:00
|
|
|
private void configureBindings() {
|
|
|
|
JoystickButton button =new JoystickButton(joystick1, 1);
|
2023-11-01 19:23:05 -04:00
|
|
|
|
2023-10-31 19:10:05 -04:00
|
|
|
}
|
2023-10-03 19:22:33 -04:00
|
|
|
|
|
|
|
public Command getAutonomousCommand() {
|
2023-11-06 19:07:28 -05:00
|
|
|
return new SequentialCommandGroup(null);
|
2023-10-03 19:22:33 -04:00
|
|
|
}
|
|
|
|
}
|