betabot-2024/src/main/java/frc/robot/RobotContainer.java
samuel desharnais 977cbef11e rtdytyjhk
2023-11-15 18:54:59 -05:00

60 lines
2.5 KiB
Java

// 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;
import edu.wpi.first.networktables.GenericEntry;
import edu.wpi.first.wpilibj.Joystick;
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;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.RunCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
import frc.robot.subsystems.Accumulateur;
import frc.robot.subsystems.Drive;
import frc.robot.subsystems.Lanceur;
public class RobotContainer {
Lanceur lanceur = new Lanceur();
Accumulateur accumulateur = new Accumulateur();
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();
CommandXboxController manette = new CommandXboxController(0);
Joystick joystick1 = new Joystick(0);
Drive drive = new Drive();
public RobotContainer() {
configureBindings();
drive.setDefaultCommand(new RunCommand(()->{
drive.drive(joystick1.getX(), -joystick1.getY(), -joystick1.getZ());
},drive));
}
private void configureBindings() {
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);
}
public Command getAutonomousCommand() {
return new SequentialCommandGroup(null);
}
}