auto-sync

This commit is contained in:
rusEfi 2016-06-16 23:02:08 -04:00
parent 592e6a18e1
commit 01a888b458
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ percent_t getTpsValue(int adc DECLARE_ENGINE_PARAMETER_S) {
warning(OBD_PCM_Processor_Fault, "Invalid TPS configuration: same value %d", engineConfiguration->tpsMin);
return NAN;
}
float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMax, 0, TPS_TS_CONVERSION * engineConfiguration->tpsMin, 100, adc);
float result = interpolate(TPS_TS_CONVERSION * engineConfiguration->tpsMax, 100, TPS_TS_CONVERSION * engineConfiguration->tpsMin, 0, adc);
// this would put the value into the 0-100 range
return maxF(0, minF(100, result));
}

View File

@ -22,7 +22,7 @@
void initializeMazdaMiataNaShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
s->setTriggerSynchronizationGap2(1.4930 * 0.7f, 1.4930 * 1.25f);
s->setTriggerSynchronizationGap2(1.4930 * 0.6f, 1.4930 * 1.3f);
s->useRiseEdge = false;
s->tdcPosition = 294;