#363 new flag for softer error handling
This commit is contained in:
parent
95764a3cda
commit
7f4c770db9
|
@ -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?
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue