use onConfigurationChange instead of version holder
This commit is contained in:
parent
dff215461f
commit
6be4d6073f
|
@ -39,11 +39,13 @@ void VvtController::onFastCallback() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine->vvtParametersVersion.isOld(engine->getGlobalConfigurationVersion())) {
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VvtController::onConfigurationChange(engine_configuration_s const * previousConfig) {
|
||||||
|
if (!m_pid.isSame(&previousConfig->auxPid[index])) {
|
||||||
m_pid.reset();
|
m_pid.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
expected<angle_t> VvtController::observePlant() const {
|
expected<angle_t> VvtController::observePlant() const {
|
||||||
|
|
|
@ -28,6 +28,7 @@ public:
|
||||||
|
|
||||||
// EngineModule implementation
|
// EngineModule implementation
|
||||||
void onFastCallback() override;
|
void onFastCallback() override;
|
||||||
|
void onConfigurationChange(engine_configuration_s const * previousConfig) override;
|
||||||
|
|
||||||
// ClosedLoopController implementation
|
// ClosedLoopController implementation
|
||||||
expected<angle_t> observePlant() const override;
|
expected<angle_t> observePlant() const override;
|
||||||
|
|
|
@ -219,7 +219,6 @@ public:
|
||||||
void setConfig();
|
void setConfig();
|
||||||
|
|
||||||
LocalVersionHolder versionForConfigurationListeners;
|
LocalVersionHolder versionForConfigurationListeners;
|
||||||
LocalVersionHolder vvtParametersVersion;
|
|
||||||
|
|
||||||
AuxActor auxValves[AUX_DIGITAL_VALVE_COUNT][2];
|
AuxActor auxValves[AUX_DIGITAL_VALVE_COUNT][2];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue