mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +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:
@@ -164,7 +164,7 @@ void DutyCycleEncoder::Reset() {
|
||||
if (m_counter) {
|
||||
m_counter->Reset();
|
||||
}
|
||||
m_positionOffset = m_dutyCycle->GetOutput();
|
||||
m_positionOffset = GetAbsolutePosition();
|
||||
}
|
||||
|
||||
bool DutyCycleEncoder::IsConnected() const {
|
||||
|
||||
Reference in New Issue
Block a user