betabot-2024/src/main/java/frc/robot/RobotContainer.java

60 lines
2.5 KiB
Java
Raw Normal View History

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-11-14 19:10:43 -05:00
import edu.wpi.first.networktables.GenericEntry;
2023-10-31 18:52:23 -04:00
import edu.wpi.first.wpilibj.Joystick;
2023-11-14 19:10:43 -05:00
import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout;
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
2023-10-03 19:22:33 -04:00
import edu.wpi.first.wpilibj2.command.Command;
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-11-15 18:19:27 -05:00
import frc.robot.subsystems.Accumulateur;
2023-10-25 20:02:03 -04:00
import frc.robot.subsystems.Drive;
2023-11-15 18:19:27 -05:00
import frc.robot.subsystems.Lanceur;
2023-10-03 19:22:33 -04:00
public class RobotContainer {
2023-11-15 18:19:27 -05:00
Lanceur lanceur = new Lanceur();
Accumulateur accumulateur = new Accumulateur();
2023-11-14 19:10:43 -05:00
ShuffleboardTab dashboard = Shuffleboard.getTab("Dashboard");
ShuffleboardLayout forces = Shuffleboard.getTab("Dashboard")
.getLayout("limitswitchsgratte", BuiltInLayouts.kList)
.withSize(3, 7);
GenericEntry force1 = forces.add("Force1", 0).getEntry();
GenericEntry force2 = forces.add("Force2", 0).getEntry();
GenericEntry force3 = forces.add("Force3", 0).getEntry();
GenericEntry force4 = forces.add("Force4", 0).getEntry();
GenericEntry force5 = forces.add("Force5", 0).getEntry();
GenericEntry force6 = forces.add("Force6", 0).getEntry();
GenericEntry force7 = forces.add("Force7", 0).getEntry();
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() {
2023-11-14 19:10:43 -05:00
2023-10-03 19:22:33 -04:00
configureBindings();
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() {
2023-11-15 18:19:27 -05:00
JoystickButton button7 = new JoystickButton(joystick1, 7);
JoystickButton button8 = new JoystickButton(joystick1, 8);
JoystickButton button9 = new JoystickButton(joystick1, 9);
JoystickButton button10 = new JoystickButton(joystick1, 10);
JoystickButton button11 = new JoystickButton(joystick1, 11);
JoystickButton button12 = new JoystickButton(joystick1, 12);
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
}
}