Base pilotable
This commit is contained in:
		| @@ -14,17 +14,14 @@ package frc.robot; | ||||
|  * <p>It is advised to statically import this class (or one of its inner classes) wherever the | ||||
|  * constants are needed, to reduce verbosity. | ||||
|  */ | ||||
| <<<<<<< HEAD | ||||
| public final class Constants {} | ||||
| private static final int MoteurAvantGauche = (0); | ||||
| private static final int MoteurAvantDroit = (0); | ||||
| private static final int MoteurArriereGauche = (0); | ||||
| private static final int MoteurArriereDroit = (0); | ||||
| ======= | ||||
| public final class Constants { | ||||
|     public static final int MoteurAvantGauche = 0; | ||||
|     public static final int MoteurAvantDroit = 1; | ||||
|     public static final int MoteurArriereGauche = 2; | ||||
|     public static final int MoteurArriereDroit = 3; | ||||
|  | ||||
|     public static final int PistonPousserR = 0; | ||||
|     public static final int PistonPousserF = 1; | ||||
|     public static final int pistonQuiShakef = 0; | ||||
|     public static final int pistonQuiShakeb = 1; | ||||
| } | ||||
| >>>>>>> 8da918a7d2ab52ff5442835f9f446fc07fe2d1bd | ||||
|   | ||||
| @@ -8,6 +8,7 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; | ||||
|  | ||||
| import edu.wpi.first.wpilibj.drive.MecanumDrive; | ||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||
| import frc.robot.Constants; | ||||
|  | ||||
| public class BasePilotable extends SubsystemBase { | ||||
|       | ||||
| @@ -23,7 +24,7 @@ private WPI_TalonSRX arriereDroit = new WPI_TalonSRX(Constants.MoteurArriereDroi | ||||
| private MecanumDrive mecanum = new MecanumDrive(avantGauche, arriereGauche, avantDroit, arriereDroit); | ||||
|  | ||||
| private void Drive(double y, double x, double rot){ | ||||
|   drive.driveCarthesian(y, x, rot, 0); | ||||
|   mecanum.driveCartesian(y, x, rot, 0); | ||||
| } | ||||
|   /** Creates a new BasePilotable. */ | ||||
|   public BasePilotable() {} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user