From c13d1ecf2cedf7fe2b269d7d17c6d2e2119ab110 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Wed, 21 Feb 2024 18:48:46 -0500 Subject: [PATCH] --- src/main/java/frc/robot/command/LancerAmp.java | 4 +++- src/main/java/frc/robot/command/LancerNote.java | 4 +++- src/main/java/frc/robot/subsystem/Lanceur.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/command/LancerAmp.java b/src/main/java/frc/robot/command/LancerAmp.java index df9bf7e..a451c33 100644 --- a/src/main/java/frc/robot/command/LancerAmp.java +++ b/src/main/java/frc/robot/command/LancerAmp.java @@ -20,7 +20,9 @@ public class LancerAmp extends Command { // Called when the command is initially scheduled. @Override - public void initialize(){} + public void initialize(){ + lancer.pid(); + } // Called every time the scheduler runs while the command is scheduled. @Override diff --git a/src/main/java/frc/robot/command/LancerNote.java b/src/main/java/frc/robot/command/LancerNote.java index 1c32ce5..aa77417 100644 --- a/src/main/java/frc/robot/command/LancerNote.java +++ b/src/main/java/frc/robot/command/LancerNote.java @@ -21,7 +21,9 @@ public class LancerNote extends Command { // Called when the command is initially scheduled. @Override - public void initialize() {} + public void initialize() { + lancer.pid(); + } // Called every time the scheduler runs while the command is scheduled. @Override diff --git a/src/main/java/frc/robot/subsystem/Lanceur.java b/src/main/java/frc/robot/subsystem/Lanceur.java index db4e4bf..830a3cc 100644 --- a/src/main/java/frc/robot/subsystem/Lanceur.java +++ b/src/main/java/frc/robot/subsystem/Lanceur.java @@ -48,7 +48,7 @@ public class Lanceur extends SubsystemBase { private final MutableMeasure angle = mutable(Rotations.of(0)); // Mutable holder for unit-safe linear velocity values, persisted to avoid reallocation. private final MutableMeasure> velocity = mutable(RotationsPerSecond.of(0)); - public void pidspeaker(){ + public void pid(){ lanceur1.getPIDController().setP(0.000006824); lanceur2.getPIDController().setP(0.0051335); lanceur3.getPIDController().setP(0.00079046);