fix (#2109)
This commit is contained in:
parent
e4637ea114
commit
f29ca22b99
|
@ -313,9 +313,6 @@ public:
|
||||||
*/
|
*/
|
||||||
int ignitionPin[IGNITION_PIN_COUNT];
|
int ignitionPin[IGNITION_PIN_COUNT];
|
||||||
|
|
||||||
// Store current ignition mode for prepareIgnitionPinIndices()
|
|
||||||
ignition_mode_e ignitionModeForPinIndices = Force_4_bytes_size_ignition_mode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this is invoked each time we register a trigger tooth signal
|
* this is invoked each time we register a trigger tooth signal
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -360,14 +360,11 @@ static int getIgnitionPinForIndex(int cylinderIndex DECLARE_ENGINE_PARAMETER_SUF
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepareIgnitionPinIndices(ignition_mode_e ignitionMode DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void prepareIgnitionPinIndices(ignition_mode_e ignitionMode DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
if (ignitionMode != engine->ignitionModeForPinIndices) {
|
|
||||||
#if EFI_ENGINE_CONTROL
|
#if EFI_ENGINE_CONTROL
|
||||||
for (int cylinderIndex = 0; cylinderIndex < CONFIG(specs.cylindersCount); cylinderIndex++) {
|
for (int cylinderIndex = 0; cylinderIndex < CONFIG(specs.cylindersCount); cylinderIndex++) {
|
||||||
ENGINE(ignitionPin[cylinderIndex]) = getIgnitionPinForIndex(cylinderIndex PASS_ENGINE_PARAMETER_SUFFIX);
|
ENGINE(ignitionPin[cylinderIndex]) = getIgnitionPinForIndex(cylinderIndex PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
}
|
|
||||||
#endif /* EFI_ENGINE_CONTROL */
|
|
||||||
engine->ignitionModeForPinIndices = ignitionMode;
|
|
||||||
}
|
}
|
||||||
|
#endif /* EFI_ENGINE_CONTROL */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#if !EFI_UNIT_TEST
|
#if !EFI_UNIT_TEST
|
||||||
|
#include "os_access.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "eficonsole.h"
|
#include "eficonsole.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
@ -241,14 +242,18 @@ static void setTimingMode(int value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setEngineType(int value) {
|
void setEngineType(int value) {
|
||||||
engineConfiguration->engineType = (engine_type_e) value;
|
{
|
||||||
resetConfigurationExt(&logger, (engine_type_e) value PASS_ENGINE_PARAMETER_SUFFIX);
|
chibios_rt::CriticalSectionLocker csl;
|
||||||
engine->resetEngineSnifferIfInTestMode();
|
|
||||||
|
|
||||||
#if EFI_INTERNAL_FLASH
|
engineConfiguration->engineType = (engine_type_e) value;
|
||||||
writeToFlashNow();
|
resetConfigurationExt(&logger, (engine_type_e) value PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
// scheduleReset();
|
engine->resetEngineSnifferIfInTestMode();
|
||||||
#endif /* EFI_PROD_CODE */
|
|
||||||
|
#if EFI_INTERNAL_FLASH
|
||||||
|
writeToFlashNow();
|
||||||
|
// scheduleReset();
|
||||||
|
#endif /* EFI_PROD_CODE */
|
||||||
|
}
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
doPrintConfiguration();
|
doPrintConfiguration();
|
||||||
}
|
}
|
||||||
|
@ -426,6 +431,7 @@ static void setInjectionMode(int value) {
|
||||||
static void setIgnitionMode(int value) {
|
static void setIgnitionMode(int value) {
|
||||||
engineConfiguration->ignitionMode = (ignition_mode_e) value;
|
engineConfiguration->ignitionMode = (ignition_mode_e) value;
|
||||||
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
prepareOutputSignals(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
doPrintConfiguration();
|
doPrintConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue