mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[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:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user