This commit is contained in:
rusefi 2017-02-23 14:00:03 -05:00
parent f8c7528ec9
commit 093c79e27e
4 changed files with 11 additions and 4 deletions

View File

@ -1776,7 +1776,7 @@ typedef enum {
CUSTOM_OBD_78 = 6078,
CUSTOM_OBD_79 = 6079,
CUSTOM_OBD_80 = 6080,
CUSTOM_OBD_TRIGGER_SHAPE = 6080,
CUSTOM_OBD_81 = 6081,
CUSTOM_OBD_82 = 6082,
CUSTOM_OBD_83 = 6083,
@ -1845,7 +1845,7 @@ typedef enum {
CUSTOM_ERR_TOO_FEW_EVENTS = 6140,
CUSTOM_ERR_FLASH_CRC_FAILED = 6141,
CUSTOM_ERR_NOT_INPUT_PIN = 6142,
CUSTOM_ERR_6143 = 6143,
CUSTOM_ERR_SKIPPED_TOOTH_SHAPE = 6143,
CUSTOM_ERR_6144 = 6144,
CUSTOM_ERR_6145 = 6145,
CUSTOM_ERR_6146 = 6146,

View File

@ -31,9 +31,11 @@ void addSkippedToothTriggerEvents(trigger_wheel_e wheel, TriggerShape *s, int to
void initializeSkippedToothTriggerShapeExt(TriggerShape *s, int totalTeethCount, int skippedCount,
operation_mode_e operationMode DECLARE_ENGINE_PARAMETER_S) {
if (totalTeethCount <= 0) {
firmwareError(CUSTOM_ERR_6143, "totalTeethCount is zero or less: %d", totalTeethCount);
warning(CUSTOM_OBD_TRIGGER_SHAPE, "totalTeethCount is zero or less: %d", totalTeethCount);
s->shapeDefinitionError = true;
return;
}
s->shapeDefinitionError = false;
efiAssertVoid(s != NULL, "TriggerShape is NULL");
s->initialize(operationMode, false);

View File

@ -627,6 +627,11 @@ uint32_t findTriggerZeroEventIndex(TriggerState *state, TriggerShape * shape,
state->reset();
if (shape->shapeDefinitionError) {
state->triggerDefinitionError = true;
return 0;
}
// todo: should this variable be declared 'static' to reduce stack usage?
TriggerStimulatorHelper helper;

View File

@ -62,7 +62,7 @@ void TriggerStimulatorHelper::assertSyncPositionAndSetDutyCycle(uint32_t index,
nextStep(state, shape, i, triggerConfig PASS_ENGINE_PARAMETER);
}
if (state->getTotalRevolutionCounter() != 3) {
warning(CUSTOM_OBD_80, "sync failed/wrong gap parameters trigger=%s", getTrigger_type_e(engineConfiguration->trigger.type));
warning(CUSTOM_OBD_TRIGGER_SHAPE, "sync failed/wrong gap parameters trigger=%s", getTrigger_type_e(engineConfiguration->trigger.type));
state->triggerDefinitionError = true;
return;
}