use onConfigurationChange instead of version holder

This commit is contained in:
Matthew Kennedy 2023-09-26 20:49:33 -04:00 committed by rusefillc
parent dff215461f
commit 6be4d6073f
3 changed files with 6 additions and 4 deletions

View File

@ -39,11 +39,13 @@ void VvtController::onFastCallback() {
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();
}
update();
}
expected<angle_t> VvtController::observePlant() const {

View File

@ -28,6 +28,7 @@ public:
// EngineModule implementation
void onFastCallback() override;
void onConfigurationChange(engine_configuration_s const * previousConfig) override;
// ClosedLoopController implementation
expected<angle_t> observePlant() const override;

View File

@ -219,7 +219,6 @@ public:
void setConfig();
LocalVersionHolder versionForConfigurationListeners;
LocalVersionHolder vvtParametersVersion;
AuxActor auxValves[AUX_DIGITAL_VALVE_COUNT][2];