Lanceur + Constants
This commit is contained in:
parent
c28356861e
commit
9761b4f120
20
src/main/java/frc/robot/Constants.java
Normal file
20
src/main/java/frc/robot/Constants.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package frc.robot;
|
||||||
|
|
||||||
|
public class Constants {
|
||||||
|
|
||||||
|
//Moteur
|
||||||
|
public static int lanceur = 0;
|
||||||
|
public static int avantdroitDrive = 1;
|
||||||
|
public static int avantdroitAngle = 2;
|
||||||
|
public static int avantgaucheDrive = 3;
|
||||||
|
public static int avantgaucheAngle = 4;
|
||||||
|
public static int arrieredroitDrive = 5;
|
||||||
|
public static int arrieredroitAngle = 6;
|
||||||
|
public static int arrieregaucheDrive = 7;
|
||||||
|
public static int arrieregaucheAngle = 8;
|
||||||
|
public static int accumulateur = 9;
|
||||||
|
|
||||||
|
//limit switch
|
||||||
|
public static int ballon = 10;
|
||||||
|
|
||||||
|
}
|
26
src/main/java/frc/robot/subsystems/Lanceur.java
Normal file
26
src/main/java/frc/robot/subsystems/Lanceur.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// 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.subsystems;
|
||||||
|
|
||||||
|
import com.revrobotics.CANSparkMax;
|
||||||
|
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
||||||
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
import frc.robot.Constants;
|
||||||
|
|
||||||
|
public class Lanceur extends SubsystemBase {
|
||||||
|
|
||||||
|
final CANSparkMax lanceur = new CANSparkMax(Constants.lanceur, MotorType.kBrushless);
|
||||||
|
|
||||||
|
public Lanceur() {}
|
||||||
|
|
||||||
|
public void lancer(double vitesse){
|
||||||
|
lanceur.set(vitesse);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void periodic() {
|
||||||
|
// This method will be called once per scheduler run
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user