Reset Encodeur accumulateur

This commit is contained in:
Olivier Dubois 2023-10-18 19:48:18 -04:00
parent c49c666d0b
commit d36e048781

View File

@ -22,6 +22,9 @@ public class Accumulateur extends SubsystemBase {
public double distance() { public double distance() {
return(moteuracc.getEncoder().getPosition()); return(moteuracc.getEncoder().getPosition());
} }
public void Reset() {
moteuracc.getEncoder().setPosition(0);
}
@Override @Override
public void periodic() { public void periodic() {
// This method will be called once per scheduler run // This method will be called once per scheduler run