mirror of https://github.com/rusefi/rusefi-1.git
PID auto tune unit test
This commit is contained in:
parent
8156e8f752
commit
55aac03201
|
@ -122,7 +122,7 @@ static msg_t etbThread(void *arg) {
|
||||||
|
|
||||||
if (engine->etbAutoTune) {
|
if (engine->etbAutoTune) {
|
||||||
autoTune.input = actualThrottlePosition;
|
autoTune.input = actualThrottlePosition;
|
||||||
autoTune.Runtime(&logger);
|
bool result = autoTune.Runtime(&logger);
|
||||||
|
|
||||||
tuneWorkingPid.updateFactors(autoTune.output, 0, 0);
|
tuneWorkingPid.updateFactors(autoTune.output, 0, 0);
|
||||||
|
|
||||||
|
@ -130,6 +130,10 @@ static msg_t etbThread(void *arg) {
|
||||||
scheduleMsg(&logger, "output %f value=%f", autoTune.output, value);
|
scheduleMsg(&logger, "output %f value=%f", autoTune.output, value);
|
||||||
etbPwmUp.setSimplePwmDutyCycle(value);
|
etbPwmUp.setSimplePwmDutyCycle(value);
|
||||||
|
|
||||||
|
if (result) {
|
||||||
|
scheduleMsg(&logger, "GREAT NEWS!");
|
||||||
|
}
|
||||||
|
|
||||||
tuneWorkingPid.sleep();
|
tuneWorkingPid.sleep();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue