diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..18ff083 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +default: + image: gradle:jdk11 + tags: + - robot + +stages: # List of stages for jobs, and their order of execution + - build + +build-job: # This job runs in the build stage, which runs first. + stage: build + script: + - chmod +x gradlew + - ./gradlew build diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index 50229b4..2da5318 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -6,7 +6,6 @@ package frc.robot; import edu.wpi.first.wpilibj.TimedRobot; -import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.CommandScheduler; diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 53f9f6d..8b4539a 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -4,16 +4,12 @@ package frc.robot; -import edu.wpi.first.wpilibj.Joystick; -import edu.wpi.first.wpilibj.XboxController; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Commands; +import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; import edu.wpi.first.wpilibj2.command.RunCommand; import edu.wpi.first.wpilibj2.command.button.CommandXboxController; -import edu.wpi.first.wpilibj2.command.button.JoystickButton; -import edu.wpi.first.wpilibj2.command.button.Trigger; -import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; -import edu.wpi.first.wpilibj2.command.button.JoystickButton; + //subsystems import frc.robot.subsystems.BasePilotable; import frc.robot.subsystems.Gratte; @@ -36,8 +32,8 @@ import frc.robot.commands.bras.PivoteBrasHaut; import frc.robot.commands.bras.PivoteBrasMilieux; public class RobotContainer { -XboxController manette1 = new XboxController(0); -XboxController manette2 = new XboxController(1); +CommandXboxController manette1 = new CommandXboxController(0); +CommandXboxController manette2 = new CommandXboxController(1); // subsystems BasePilotable basePilotable = new BasePilotable(); Gratte gratte = new Gratte(); @@ -68,10 +64,8 @@ public RobotContainer() { } private void configureBindings() { - - - - + manette1.a().toggleOnTrue(Commands.startEnd(pince::ouvrir, pince::fermer,pince)); + manette1.x().toggleOnTrue(Commands.startEnd(basePilotable::BrakeFerme,basePilotable::BrakeOuvre,basePilotable)); }