Merge branches 'main' and 'main' of https://demerso.net/pls5618/2023/betabots
yjfhcgv
This commit is contained in:
commit
1279bdfd3e
@ -27,8 +27,12 @@ import frc.robot.commands.TournerDroite;
|
|||||||
import frc.robot.commands.TournerGauche;
|
import frc.robot.commands.TournerGauche;
|
||||||
import frc.robot.commands.Activershaker;
|
import frc.robot.commands.Activershaker;
|
||||||
import frc.robot.commands.Avancer;
|
import frc.robot.commands.Avancer;
|
||||||
|
<<<<<<< HEAD
|
||||||
import frc.robot.commands.Activershaker;
|
import frc.robot.commands.Activershaker;
|
||||||
import frc.robot.commands.DesactiverBlockeur;
|
import frc.robot.commands.DesactiverBlockeur;
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> 869bfef8ba736e41bb36cd549d19ffe8bd68c766
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +53,7 @@ public class RobotContainer {
|
|||||||
private Pistonshaker pistonshaker = new Pistonshaker();
|
private Pistonshaker pistonshaker = new Pistonshaker();
|
||||||
private Poussoir poussoir = new Poussoir();
|
private Poussoir poussoir = new Poussoir();
|
||||||
|
|
||||||
private Activer_poussoir Activer_poussoir = new Activer_poussoir(poussoir);
|
private BoutonA BoutonA = new BoutonA(poussoir,pistonshaker);
|
||||||
private ActiverBlockeur ActiverBlockeur = new ActiverBlockeur(poussoir);
|
private ActiverBlockeur ActiverBlockeur = new ActiverBlockeur(poussoir);
|
||||||
private Activershaker Activershaker = new Activershaker(pistonshaker);
|
private Activershaker Activershaker = new Activershaker(pistonshaker);
|
||||||
private DesactiverBlockeur DesactiverBlockeur = new DesactiverBlockeur(poussoir);
|
private DesactiverBlockeur DesactiverBlockeur = new DesactiverBlockeur(poussoir);
|
||||||
@ -72,17 +76,18 @@ public class RobotContainer {
|
|||||||
*/
|
*/
|
||||||
private void configureButtonBindings() {
|
private void configureButtonBindings() {
|
||||||
JoystickButton buttonA = new JoystickButton(manette, XboxController.Button.kA.value);
|
JoystickButton buttonA = new JoystickButton(manette, XboxController.Button.kA.value);
|
||||||
buttonA.whileHeld(Activer_poussoir);
|
buttonA.whileHeld(BoutonA);
|
||||||
JoystickButton rightbumper = new JoystickButton(manette, XboxController.Button.kLeftBumper.value);
|
JoystickButton rightbumper = new JoystickButton(manette, XboxController.Button.kLeftBumper.value);
|
||||||
rightbumper.whileHeld(Pistonshaker);
|
rightbumper.whileHeld(Activershaker);
|
||||||
JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value);
|
JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value);
|
||||||
buttonY.whenPressed(DesactiverBlockeur, ActiverBlockeur);
|
buttonY.whenPressed(DesactiverBlockeur);
|
||||||
|
JoystickButton buttonX = new JoystickButton(manette, XboxController.Button.kX.value);
|
||||||
|
buttonX.whenPressed(ActiverBlockeur);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this to pass the autonomous command to the main {@link Robot} class.
|
* Use this to pass the autonomous command to the main {@link Robot} class.
|
||||||
*
|
|
||||||
* @return the command to run in autonomous
|
* @return the command to run in autonomous
|
||||||
*/
|
*/
|
||||||
public Command getAutonomousCommand() {
|
public Command getAutonomousCommand() {
|
||||||
|
@ -9,15 +9,22 @@ import frc.robot.subsystems.Poussoir;
|
|||||||
import frc.robot.subsystems.Pistonshaker;
|
import frc.robot.subsystems.Pistonshaker;
|
||||||
|
|
||||||
public class BoutonA extends CommandBase {
|
public class BoutonA extends CommandBase {
|
||||||
|
private Poussoir poussoir;
|
||||||
|
private Pistonshaker pistonshaker;
|
||||||
/** Creates a new boutonA. */
|
/** Creates a new boutonA. */
|
||||||
public BoutonA() {
|
public BoutonA(Poussoir poussoir, Pistonshaker pistonshaker) {
|
||||||
|
this.poussoir = poussoir;
|
||||||
|
this.pistonshaker = pistonshaker;
|
||||||
|
addRequirements(poussoir, pistonshaker);
|
||||||
// Use addRequirements() here to declare subsystem dependencies.
|
// Use addRequirements() here to declare subsystem dependencies.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the command is initially scheduled.
|
// Called when the command is initially scheduled.
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {}
|
public void initialize() {
|
||||||
|
poussoir.pousser();
|
||||||
|
pistonshaker.rentrerpiston();
|
||||||
|
}
|
||||||
|
|
||||||
// Called every time the scheduler runs while the command is scheduled.
|
// Called every time the scheduler runs while the command is scheduled.
|
||||||
@Override
|
@Override
|
||||||
@ -25,9 +32,11 @@ public class BoutonA extends CommandBase {
|
|||||||
|
|
||||||
// Called once the command ends or is interrupted.
|
// Called once the command ends or is interrupted.
|
||||||
@Override
|
@Override
|
||||||
public void end(boolean interrupted) {}
|
public void end(boolean interrupted) {
|
||||||
|
poussoir.tirer();
|
||||||
|
pistonshaker.sortirpiston();
|
||||||
|
|
||||||
// Returns true when the command should end.
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean isFinished() {
|
public boolean isFinished() {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user