joystick
This commit is contained in:
parent
94805fd193
commit
1dc4b31f4f
@ -9,20 +9,26 @@ import edu.wpi.first.wpilibj2.command.Command;
|
|||||||
import edu.wpi.first.wpilibj2.command.Commands;
|
import edu.wpi.first.wpilibj2.command.Commands;
|
||||||
import edu.wpi.first.wpilibj2.command.RunCommand;
|
import edu.wpi.first.wpilibj2.command.RunCommand;
|
||||||
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
||||||
|
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
|
||||||
import frc.robot.subsystems.Drive;
|
import frc.robot.subsystems.Drive;
|
||||||
|
|
||||||
public class RobotContainer {
|
public class RobotContainer {
|
||||||
CommandXboxController manette1 = new CommandXboxController(0);
|
CommandXboxController manette = new CommandXboxController(0);
|
||||||
CommandXboxController manette2 = new CommandXboxController(0);
|
Joystick joystick1 = new Joystick(0);
|
||||||
Drive drive = new Drive();
|
Drive drive = new Drive();
|
||||||
public RobotContainer() {
|
public RobotContainer() {
|
||||||
configureBindings();
|
configureBindings();
|
||||||
// drive.setDefaultCommand(new RunCommand(()->{
|
// drive.setDefaultCommand(new RunCommand(()->{
|
||||||
// drive.drive(manette1.getLeftX(), manette1.getLeftY(), manette1.getRightX());
|
// drive.drive(manette.getLeftX(), manette.getLeftY(), manette.getRightX());
|
||||||
//},drive));
|
//},drive));
|
||||||
|
drive.setDefaultCommand(new RunCommand(()->{
|
||||||
|
drive.drive(joystick1.getX(), -joystick1.getY(), joystick1.getZ());
|
||||||
|
},drive));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureBindings() {}
|
private void configureBindings() {
|
||||||
|
JoystickButton button =new JoystickButton(joystick1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
return Commands.print("No autonomous command configured");
|
return Commands.print("No autonomous command configured");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user