Subsystem Pince (Message Consructif)
This commit is contained in:
		| @@ -5,6 +5,10 @@ public class Constants { | ||||
|     public static int avantgauche = 1; | ||||
|     public static int arrieredroit = 2; | ||||
|     public static int arrieregauche = 3; | ||||
|     // pneumatique | ||||
|     public static int pistonpinceouvre = 0; | ||||
|     public static int pistonpinceferme = 1; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -4,14 +4,28 @@ | ||||
|  | ||||
| package frc.robot.subsystems.bras; | ||||
|  | ||||
| import edu.wpi.first.wpilibj.DoubleSolenoid; | ||||
| import edu.wpi.first.wpilibj.PneumaticsModuleType; | ||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||
| import edu.wpi.first.wpilibj.DoubleSolenoid.Value; | ||||
| import frc.robot.Constants; | ||||
|  | ||||
| public class Pince extends SubsystemBase { | ||||
|   private DoubleSolenoid pistonPince = new DoubleSolenoid(PneumaticsModuleType.CTREPCM,Constants.pistonpinceouvre, Constants.pistonpinceferme); | ||||
|   /** Creates a new Pince. */ | ||||
|   public Pince() {} | ||||
|   public Pince() { | ||||
|     | ||||
|   } | ||||
| public void fermer() { | ||||
|      pistonPince.set(Value.kReverse); | ||||
|      | ||||
|    } | ||||
|    public void ouvrir() { | ||||
|      pistonPince.set(Value.kForward); | ||||
|  | ||||
|    } | ||||
|   @Override | ||||
|   public void periodic() { | ||||
|     // This method will be called once per scheduler run | ||||
|      | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user