Merge branch 'main' of https://git.demerso.net/pls5618/2024/robot
This commit is contained in:
		
							
								
								
									
										11
									
								
								src/main/java/frc/robot/Constants.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/main/java/frc/robot/Constants.java
									
									
									
									
									
										Normal 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; | ||||
| } | ||||
| @@ -4,14 +4,29 @@ | ||||
|  | ||||
| package frc.robot.subsystem; | ||||
|  | ||||
| import com.revrobotics.CANSparkMax; | ||||
| import com.revrobotics.CANSparkLowLevel.MotorType; | ||||
|  | ||||
|  | ||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||
| import frc.robot.Constants; | ||||
|  | ||||
| public class Lanceur extends SubsystemBase { | ||||
|   /** Creates a new Lanceur. */ | ||||
|    | ||||
|  | ||||
|   public Lanceur() {} | ||||
|   final CANSparkMax lancer = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); | ||||
|     public void lancer(double vitesse){ | ||||
|       lancer.set(vitesse); | ||||
|      | ||||
|   } | ||||
|  | ||||
|   | ||||
|  | ||||
|  | ||||
|   @Override | ||||
|   public void periodic() { | ||||
|   public void periodic() {} | ||||
|     // This method will be called once per scheduler run | ||||
|   } | ||||
|    | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user