refactoring

This commit is contained in:
rusefi 2019-12-23 23:32:43 -05:00
parent 3494f6ff9f
commit c38b4545eb
3 changed files with 13 additions and 13 deletions

View File

@ -672,6 +672,14 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S
initConfigActions();
#endif /* EFI_UNIT_TEST */
#if EFI_ENGINE_CONTROL
/**
* This has to go after 'initInjectorCentral' in order to
* properly detect un-assigned output pins
*/
prepareShapes(PASS_ENGINE_PARAMETER_SIGNATURE);
#endif /* EFI_PROD_CODE && EFI_ENGINE_CONTROL */
#if EFI_ENABLE_MOCK_ADC
initMockVoltage();
@ -724,6 +732,11 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
printf("initEngineContoller\n");
#endif
addConsoleAction("analoginfo", printAnalogInfo);
#if EFI_PROD_CODE && EFI_ENGINE_CONTROL
initInjectorCentral(sharedLogger);
#endif /* EFI_PROD_CODE && EFI_ENGINE_CONTROL */
commonInitEngineController(sharedLogger);
#if EFI_PROD_CODE
@ -743,9 +756,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
initCJ125(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_CJ125 */
#if EFI_PROD_CODE && EFI_ENGINE_CONTROL
initInjectorCentral(sharedLogger);
#endif /* EFI_PROD_CODE && EFI_ENGINE_CONTROL */
// periodic events need to be initialized after fuel&spark pins to avoid a warning
initPeriodicEvents(PASS_ENGINE_PARAMETER_SIGNATURE);
@ -756,14 +766,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
engineStateBlinkingTask.Start();
#if EFI_PROD_CODE && EFI_ENGINE_CONTROL
/**
* This has to go after 'initInjectorCentral' and 'initInjectorCentral' in order to
* properly detect un-assigned output pins
*/
prepareShapes(PASS_ENGINE_PARAMETER_SIGNATURE);
#endif /* EFI_PROD_CODE && EFI_ENGINE_CONTROL */
#if EFI_PWM_TESTER
initPwmTester();
#endif /* EFI_PWM_TESTER */

View File

@ -119,7 +119,6 @@ void rusEfiFunctionalTest(void) {
// todo: reduce code duplication with initEngineContoller
resetConfigurationExt(NULL, FORD_ESCORT_GT PASS_ENGINE_PARAMETER_SUFFIX);
prepareShapes(PASS_ENGINE_PARAMETER_SIGNATURE);
commonInitEngineController(&sharedLogger);

View File

@ -61,7 +61,6 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
commonInitEngineController(NULL PASS_ENGINE_PARAMETER_SUFFIX);
prepareShapes(PASS_ENGINE_PARAMETER_SIGNATURE);
engine->engineConfigurationPtr->mafAdcChannel = TEST_MAF_CHANNEL;
engine->engineConfigurationPtr->clt.adcChannel = TEST_CLT_CHANNEL;
engine->engineConfigurationPtr->iat.adcChannel = TEST_IAT_CHANNEL;