This commit is contained in:
rusefi 2020-03-23 23:51:51 -04:00
parent c6fb7fb7bb
commit 391b0ec368
3 changed files with 12 additions and 10 deletions

View File

@ -185,13 +185,15 @@ void initBoostCtrl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
if (CONFIG(boostControlPin) == GPIO_UNASSIGNED){ if (CONFIG(boostControlPin) == GPIO_UNASSIGNED){
return; return;
} }
#endif
boostControlPid.initPidClass(&persistentState.persistentConfiguration.engineConfiguration.boostPid); boostControlPid.initPidClass(&engineConfiguration->boostPid);
logger = sharedLogger; logger = sharedLogger;
boostMapOpen.init(config->boostTableOpenLoop, config->boostMapBins, config->boostRpmBins); boostMapOpen.init(config->boostTableOpenLoop, config->boostMapBins, config->boostRpmBins);
boostMapClosed.init(config->boostTableClosedLoop, config->boostTpsBins, config->boostRpmBins); boostMapClosed.init(config->boostTableClosedLoop, config->boostTpsBins, config->boostRpmBins);
boostControlPid.reset(); boostControlPid.reset();
#if !EFI_UNIT_TEST
startBoostPin(); startBoostPin();
BoostController.Start(); BoostController.Start();
#endif #endif

View File

@ -11,7 +11,7 @@
void startBoostPin(void); void startBoostPin(void);
void stopBoostPin(void); void stopBoostPin(void);
void initBoostCtrl(Logging *sharedLogger); void initBoostCtrl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
void setBoostPFactor(float p); void setBoostPFactor(float p);
void setBoostIFactor(float i); void setBoostIFactor(float i);
void setBoostDFactor(float d); void setBoostDFactor(float d);

View File

@ -151,6 +151,14 @@ static void mostCommonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_
} }
#endif /* EFI_MAP_AVERAGING */ #endif /* EFI_MAP_AVERAGING */
#if EFI_BOOST_CONTROL
initBoostCtrl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_BOOST_CONTROL */
#if EFI_LAUNCH_CONTROL
initLaunchControl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif
} }
#if EFI_ENABLE_MOCK_ADC #if EFI_ENABLE_MOCK_ADC
@ -676,14 +684,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
initAlternatorCtrl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); initAlternatorCtrl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_ALTERNATOR_CONTROL */ #endif /* EFI_ALTERNATOR_CONTROL */
#if EFI_BOOST_CONTROL
initBoostCtrl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_BOOST_CONTROL */
#if EFI_LAUNCH_CONTROL
initLaunchControl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif
#if EFI_AUX_PID #if EFI_AUX_PID
initAuxPid(sharedLogger); initAuxPid(sharedLogger);
#endif /* EFI_AUX_PID */ #endif /* EFI_AUX_PID */