fix (#2511)
This commit is contained in:
parent
ff12c4d214
commit
9810406fa6
|
@ -152,7 +152,7 @@ engine_configuration_s & activeConfiguration = activeConfigurationLocalStorage;
|
|||
|
||||
extern engine_configuration_s *engineConfiguration;
|
||||
|
||||
static void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
|
||||
memcpy(&activeConfiguration, engineConfiguration, sizeof(engine_configuration_s));
|
||||
#else
|
||||
|
@ -1144,6 +1144,11 @@ void loadConfiguration(Logging* logger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
palSetPadMode(CONFIG_RESET_SWITCH_PORT, CONFIG_RESET_SWITCH_PIN, PAL_MODE_INPUT_PULLUP);
|
||||
#endif /* CONFIG_RESET_SWITCH_PORT */
|
||||
|
||||
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
|
||||
// Clear the active configuration so that registered output pins (etc) detect the change on startup and init properly
|
||||
prepareVoidConfiguration(&activeConfiguration);
|
||||
#endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */
|
||||
|
||||
#if EFI_INTERNAL_FLASH
|
||||
if (SHOULD_IGNORE_FLASH() || IGNORE_FLASH_CONFIGURATION) {
|
||||
engineConfiguration->engineType = DEFAULT_ENGINE_TYPE;
|
||||
|
@ -1159,8 +1164,6 @@ void loadConfiguration(Logging* logger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
engineConfiguration->engineType = DEFAULT_ENGINE_TYPE;
|
||||
resetConfigurationExt(logger, engineConfiguration->engineType PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
#endif /* EFI_INTERNAL_FLASH */
|
||||
|
||||
rememberCurrentConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
|
||||
void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallback, engine_type_e engineType DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
|
|
@ -61,6 +61,8 @@ typedef void (*configuration_callback_t)(engine_configuration_s*);
|
|||
void loadConfiguration(Logging* logger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallback, engine_type_e engineType DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
#endif /* __cplusplus */
|
||||
|
||||
struct ConfigOverrides {
|
||||
|
|
|
@ -237,6 +237,9 @@ void runRusEfi(void) {
|
|||
*/
|
||||
initEngineContoller(&sharedLogger PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
// This has to happen after RegisteredOutputPins are init'd: otherwise no change will be detected, and no init will happen
|
||||
rememberCurrentConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
#if EFI_PERF_METRICS
|
||||
initTimePerfActions(&sharedLogger);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue