auto-sync
This commit is contained in:
parent
9dd88a1dc1
commit
5e88186f5c
|
@ -150,6 +150,9 @@ public:
|
|||
*/
|
||||
floatms_t injectorLag;
|
||||
|
||||
/**
|
||||
* See useWarmupPidAfr
|
||||
*/
|
||||
Pid warmupAfrPid;
|
||||
|
||||
float baroCorrection;
|
||||
|
|
|
@ -63,7 +63,7 @@ static msg_t AltCtrlThread(int param) {
|
|||
continue;
|
||||
}
|
||||
|
||||
currentAltDuty = engineConfiguration->alternatorControl.offset + altPid.getValue(engineConfiguration->targetVBatt, getVBatt(PASS_ENGINE_PARAMETER_F), 1);
|
||||
currentAltDuty = altPid.getValue(engineConfiguration->targetVBatt, getVBatt(PASS_ENGINE_PARAMETER_F), 1);
|
||||
if (boardConfiguration->isVerboseAlternator) {
|
||||
scheduleMsg(logger, "alt duty: %f/vbatt=%f/p=%f/i=%f/d=%f int=%f", currentAltDuty, getVBatt(PASS_ENGINE_PARAMETER_F),
|
||||
altPid.getP(), altPid.getI(), altPid.getD(), altPid.getIntegration());
|
||||
|
|
|
@ -36,7 +36,7 @@ float Pid::getValue(float target, float input, float dTime) {
|
|||
|
||||
prevError = error;
|
||||
|
||||
float result = pTerm + iTerm + dTerm;
|
||||
float result = pTerm + iTerm + dTerm + pid->offset;
|
||||
if (result > maxResult) {
|
||||
// iTerm -= result - maxResult;
|
||||
result = maxResult;
|
||||
|
|
Loading…
Reference in New Issue