Base pilotable

This commit is contained in:
Olivier Dubois 2022-11-14 19:53:50 -05:00
parent abc0794e54
commit a38025043b
2 changed files with 7 additions and 9 deletions

View File

@ -14,17 +14,14 @@ package frc.robot;
* <p>It is advised to statically import this class (or one of its inner classes) wherever the * <p>It is advised to statically import this class (or one of its inner classes) wherever the
* constants are needed, to reduce verbosity. * 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 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 PistonPousserR = 0;
public static final int PistonPousserF = 1; public static final int PistonPousserF = 1;
public static final int pistonQuiShakef = 0; public static final int pistonQuiShakef = 0;
public static final int pistonQuiShakeb = 1; public static final int pistonQuiShakeb = 1;
} }
>>>>>>> 8da918a7d2ab52ff5442835f9f446fc07fe2d1bd

View File

@ -8,6 +8,7 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
import edu.wpi.first.wpilibj.drive.MecanumDrive; import edu.wpi.first.wpilibj.drive.MecanumDrive;
import edu.wpi.first.wpilibj2.command.SubsystemBase; import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants;
public class BasePilotable extends SubsystemBase { 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 MecanumDrive mecanum = new MecanumDrive(avantGauche, arriereGauche, avantDroit, arriereDroit);
private void Drive(double y, double x, double rot){ 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. */ /** Creates a new BasePilotable. */
public BasePilotable() {} public BasePilotable() {}