This commit is contained in:
parent
613dae1e56
commit
2d58d2fc27
@ -18,9 +18,11 @@ public class Grimpeur extends SubsystemBase {
|
|||||||
public Grimpeur() {}
|
public Grimpeur() {}
|
||||||
final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless);
|
final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless);
|
||||||
final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless);
|
final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless);
|
||||||
|
|
||||||
// limit switch
|
// limit switch
|
||||||
final DigitalInput limitdroite = new DigitalInput(Constants.limithaut);
|
final DigitalInput limitdroite = new DigitalInput(Constants.limithaut);
|
||||||
final DigitalInput limitgauche = new DigitalInput(Constants.limitbas);
|
final DigitalInput limitgauche = new DigitalInput(Constants.limitbas);
|
||||||
|
|
||||||
//fonction
|
//fonction
|
||||||
public void droit(double vitesse){
|
public void droit(double vitesse){
|
||||||
grimpeurd.set(vitesse);
|
grimpeurd.set(vitesse);
|
||||||
@ -47,6 +49,7 @@ public AHRS gyroscope = new AHRS();
|
|||||||
public double getpitch(){
|
public double getpitch(){
|
||||||
return gyroscope.getPitch();
|
return gyroscope.getPitch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
// This method will be called once per scheduler run
|
// This method will be called once per scheduler run
|
||||||
|
@ -13,9 +13,11 @@ import frc.robot.Constants;
|
|||||||
public class Guideur extends SubsystemBase {
|
public class Guideur extends SubsystemBase {
|
||||||
/** Creates a new Guideur. */
|
/** Creates a new Guideur. */
|
||||||
public Guideur() {}
|
public Guideur() {}
|
||||||
|
|
||||||
final WPI_TalonSRX guideur = new WPI_TalonSRX(Constants.guideur);
|
final WPI_TalonSRX guideur = new WPI_TalonSRX(Constants.guideur);
|
||||||
final DigitalInput guideurhaut = new DigitalInput(Constants.guideurhaut);
|
final DigitalInput guideurhaut = new DigitalInput(Constants.guideurhaut);
|
||||||
final DigitalInput guideurbas = new DigitalInput(Constants.guideurhaut);
|
final DigitalInput guideurbas = new DigitalInput(Constants.guideurhaut);
|
||||||
|
|
||||||
public void guider(double vitesse){
|
public void guider(double vitesse){
|
||||||
guideur.set(vitesse);
|
guideur.set(vitesse);
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ public class Lanceur extends SubsystemBase {
|
|||||||
final CANSparkMax lancer2 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless);
|
final CANSparkMax lancer2 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless);
|
||||||
final CANSparkMax lancer3 = new CANSparkMax(Constants.lanceur, MotorType.kBrushless);
|
final CANSparkMax lancer3 = new CANSparkMax(Constants.lanceur, MotorType.kBrushless);
|
||||||
final CANSparkMax lancer4 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless);
|
final CANSparkMax lancer4 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless);
|
||||||
|
|
||||||
public void lancer(double vitesse){
|
public void lancer(double vitesse){
|
||||||
lancer.set(vitesse);
|
lancer.set(vitesse);
|
||||||
}
|
}
|
||||||
@ -31,9 +32,6 @@ public class Lanceur extends SubsystemBase {
|
|||||||
lancer4.setInverted(true);
|
lancer4.setInverted(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {}
|
public void periodic() {}
|
||||||
// This method will be called once per scheduler run
|
// This method will be called once per scheduler run
|
||||||
|
Loading…
x
Reference in New Issue
Block a user