refactoring: inside the boost controller instead of depending on the engine god object
This commit is contained in:
parent
9895eaaa99
commit
92a4895b13
|
@ -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;
|
||||
|
|
|
@ -46,5 +46,3 @@ void startBoostPin();
|
|||
void initBoostCtrl();
|
||||
void setDefaultBoostParameters();
|
||||
void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfiguration);
|
||||
|
||||
void updateBoostControl();
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue