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