only:docs/renaming method to reduce confusion

This commit is contained in:
rusefillc 2023-09-25 12:49:44 -04:00
parent 50f9fce660
commit 92292aeddd
6 changed files with 14 additions and 11 deletions

View File

@ -169,7 +169,7 @@ __attribute__((weak)) void boardOnConfigurationChange(engine_configuration_s* /*
* online tuning of most values in the maps does not count as configuration change, but 'Burn' command does * online tuning of most values in the maps does not count as configuration change, but 'Burn' command does
* *
* this method is NOT currently invoked on ECU start - actual user input has to happen! * this method is NOT currently invoked on ECU start - actual user input has to happen!
* See preCalculate which is invoked BOTH on start and configuration change * See 'preCalculate' or 'startHardware' which are invoked BOTH on start and configuration change
*/ */
void incrementGlobalConfigurationVersion(const char * msg) { void incrementGlobalConfigurationVersion(const char * msg) {
assertStackVoid("increment", ObdCode::STACK_USAGE_MISC, EXPECTED_REMAINING_STACK); assertStackVoid("increment", ObdCode::STACK_USAGE_MISC, EXPECTED_REMAINING_STACK);

View File

@ -403,8 +403,14 @@ static void initConfigActions() {
} }
#endif /* EFI_UNIT_TEST */ #endif /* EFI_UNIT_TEST */
// one-time start-up
// this method is used by real firmware and simulator and unit test // this method is used by real firmware and simulator and unit test
void commonInitEngineController() { void commonInitEngineController() {
#if EFI_PROD_CODE
addConsoleAction("sensorinfo", printSensorInfo);
addConsoleAction("reset_accel", resetAccel);
#endif /* EFI_PROD_CODE */
initInterpolation(); initInterpolation();
#if EFI_SIMULATOR || EFI_UNIT_TEST #if EFI_SIMULATOR || EFI_UNIT_TEST
@ -653,8 +659,8 @@ void commonEarlyInit() {
#endif // HW_CHECK_ALWAYS_STIMULATE #endif // HW_CHECK_ALWAYS_STIMULATE
} }
void initEngineController() { // one-time start-up
addConsoleAction("sensorinfo", printSensorInfo); void initRealHardwareEngineController() {
#if EFI_PROD_CODE && EFI_ENGINE_CONTROL #if EFI_PROD_CODE && EFI_ENGINE_CONTROL
initBenchTest(); initBenchTest();
@ -693,11 +699,6 @@ void initEngineController() {
#endif /* EFI_MALFUNCTION_INDICATOR */ #endif /* EFI_MALFUNCTION_INDICATOR */
initEgoAveraging(); initEgoAveraging();
#if EFI_PROD_CODE
addConsoleAction("reset_accel", resetAccel);
#endif /* EFI_PROD_CODE */
} }
/** /**

View File

@ -12,7 +12,8 @@
bool validateConfig(); bool validateConfig();
char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *buffer); char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *buffer);
void initPeriodicEvents(); void initPeriodicEvents();
void initEngineController(); // see also applyNewHardwareSettings
void initRealHardwareEngineController();
void commonEarlyInit(); void commonEarlyInit();
void commonInitEngineController(); void commonInitEngineController();
void initStartStopButton(); void initStartStopButton();

View File

@ -7,6 +7,7 @@
#pragma once #pragma once
// 'startHardware' is invoked both on boot and configuration change
void startHardware(); void startHardware();
void stopHardware(); void stopHardware();

View File

@ -259,7 +259,7 @@ void runRusEfiWithConfig() {
* Now let's initialize actual engine control logic * Now let's initialize actual engine control logic
* todo: should we initialize some? most? controllers before hardware? * todo: should we initialize some? most? controllers before hardware?
*/ */
initEngineController(); initRealHardwareEngineController();
// This has to happen after RegisteredOutputPins are init'd: otherwise no change will be detected, and no init will happen // This has to happen after RegisteredOutputPins are init'd: otherwise no change will be detected, and no init will happen

View File

@ -144,7 +144,7 @@ void rusEfiFunctionalTest(void) {
initDataStructures(); initDataStructures();
initializeConsole(); initializeConsole();
// todo: reduce code duplication with initEngineController // todo: reduce code duplication with initRealHardwareEngineController
initFlash(); initFlash();
loadConfiguration(); loadConfiguration();