rusEFI
The most advanced open source ECU
|
Utility method related to the engine configuration data structure.
This file is part of rusEfi - see http://rusefi.com
rusEfi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file engine_configuration.cpp.
Variables | |
std::optional< setup_custom_board_overrides_type > | custom_board_DefaultConfiguration |
std::optional< setup_custom_board_overrides_type > | custom_board_ConfigOverrides |
static bool | hasRememberedConfiguration = false |
engine_configuration_s & | activeConfiguration = reinterpret_cast<persistent_config_container_s*>(getFlashAddrFirstCopy())->persistentConfiguration.engineConfiguration |
bool | isActiveConfigurationVoid = true |
static engine_configuration_s | activeConfigurationLocalStorage |
void applyNonPersistentConfiguration | ( | ) |
Definition at line 693 of file engine_configuration.cpp.
Referenced by readFromFlash(), and resetConfigurationExt().
PUBLIC_API_WEAK void boardBeforeTuneDefaults | ( | ) |
this hook is about https://github.com/rusefi/rusefi/wiki/Custom-Firmware and https://github.com/rusefi/rusefi/wiki/Canned-Tune-Process todo: why two hooks? is one already dead?
Definition at line 124 of file engine_configuration.cpp.
Referenced by resetConfigurationExt().
PUBLIC_API_WEAK void boardOnConfigurationChange | ( | engine_configuration_s * | previousConfiguration | ) |
Definition at line 127 of file engine_configuration.cpp.
Referenced by incrementGlobalConfigurationVersion().
void commonFrankensoAnalogInputs | ( | ) |
VBatt
Definition at line 713 of file engine_configuration.cpp.
Referenced by setDodgeNeonNGCEngineConfiguration(), and setFrankensoConfiguration().
void emptyCallbackWithConfiguration | ( | engine_configuration_s * | p_engineConfiguration | ) |
Definition at line 685 of file engine_configuration.cpp.
Referenced by resetConfigurationExt().
|
static |
Definition at line 100 of file engine_configuration.cpp.
Referenced by wipeStrings().
PUBLIC_API_WEAK int getBoardMetaDcOutputsCount | ( | ) |
Definition at line 735 of file engine_configuration.cpp.
PUBLIC_API_WEAK int getBoardMetaLowSideOutputsCount | ( | ) |
Definition at line 733 of file engine_configuration.cpp.
PUBLIC_API_WEAK Gpio * getBoardMetaOutputs | ( | ) |
Definition at line 734 of file engine_configuration.cpp.
PUBLIC_API_WEAK_SOMETHING_WEIRD int getBoardMetaOutputsCount | ( | ) |
Definition at line 731 of file engine_configuration.cpp.
Referenced by getBoardMetaLowSideOutputsCount().
PUBLIC_API_WEAK int hackHellenBoardId | ( | int | detectedId | ) |
Definition at line 727 of file engine_configuration.cpp.
void incrementGlobalConfigurationVersion | ( | const char * | msg | ) |
this is the top-level method which should be called in case of any changes to engine configuration 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' or 'startHardware' which are invoked BOTH on start and configuration change
Definition at line 136 of file engine_configuration.cpp.
Referenced by configureRusefiLuaHooks(), disableTriggerStimulator(), enableExternalTriggerStimulator(), enableOrDisable(), enableTriggerStimulator(), onBurnRequest(), setAnalogInputPin(), setBit(), setByte(), setCrankingInjectionMode(), setCrankingTimingAngle(), setEngineType(), setFloat(), setGlobalTriggerAngleOffset(), setIdleSolenoidFrequency(), setIgnitionMode(), setIgnitionPin(), setIndividualPin(), setInjectionMode(), setInt(), setLogicInputPin(), setShort(), setTriggerInputPin(), setTriggerSimulatorPin(), and setTriggerType().
void loadConfiguration | ( | ) |
Definition at line 627 of file engine_configuration.cpp.
Referenced by runRusEfi().
PUBLIC_API_WEAK void onBoardStandBy | ( | ) |
Definition at line 729 of file engine_configuration.cpp.
void onBurnRequest | ( | ) |
Definition at line 113 of file engine_configuration.cpp.
Referenced by requestBurn().
void prepareVoidConfiguration | ( | engine_configuration_s * | p_engineConfiguration | ) |
Definition at line 224 of file engine_configuration.cpp.
Referenced by loadConfiguration(), and setDefaultEngineConfiguration().
void rememberCurrentConfiguration | ( | ) |
Definition at line 91 of file engine_configuration.cpp.
Referenced by incrementGlobalConfigurationVersion(), and initEfiWithConfig().
void resetConfigurationExt | ( | configuration_callback_t | boardCallback, |
engine_type_e | engineType | ||
) |
boardCallback is invoked after configuration reset but before specific engineType configuration
Let's apply global defaults first
custom board engine defaults. Yes, this overlaps with (older) engine_type_e approach.
Definition at line 655 of file engine_configuration.cpp.
Referenced by doResetConfiguration(), loadConfiguration(), readFromFlash(), resetConfigurationExt(), and setEngineType().
void resetConfigurationExt | ( | engine_type_e | engineType | ) |
Definition at line 689 of file engine_configuration.cpp.
void setBoardConfigOverrides | ( | ) |
Definition at line 723 of file engine_configuration.cpp.
void setBoardDefaultConfiguration | ( | ) |
Board-specific configuration defaults.
Definition at line 720 of file engine_configuration.cpp.
void setCamOperationMode | ( | ) |
Definition at line 704 of file engine_configuration.cpp.
Referenced by setFordInline6(), setSubaruEG33Defaults(), and setTestCamEngineConfiguration().
void setConstantDwell | ( | floatms_t | dwellMs | ) |
Sets the same dwell time across the whole getRpm() range set dwell X.
Definition at line 178 of file engine_configuration.cpp.
Referenced by setDefaultIgnition(), setFordInline6(), setTestCamEngineConfiguration(), and setValue().
void setCrankOperationMode | ( | ) |
Definition at line 708 of file engine_configuration.cpp.
Referenced by commonPassatB6(), cypressBoardDefaultConfiguration(), hellen112_17_boardDefaultConfiguration(), hellen121_nissan_boardDefaultConfiguration(), hellen88_boardDefaultConfiguration(), hellen_honda_k_boardDefaultConfiguration(), m73engine(), setEtbTestConfiguration(), setGy6139qmbDefaultEngineConfiguration(), setTestCrankEngineConfiguration(), setTestVVTEngineConfiguration(), setToyota_2jz_vics(), setVwAba(), super_uaefi_boardDefaultConfiguration(), and uaefi_boardDefaultConfiguration().
void setDefaultBasePins | ( | ) |
Definition at line 233 of file engine_configuration.cpp.
Referenced by resetConfigurationExt().
|
static |
Definition at line 311 of file engine_configuration.cpp.
Referenced by setDefaultEngineConfiguration().
|
static |
Definition at line 326 of file engine_configuration.cpp.
Referenced by setDefaultEngineConfiguration().
|
static |
Global default engine configuration This method sets the global engine configuration defaults. These default values are then overridden by engine-specific defaults and the settings are saved in flash memory.
This method is invoked only when new configuration is needed:
This method should only change the state of the configuration data structure but should NOT change the state of anything else.
This method should NOT be setting any default pinout
Idle control defaults
between variation between different sensor and weather and fabrication tolerance five percent looks like a safer default
Definition at line 375 of file engine_configuration.cpp.
Referenced by resetConfigurationExt().
|
static |
Definition at line 316 of file engine_configuration.cpp.
Referenced by setDefaultEngineConfiguration().
|
static |
Definition at line 278 of file engine_configuration.cpp.
Referenced by setDefaultEngineConfiguration().
|
static |
Definition at line 351 of file engine_configuration.cpp.
Referenced by setDefaultEngineConfiguration().
|
static |
see also setTargetRpmCurve()
Definition at line 262 of file engine_configuration.cpp.
Referenced by setDefaultEngineConfiguration().
|
static |
Definition at line 340 of file engine_configuration.cpp.
Referenced by setDefaultEngineConfiguration().
void setDefaultSdCardParameters | ( | ) |
Definition at line 253 of file engine_configuration.cpp.
Referenced by f407_discovery_DefaultConfiguration().
Definition at line 185 of file engine_configuration.cpp.
Referenced by setDefaultFuel(), setDodgeNeonNGCEngineConfiguration(), and setVwAba().
void setTargetRpmCurve | ( | float | rpm | ) |
see also setDefaultIdleSpeedTarget()
Definition at line 273 of file engine_configuration.cpp.
Referenced by setGy6139qmbDefaultEngineConfiguration(), and setTargetIdleRpm().
void setWholeIatCorrTimingTable | ( | float | value | ) |
Definition at line 191 of file engine_configuration.cpp.
Referenced by setTestCamEngineConfiguration().
void setWholeTimingTable | ( | angle_t | value | ) |
See also crankingTimingAngle
Definition at line 198 of file engine_configuration.cpp.
Referenced by setDodgeNeon1995EngineConfiguration(), setVwAba(), and testEngine6451().
|
static |
Definition at line 107 of file engine_configuration.cpp.
Referenced by onBurnRequest().
engine_configuration_s & activeConfiguration = reinterpret_cast<persistent_config_container_s*>(getFlashAddrFirstCopy())->persistentConfiguration.engineConfiguration |
& is reference in C++ (not C) Ref is a pointer that: you access with dot instead of arrow Cannot be null This is about EFI_ACTIVE_CONFIGURATION_IN_FLASH
Definition at line 83 of file engine_configuration.cpp.
Referenced by applyNewHardwareSettings(), deInitAuxDigital(), deInitOldAnalogInputs(), deinitTps(), incrementGlobalConfigurationVersion(), RegisteredOutputPin::isPinConfigurationChanged(), loadConfiguration(), rememberCurrentConfiguration(), stopKLine(), stopLogicAnalyzerPins(), stopSent(), stopSmartCsPins(), stopSwitchPins(), stopTriggerInputPins(), and turnOffTriggerInputPin().
|
static |
Definition at line 87 of file engine_configuration.cpp.
std::optional<setup_custom_board_overrides_type> custom_board_ConfigOverrides |
Definition at line 71 of file engine_configuration.cpp.
Referenced by TunerStudio::handleWriteChunkCommand(), loadConfiguration(), resetConfigurationExt(), and setup_custom_board_overrides().
std::optional<setup_custom_board_overrides_type> custom_board_DefaultConfiguration |
Definition at line 70 of file engine_configuration.cpp.
Referenced by resetConfigurationExt(), and setup_custom_board_overrides().
|
static |
Current engine configuration. On firmware start we assign empty configuration, then we copy actual configuration after reading settings from flash. This is useful to compare old/current (activeConfiguration) and new/future (engineConfiguration) configurations in order to apply new settings.
todo: place this field next to 'engineConfiguration'?
Definition at line 80 of file engine_configuration.cpp.
Referenced by incrementGlobalConfigurationVersion(), and rememberCurrentConfiguration().
bool isActiveConfigurationVoid = true |
Definition at line 85 of file engine_configuration.cpp.
Referenced by rememberCurrentConfiguration(), and ButtonDebounce::stopConfiguration().