This commit is contained in:
Olivier Dubois 2024-01-18 19:27:16 -05:00
commit d100093f15
2 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,11 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package frc.robot;
/** Add your docs here. */
public class Constants {
//moteur
public static int lanceur = 1;
}

View File

@ -4,14 +4,29 @@
package frc.robot.subsystem; package frc.robot.subsystem;
import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkLowLevel.MotorType;
import edu.wpi.first.wpilibj2.command.SubsystemBase; import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants;
public class Lanceur extends SubsystemBase { public class Lanceur extends SubsystemBase {
/** Creates a new Lanceur. */ /** Creates a new Lanceur. */
public Lanceur() {} public Lanceur() {}
final CANSparkMax lancer = new CANSparkMax(Constants.lanceur, MotorType.kBrushless);
public void lancer(double vitesse){
lancer.set(vitesse);
}
@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
}
} }