Refactor Trigger System #635
This commit is contained in:
parent
34928c1253
commit
2f2fcc11e0
|
@ -20,8 +20,7 @@
|
|||
|
||||
#include "trigger_mazda.h"
|
||||
|
||||
// todo: remove useOnlyRisingEdgeForTrigger parameter from here see https://github.com/rusefi/rusefi/issues/635
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s, bool useOnlyRisingEdgeForTrigger) {
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
|
||||
s->setTriggerSynchronizationGap2(1.4930 * 0.6f, 1.4930 * 1.3f);
|
||||
s->useRiseEdge = false;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#define MIATA_NA_GAP 1.4930f
|
||||
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s, bool useOnlyRisingEdgeForTrigger);
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s);
|
||||
void initializeMazdaMiataNb1Shape(TriggerShape *s);
|
||||
void initializeMazdaMiataNb2Crank(TriggerShape *s);
|
||||
void initializeMazdaMiataVVtTestShape(TriggerShape *s);
|
||||
|
|
|
@ -420,7 +420,7 @@ void TriggerShape::initializeTriggerShape(Logging *logger, operation_mode_e oper
|
|||
break;
|
||||
|
||||
case TT_MAZDA_MIATA_NA:
|
||||
initializeMazdaMiataNaShape(this, useOnlyRisingEdgeForTrigger);
|
||||
initializeMazdaMiataNaShape(this);
|
||||
break;
|
||||
|
||||
case TT_MAZDA_MIATA_NB1:
|
||||
|
@ -592,6 +592,10 @@ void TriggerShape::initializeTriggerShape(Logging *logger, operation_mode_e oper
|
|||
shapeDefinitionError = true;
|
||||
warning(CUSTOM_ERR_NO_SHAPE, "initializeTriggerShape() not implemented: %d", triggerConfig->type);
|
||||
}
|
||||
/**
|
||||
* Feb 2019 suggestion: it would be an improvement to remove 'expectedEventCount' logic from 'addEvent'
|
||||
* and move it here, after all events were added.
|
||||
*/
|
||||
calculateExpectedEventCounts(useOnlyRisingEdgeForTrigger);
|
||||
version++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue