refactoring: inside the boost controller instead of depending on the engine god object

This commit is contained in:
rusefillc 2023-01-22 07:40:42 -05:00
parent 9895eaaa99
commit 92a4895b13
3 changed files with 5 additions and 9 deletions

View File

@ -150,6 +150,10 @@ void BoostController::setOutput(expected<float> 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;

View File

@ -46,5 +46,3 @@ void startBoostPin();
void initBoostCtrl();
void setDefaultBoostParameters();
void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfiguration);
void updateBoostControl();

View File

@ -155,7 +155,7 @@ void Engine::periodicSlowCallback() {
updateFans(module<AcController>().unmock().isAcEnabled());
#if EFI_BOOST_CONTROL
updateBoostControl();
engine->boostController.update();
#endif // EFI_BOOST_CONTROL
#if (BOARD_TLE8888_COUNT > 0)