This commit is contained in:
samuel desharnais 2024-10-28 18:52:39 -04:00
commit 5e39e6fc4d
2 changed files with 1 additions and 6 deletions

View File

@ -19,7 +19,7 @@ public class Desaccumuler extends Command {
// Called when the command is initially scheduled. // Called when the command is initially scheduled.
@Override @Override
public void initialize() { public void initialize() {
accumulateur.resetencodeur();
} }
// Called every time the scheduler runs while the command is scheduled. // Called every time the scheduler runs while the command is scheduled.

View File

@ -16,12 +16,7 @@ public class Accumulateur extends SubsystemBase {
public Accumulateur() {} public Accumulateur() {}
final WPI_TalonSRX accumulateur1 = new WPI_TalonSRX(0); final WPI_TalonSRX accumulateur1 = new WPI_TalonSRX(0);
final WPI_TalonSRX accumulateur2 = new WPI_TalonSRX(10); final WPI_TalonSRX accumulateur2 = new WPI_TalonSRX(10);
final
public void encodeur(){ public void encodeur(){
accumulateur1.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);
accumulateur2.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);
accumulateur1.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1);
accumulateur2.setStatusFramePeriod(StatusFrameEnhanced.Status_2_Feedback0, 1);
} }
public void desaccumule(double vitesse){ public void desaccumule(double vitesse){
accumulateur1.set(vitesse); accumulateur1.set(vitesse);