auto-sync
This commit is contained in:
parent
f4b1c49098
commit
78a3a6f272
|
@ -18,7 +18,7 @@ void configureNeon2003TriggerShape(TriggerShape *s) {
|
|||
s->gapBothDirections = true;
|
||||
|
||||
// are these non-default values really needed here now that the gap is finally precise?
|
||||
setTriggerSynchronizationGap2(s, 0.8 * CHRYSLER_NGC_GAP, 1.55 * CHRYSLER_NGC_GAP);
|
||||
s->setTriggerSynchronizationGap2(0.8 * CHRYSLER_NGC_GAP, 1.55 * CHRYSLER_NGC_GAP);
|
||||
|
||||
s->addEvent(base + 26, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(base + 62, T_PRIMARY, TV_LOW);
|
||||
|
@ -45,7 +45,7 @@ void configureNeon2003TriggerShape(TriggerShape *s) {
|
|||
void configureNeon1995TriggerShape(TriggerShape *s) {
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
|
||||
setTriggerSynchronizationGap(s, 0.72);
|
||||
s->setTriggerSynchronizationGap(0.72);
|
||||
|
||||
s->useRiseEdge = false;
|
||||
|
||||
|
|
|
@ -279,9 +279,6 @@ void initializeTriggerShape(Logging *logger, engine_configuration_s const *engin
|
|||
|
||||
triggerShape->clear();
|
||||
|
||||
setTriggerSynchronizationGap(triggerShape, 2);
|
||||
triggerShape->useRiseEdge = true;
|
||||
|
||||
switch (triggerConfig->type) {
|
||||
|
||||
case TT_TOOTHED_WHEEL:
|
||||
|
@ -335,7 +332,7 @@ void initializeTriggerShape(Logging *logger, engine_configuration_s const *engin
|
|||
|
||||
case TT_TOOTHED_WHEEL_60_2:
|
||||
setToothedWheelConfiguration(triggerShape, 60, 2, engineConfiguration);
|
||||
setTriggerSynchronizationGap(triggerShape, 3);
|
||||
triggerShape->setTriggerSynchronizationGap(3);
|
||||
break;
|
||||
|
||||
case TT_TOOTHED_WHEEL_36_1:
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s) {
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
setTriggerSynchronizationGap(s, MIATA_NA_GAP);
|
||||
s->setTriggerSynchronizationGap(MIATA_NA_GAP);
|
||||
s->useRiseEdge = false;
|
||||
|
||||
s->isSynchronizationNeeded = true;
|
||||
|
@ -48,7 +48,7 @@ void initializeMazdaMiataNaShape(TriggerShape *s) {
|
|||
}
|
||||
|
||||
void initializeMazdaMiataNbShape(TriggerShape *s) {
|
||||
setTriggerSynchronizationGap(s, 0.11f);
|
||||
s->setTriggerSynchronizationGap(0.11f);
|
||||
s->useRiseEdge = false;
|
||||
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
|
|
|
@ -32,7 +32,7 @@ void initializeMitsubishi4g18(TriggerShape *s) {
|
|||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
s->useRiseEdge = false;
|
||||
|
||||
setTriggerSynchronizationGap(s, 1.6666);
|
||||
s->setTriggerSynchronizationGap(1.6666);
|
||||
|
||||
int secondaryWidth = 70;
|
||||
|
||||
|
|
|
@ -77,6 +77,8 @@ void TriggerShape::setTriggerShapeSynchPointIndex(engine_configuration_s *engine
|
|||
|
||||
void TriggerShape::clear() {
|
||||
tdcPosition = 0;
|
||||
setTriggerSynchronizationGap(2);
|
||||
useRiseEdge = true;
|
||||
}
|
||||
|
||||
void TriggerShape::reset(operation_mode_e operationMode, bool needSecondTriggerInput) {
|
||||
|
@ -288,14 +290,14 @@ void setToothedWheelConfiguration(TriggerShape *s, int total, int skipped,
|
|||
#endif
|
||||
}
|
||||
|
||||
void setTriggerSynchronizationGap2(TriggerShape *s, float syncGapFrom, float syncRatioTo) {
|
||||
s->isSynchronizationNeeded = true;
|
||||
s->syncRatioFrom = syncGapFrom;
|
||||
s->syncRatioTo = syncRatioTo;
|
||||
void TriggerShape::setTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo) {
|
||||
isSynchronizationNeeded = true;
|
||||
this->syncRatioFrom = syncRatioFrom;
|
||||
this->syncRatioTo = syncRatioTo;
|
||||
}
|
||||
|
||||
void setTriggerSynchronizationGap(TriggerShape *s, float synchGap) {
|
||||
setTriggerSynchronizationGap2(s, synchGap * 0.75f, synchGap * 1.25f);
|
||||
void TriggerShape::setTriggerSynchronizationGap(float synchRatio) {
|
||||
setTriggerSynchronizationGap2(synchRatio * 0.75f, synchRatio * 1.25f);
|
||||
}
|
||||
|
||||
#define S24 (720.0f / 24 / 2)
|
||||
|
|
|
@ -73,6 +73,8 @@ public:
|
|||
// todo: these two methods here, something could be improved
|
||||
void clear();
|
||||
void reset(operation_mode_e operationMode, bool needSecondTriggerInput);
|
||||
void setTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo);
|
||||
void setTriggerSynchronizationGap(float synchRatio);
|
||||
int getSize() const;
|
||||
multi_wave_s wave;
|
||||
|
||||
|
|
|
@ -259,5 +259,5 @@ int getRusEfiVersion(void) {
|
|||
return 1; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE == 0)
|
||||
return 1; // this is here to make the compiler happy about the unused array
|
||||
return 20150204;
|
||||
return 20150205;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue