This commit is contained in:
Antoine PerreaultE 2024-01-22 19:48:06 -05:00
parent 613dae1e56
commit 2d58d2fc27
3 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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