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
*
* 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) {
assertStackVoid("increment", ObdCode::STACK_USAGE_MISC, EXPECTED_REMAINING_STACK);

View File

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

View File

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

View File

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

View File

@ -259,7 +259,7 @@ void runRusEfiWithConfig() {
* Now let's initialize actual engine control logic
* 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

View File

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