[wpilib] DutyCycleEncoder: Fix reset behavior (#5287)

reset should set the offset to the properly scaled position provided by getAbsolutePosition, not the raw duty cycle.
This commit is contained in:
Ryan Blue
2023-05-13 00:28:32 -04:00
committed by GitHub
parent 91392823ff
commit 218cfea16b
2 changed files with 2 additions and 2 deletions

View File

@@ -246,7 +246,7 @@ public class DutyCycleEncoder implements Sendable, AutoCloseable {
if (m_counter != null) {
m_counter.reset();
}
m_positionOffset = m_dutyCycle.getOutput();
m_positionOffset = getAbsolutePosition();
}
/**