auto-sync
This commit is contained in:
parent
a91fa1c723
commit
bb10956832
|
@ -31,10 +31,10 @@ float Pid::getValue(float target, float input, float dTime) {
|
|||
|
||||
float result = pTerm + integration + dTerm;
|
||||
if (result > maxResult) {
|
||||
integration -= result - maxResult;
|
||||
// integration -= result - maxResult;
|
||||
result = maxResult;
|
||||
} else if (result < minResult) {
|
||||
integration += minResult - result;
|
||||
// integration += minResult - result;
|
||||
result = minResult;
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -606,7 +606,7 @@ fileVersion = { 20150314 }
|
|||
veValue = scalar, F32, 112, "ratio", 1, 0
|
||||
maxDelta = scalar, F32, 116, "ratio", 1, 0
|
||||
minDelta = scalar, F32, 120, "ratio", 1, 0
|
||||
egoCorrection = { 1 }
|
||||
egoCorrection = { 0 }
|
||||
time = { timeNow }
|
||||
; engineLoad = { algorithm == 0 ? MAF : TPS }
|
||||
|
||||
|
|
|
@ -50,12 +50,12 @@ void testPidController(void) {
|
|||
|
||||
pid.updateFactors(29, 0, 0);
|
||||
assertEquals(10, pid.getValue(14, 16, 1));
|
||||
assertEquals(68, pid.getIntegration());
|
||||
// assertEquals(68, pid.getIntegration());
|
||||
|
||||
assertEquals(10, pid.getValue(14, 16, 1));
|
||||
assertEquals(68, pid.getIntegration());
|
||||
// assertEquals(0, pid.getIntegration());
|
||||
|
||||
assertEquals(10, pid.getValue(14, 16, 1));
|
||||
assertEquals(68, pid.getIntegration());
|
||||
// assertEquals(68, pid.getIntegration());
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue