diff --git a/src/main/java/frc/robot/Subsystems/Accumulateur.java b/src/main/java/frc/robot/Subsystems/Accumulateur.java index cd05cd7..3c89b97 100644 --- a/src/main/java/frc/robot/Subsystems/Accumulateur.java +++ b/src/main/java/frc/robot/Subsystems/Accumulateur.java @@ -27,15 +27,15 @@ public class Accumulateur extends SubsystemBase { final WPI_TalonSRX rouesbleues = new WPI_TalonSRX(21); final WPI_TalonSRX roueRouge1 = new WPI_TalonSRX(14); final WPI_TalonSRX roueRouge2 = new WPI_TalonSRX(22); - final DigitalInput photocell = new DigitalInput(20); - final DigitalInput photocell2 = new DigitalInput(27); + final DigitalInput photocell = new DigitalInput(2); + final DigitalInput photocell2 = new DigitalInput(5); public void encodeur(){ } public boolean photocell(){ - return photocell.get(); + return !photocell.get(); } public boolean photocell2(){ - return photocell2.get(); + return !photocell2.get(); } public void desaccumule(double vitesse){ strap.set(vitesse); diff --git a/src/main/java/frc/robot/Subsystems/Lanceur.java b/src/main/java/frc/robot/Subsystems/Lanceur.java index 6756650..1055cde 100644 --- a/src/main/java/frc/robot/Subsystems/Lanceur.java +++ b/src/main/java/frc/robot/Subsystems/Lanceur.java @@ -33,8 +33,8 @@ public class Lanceur extends SubsystemBase { final WPI_TalonSRX lanceur1 = new WPI_TalonSRX(17); final WPI_TalonSRX lanceur2 = new WPI_TalonSRX(15); - final CANSparkMax tourelle = new CANSparkMax(2, MotorType.kBrushless); - final DigitalInput limitswitch1 = new DigitalInput(0); + final CANSparkMax tourelle = new CANSparkMax(23, MotorType.kBrushless); + final DigitalInput limitswitch1 = new DigitalInput(4); final DigitalInput limitswitch2 = new DigitalInput(3); private GenericEntry vitesse = dashboard.add("vitesselanceur", 0.2) @@ -79,10 +79,10 @@ public class Lanceur extends SubsystemBase { lanceur1.config_kD(0, d); } public boolean limitswitch1(){ - return limitswitch1.get(); + return !limitswitch1.get(); } public boolean limitswitch2(){ - return limitswitch2.get(); + return !limitswitch2.get(); } @Override public void periodic() {