mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Fixed Java velocity PID not calculating result when P = 0 (#717)
This commit is contained in:
committed by
Peter Johnson
parent
6e9d1f55c6
commit
8b2e656bde
@@ -271,10 +271,10 @@ public class PIDController implements PIDInterface, LiveWindowSendable, Controll
|
||||
} else {
|
||||
m_totalError = m_maximumOutput / m_P;
|
||||
}
|
||||
|
||||
m_result = m_P * m_totalError + m_D * m_error
|
||||
+ calculateFeedForward();
|
||||
}
|
||||
|
||||
m_result = m_P * m_totalError + m_D * m_error
|
||||
+ calculateFeedForward();
|
||||
} else {
|
||||
if (m_I != 0) {
|
||||
double potentialIGain = (m_totalError + m_error) * m_I;
|
||||
|
||||
Reference in New Issue
Block a user