parameter names

This commit is contained in:
Matthew Kennedy 2020-07-29 02:22:31 -07:00
parent dd9c9e7a81
commit 225e403973
2 changed files with 5 additions and 5 deletions

View File

@ -323,7 +323,7 @@ expected<percent_t> EtbController::getClosedLoopAutotune(percent_t actualThrottl
return autotuneAmplitude * (isPositive ? -1 : 1); return autotuneAmplitude * (isPositive ? -1 : 1);
} }
expected<percent_t> EtbController::getClosedLoop(percent_t target, percent_t actualThrottlePosition) { expected<percent_t> EtbController::getClosedLoop(percent_t target, percent_t observation) {
if (m_shouldResetPid) { if (m_shouldResetPid) {
m_pid.reset(); m_pid.reset();
m_shouldResetPid = false; m_shouldResetPid = false;
@ -333,16 +333,16 @@ expected<percent_t> EtbController::getClosedLoop(percent_t target, percent_t act
if (m_myIndex == 0) { if (m_myIndex == 0) {
#if EFI_TUNER_STUDIO #if EFI_TUNER_STUDIO
// Error is positive if the throttle needs to open further // Error is positive if the throttle needs to open further
tsOutputChannels.etb1Error = target - actualThrottlePosition; tsOutputChannels.etb1Error = target - observation;
#endif /* EFI_TUNER_STUDIO */ #endif /* EFI_TUNER_STUDIO */
} }
// Only allow autotune with stopped engine // Only allow autotune with stopped engine
if (GET_RPM() == 0 && engine->etbAutoTune) { if (GET_RPM() == 0 && engine->etbAutoTune) {
return getClosedLoopAutotune(actualThrottlePosition); return getClosedLoopAutotune(observation);
} else { } else {
// Normal case - use PID to compute closed loop part // Normal case - use PID to compute closed loop part
return m_pid.getOutput(target, actualThrottlePosition, 1.0f / ETB_LOOP_FREQUENCY); return m_pid.getOutput(target, observation, 1.0f / ETB_LOOP_FREQUENCY);
} }
} }

View File

@ -55,7 +55,7 @@ public:
expected<percent_t> getSetpoint() const override; expected<percent_t> getSetpoint() const override;
expected<percent_t> getOpenLoop(percent_t target) const override; expected<percent_t> getOpenLoop(percent_t target) const override;
expected<percent_t> getClosedLoop(percent_t setpoint, percent_t target) override; expected<percent_t> getClosedLoop(percent_t setpoint, percent_t observation) override;
expected<percent_t> getClosedLoopAutotune(percent_t actualThrottlePosition); expected<percent_t> getClosedLoopAutotune(percent_t actualThrottlePosition);
void setOutput(expected<percent_t> outputValue) override; void setOutput(expected<percent_t> outputValue) override;