diff --git a/firmware/controllers/actuators/boost_control.cpp b/firmware/controllers/actuators/boost_control.cpp index d371bef405..4f88a67b03 100644 --- a/firmware/controllers/actuators/boost_control.cpp +++ b/firmware/controllers/actuators/boost_control.cpp @@ -150,6 +150,10 @@ void BoostController::setOutput(expected output) { } void BoostController::update() { + if (!hasInitBoost) { + return; + } + m_pid.iTermMin = -50; m_pid.iTermMax = 50; @@ -165,12 +169,6 @@ void BoostController::update() { } } -void updateBoostControl() { - if (engine->boostController.hasInitBoost) { - engine->boostController.update(); - } -} - void setDefaultBoostParameters() { engineConfiguration->boostPwmFrequency = 33; engineConfiguration->boostPid.offset = 0; diff --git a/firmware/controllers/actuators/boost_control.h b/firmware/controllers/actuators/boost_control.h index d80f96470f..167b18c764 100644 --- a/firmware/controllers/actuators/boost_control.h +++ b/firmware/controllers/actuators/boost_control.h @@ -46,5 +46,3 @@ void startBoostPin(); void initBoostCtrl(); void setDefaultBoostParameters(); void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfiguration); - -void updateBoostControl(); diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 09e7e27a80..e996112fc2 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -155,7 +155,7 @@ void Engine::periodicSlowCallback() { updateFans(module().unmock().isAcEnabled()); #if EFI_BOOST_CONTROL - updateBoostControl(); + engine->boostController.update(); #endif // EFI_BOOST_CONTROL #if (BOARD_TLE8888_COUNT > 0)