diff --git a/firmware/controllers/trigger/trigger_decoder.h b/firmware/controllers/trigger/trigger_decoder.h index 68d93057eb..4099d657ed 100644 --- a/firmware/controllers/trigger/trigger_decoder.h +++ b/firmware/controllers/trigger/trigger_decoder.h @@ -64,6 +64,8 @@ public: */ bool shaft_is_synchronized; + bool triggerDefinitionError; + uint32_t toothed_previous_duration; // todo: unify Camel_notation, what a mess :( uint32_t durationBeforePrevious; // this one is before 'toothed_previous_duration' uint32_t thirdPreviousDuration; // this one is before durationBeforePrevious, todo: better field names? diff --git a/firmware/controllers/trigger/trigger_simulator.cpp b/firmware/controllers/trigger/trigger_simulator.cpp index b46f8bde7e..d83495e6a1 100644 --- a/firmware/controllers/trigger/trigger_simulator.cpp +++ b/firmware/controllers/trigger/trigger_simulator.cpp @@ -62,9 +62,11 @@ void TriggerStimulatorHelper::assertSyncPositionAndSetDutyCycle(uint32_t index, nextStep(state, shape, i, triggerConfig PASS_ENGINE_PARAMETER); } if (state->getTotalRevolutionCounter() != 3) { - firmwareError(OBD_PCM_Processor_Fault, "sync failed/wrong gap parameters trigger=%s", getTrigger_type_e(engineConfiguration->trigger.type)); + warning(CUSTOM_OBD_80, "sync failed/wrong gap parameters trigger=%s", getTrigger_type_e(engineConfiguration->trigger.type)); + state->triggerDefinitionError = true; return; } + state->triggerDefinitionError = false; for (int i = 0; i < PWM_PHASE_MAX_WAVE_PER_PWM; i++) { shape->dutyCycle[i] = 1.0 * state->expectedTotalTime[i] / SIMULATION_CYCLE_PERIOD; diff --git a/firmware/controllers/trigger/trigger_structure.cpp b/firmware/controllers/trigger/trigger_structure.cpp index e1f46541b1..52ed6f3310 100644 --- a/firmware/controllers/trigger/trigger_structure.cpp +++ b/firmware/controllers/trigger/trigger_structure.cpp @@ -165,7 +165,7 @@ TriggerState::TriggerState() { void TriggerState::reset() { cycleCallback = NULL; - shaft_is_synchronized = false; + triggerDefinitionError = shaft_is_synchronized = false; toothed_previous_time = 0; toothed_previous_duration = 0; durationBeforePrevious = 0; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index d944424ef5..d56c8a902e 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -617,7 +617,7 @@ custom idle_mode_e 4 bits, U32, @OFFSET@, [0:0], "false", "true" bit isPrintTriggerSynchDetails;+enable trigger_details bit isManualSpinningMode;Usually if we have no trigger events that means engine is stopped\nUnless we are troubleshooting and spinning the engine by hand - this case a longer\ndelay is needed bit twoWireBatchInjection;+This is needed if batched injection and individual injector wiring\nenable two_wire_batch_injection - bit useOnlyRisingEdgeForTrigger;+VR sensors are only precise on rising front + bit useOnlyRisingEdgeForTrigger;+VR sensors are only precise on rising front\nenable trigger_only_front bit twoWireBatchIgnition;+This is needed if batched igniton (waster spark) and individual coil wiring diff --git a/java_console/autotest/src/com/rusefi/AutoTest.java b/java_console/autotest/src/com/rusefi/AutoTest.java index cb78d30aec..1aa617d0f9 100644 --- a/java_console/autotest/src/com/rusefi/AutoTest.java +++ b/java_console/autotest/src/com/rusefi/AutoTest.java @@ -45,6 +45,7 @@ public class AutoTest { private static void testCustomEngine() { setEngineType(0); sendCommand("set_toothed_wheel 4 0"); +// sendCommand("enable trigger_only_front"); } private static void testMazdaMiata2003() {