From 2d58d2fc2769e546345936b31a7353cfb00ef718 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Mon, 22 Jan 2024 19:48:06 -0500 Subject: [PATCH] --- src/main/java/frc/robot/subsystem/Grimpeur.java | 3 +++ src/main/java/frc/robot/subsystem/Guideur.java | 2 ++ src/main/java/frc/robot/subsystem/Lanceur.java | 4 +--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/subsystem/Grimpeur.java b/src/main/java/frc/robot/subsystem/Grimpeur.java index 3f78416..f7cb7bc 100644 --- a/src/main/java/frc/robot/subsystem/Grimpeur.java +++ b/src/main/java/frc/robot/subsystem/Grimpeur.java @@ -18,9 +18,11 @@ public class Grimpeur extends SubsystemBase { public Grimpeur() {} final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless); final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless); + // limit switch final DigitalInput limitdroite = new DigitalInput(Constants.limithaut); final DigitalInput limitgauche = new DigitalInput(Constants.limitbas); + //fonction public void droit(double vitesse){ grimpeurd.set(vitesse); @@ -47,6 +49,7 @@ public AHRS gyroscope = new AHRS(); public double getpitch(){ return gyroscope.getPitch(); } + @Override public void periodic() { // This method will be called once per scheduler run diff --git a/src/main/java/frc/robot/subsystem/Guideur.java b/src/main/java/frc/robot/subsystem/Guideur.java index e276197..5a0282d 100644 --- a/src/main/java/frc/robot/subsystem/Guideur.java +++ b/src/main/java/frc/robot/subsystem/Guideur.java @@ -13,9 +13,11 @@ import frc.robot.Constants; public class Guideur extends SubsystemBase { /** Creates a new Guideur. */ public Guideur() {} + final WPI_TalonSRX guideur = new WPI_TalonSRX(Constants.guideur); final DigitalInput guideurhaut = new DigitalInput(Constants.guideurhaut); final DigitalInput guideurbas = new DigitalInput(Constants.guideurhaut); + public void guider(double vitesse){ guideur.set(vitesse); } diff --git a/src/main/java/frc/robot/subsystem/Lanceur.java b/src/main/java/frc/robot/subsystem/Lanceur.java index 45e0a1e..260f263 100644 --- a/src/main/java/frc/robot/subsystem/Lanceur.java +++ b/src/main/java/frc/robot/subsystem/Lanceur.java @@ -20,6 +20,7 @@ public class Lanceur extends SubsystemBase { final CANSparkMax lancer2 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless); final CANSparkMax lancer3 = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); final CANSparkMax lancer4 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless); + public void lancer(double vitesse){ lancer.set(vitesse); } @@ -31,9 +32,6 @@ public class Lanceur extends SubsystemBase { lancer4.setInverted(true); } - - - @Override public void periodic() {} // This method will be called once per scheduler run