auto-sync
This commit is contained in:
parent
bda6b48380
commit
4a23e29417
|
@ -8,7 +8,7 @@
|
|||
#include "trigger_chrysler.h"
|
||||
#include "trigger_decoder.h"
|
||||
|
||||
void initDodgeRam(TriggerShape *s) {
|
||||
void initDodgeRam(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
s->useRiseEdge = true;
|
||||
|
@ -25,7 +25,7 @@ void initDodgeRam(TriggerShape *s) {
|
|||
s->addEvent(720, T_PRIMARY, TV_LOW);
|
||||
}
|
||||
|
||||
void configureNeon2003TriggerShape(TriggerShape *s) {
|
||||
void configureNeon2003TriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
bool_t useOnlyPrimary = false;
|
||||
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, !useOnlyPrimary);
|
||||
|
@ -236,7 +236,7 @@ void configureNeon2003TriggerShape(TriggerShape *s) {
|
|||
}
|
||||
}
|
||||
|
||||
void configureDodgeStratusTriggerShape(TriggerShape *s) {
|
||||
void configureDodgeStratusTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, false);
|
||||
s->isSynchronizationNeeded = true;
|
||||
|
||||
|
@ -302,7 +302,7 @@ void configureDodgeStratusTriggerShape(TriggerShape *s) {
|
|||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
}
|
||||
|
||||
void configureNeon1995TriggerShape(TriggerShape *s) {
|
||||
void configureNeon1995TriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
|
||||
s->setTriggerSynchronizationGap(0.72);
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
#define CHRYSLER_NGC4_GAP 1
|
||||
#define CHRYSLER_NGC6_GAP 1.5
|
||||
|
||||
void configureNeon1995TriggerShape(TriggerShape *s);
|
||||
void configureNeon2003TriggerShape(TriggerShape *s);
|
||||
void initDodgeRam(TriggerShape *s);
|
||||
void configureNeon1995TriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
||||
void configureNeon2003TriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
||||
void initDodgeRam(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
||||
|
||||
void configureDodgeStratusTriggerShape(TriggerShape *s);
|
||||
void configureDodgeStratusTriggerShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
||||
|
||||
#endif /* TRIGGER_CHRYSLER_H_ */
|
||||
|
|
|
@ -414,23 +414,23 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
|||
break;
|
||||
|
||||
case TT_MAZDA_MIATA_NA:
|
||||
initializeMazdaMiataNaShape(triggerShape);
|
||||
initializeMazdaMiataNaShape(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_MAZDA_MIATA_NB:
|
||||
initializeMazdaMiataNbShape(triggerShape);
|
||||
initializeMazdaMiataNbShape(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_DODGE_NEON_1995:
|
||||
configureNeon1995TriggerShape(triggerShape);
|
||||
configureNeon1995TriggerShape(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_DODGE_STRATUS:
|
||||
configureDodgeStratusTriggerShape(triggerShape);
|
||||
configureDodgeStratusTriggerShape(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_DODGE_NEON_2003:
|
||||
configureNeon2003TriggerShape(triggerShape);
|
||||
configureNeon2003TriggerShape(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_FORD_ASPIRE:
|
||||
|
@ -443,7 +443,7 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
|||
break;
|
||||
|
||||
case TT_MAZDA_DOHC_1_4:
|
||||
configureMazdaProtegeLx(triggerShape);
|
||||
configureMazdaProtegeLx(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_ONE_PLUS_ONE:
|
||||
|
@ -459,7 +459,7 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
|||
break;
|
||||
|
||||
case TT_MAZDA_SOHC_4:
|
||||
configureMazdaProtegeSOHC(triggerShape);
|
||||
configureMazdaProtegeSOHC(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_MINI_COOPER_R50:
|
||||
|
@ -499,7 +499,7 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
|||
break;
|
||||
|
||||
case TT_DODGE_RAM:
|
||||
initDodgeRam(triggerShape);
|
||||
initDodgeRam(triggerShape PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_36_2_2_2:
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "trigger_mazda.h"
|
||||
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s) {
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
s->setTriggerSynchronizationGap(MIATA_NA_GAP);
|
||||
s->useRiseEdge = false;
|
||||
|
@ -47,7 +47,7 @@ void initializeMazdaMiataNaShape(TriggerShape *s) {
|
|||
s->addEvent(720.0f, T_PRIMARY, TV_LOW);
|
||||
}
|
||||
|
||||
void initializeMazdaMiataNbShape(TriggerShape *s) {
|
||||
void initializeMazdaMiataNbShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
s->setTriggerSynchronizationGap(0.11f);
|
||||
s->useRiseEdge = false;
|
||||
|
||||
|
@ -86,7 +86,7 @@ void initializeMazdaMiataNbShape(TriggerShape *s) {
|
|||
s->addEvent(720.0f, T_PRIMARY, TV_LOW);
|
||||
}
|
||||
|
||||
void configureMazdaProtegeSOHC(TriggerShape *s) {
|
||||
void configureMazdaProtegeSOHC(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
|
||||
// todo: move to into configuration definition s->needSecondTriggerInput = FALSE;
|
||||
|
||||
|
@ -114,28 +114,28 @@ void configureMazdaProtegeSOHC(TriggerShape *s) {
|
|||
s->isSynchronizationNeeded = false;
|
||||
}
|
||||
|
||||
void configureMazdaProtegeLx(TriggerShape *s) {
|
||||
void configureMazdaProtegeLx(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
// todo: move to into configuration definition s->needSecondTriggerInput = FALSE;
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
|
||||
/**
|
||||
* based on https://svn.code.sf.net/p/rusefi/code/trunk/misc/logs/1993_escort_gt/MAIN_rfi_report_2015-02-01%2017_39.csv
|
||||
*/
|
||||
s->addEvent(95.329254, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent2(95.329254, T_PRIMARY, TV_HIGH PASS_ENGINE_PARAMETER);
|
||||
|
||||
s->addEvent(95.329254 + 14.876692, T_SECONDARY, TV_HIGH);
|
||||
s->addEvent(95.329254 + 82.693557, T_SECONDARY, TV_LOW);
|
||||
s->addEvent2(95.329254 + 14.876692, T_SECONDARY, TV_HIGH PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(95.329254 + 82.693557, T_SECONDARY, TV_LOW PASS_ENGINE_PARAMETER);
|
||||
|
||||
s->addEvent(95.329254 + 137.119154, T_PRIMARY, TV_LOW);
|
||||
s->addEvent2(95.329254 + 137.119154, T_PRIMARY, TV_LOW PASS_ENGINE_PARAMETER);
|
||||
|
||||
s->addEvent(95.329254 + 192.378308, T_SECONDARY, TV_HIGH);
|
||||
s->addEvent(95.329254 + 261.556418, T_SECONDARY, TV_LOW);
|
||||
s->addEvent2(95.329254 + 192.378308, T_SECONDARY, TV_HIGH PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(95.329254 + 261.556418, T_SECONDARY, TV_LOW PASS_ENGINE_PARAMETER);
|
||||
|
||||
s->addEvent(95.329254 + 373.060597, T_SECONDARY, TV_HIGH);
|
||||
s->addEvent(95.329254 + 443.503184, T_SECONDARY, TV_LOW);
|
||||
s->addEvent2(95.329254 + 373.060597, T_SECONDARY, TV_HIGH PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(95.329254 + 443.503184, T_SECONDARY, TV_LOW PASS_ENGINE_PARAMETER);
|
||||
|
||||
s->addEvent(95.329254 + 555.349776, T_SECONDARY, TV_HIGH);
|
||||
s->addEvent(720, T_SECONDARY, TV_LOW);
|
||||
s->addEvent2(95.329254 + 555.349776, T_SECONDARY, TV_HIGH PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(720, T_SECONDARY, TV_LOW PASS_ENGINE_PARAMETER);
|
||||
|
||||
s->tdcPosition = 137.119154;
|
||||
s->isSynchronizationNeeded = false;
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
#define MIATA_NA_GAP 1.4930f
|
||||
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s);
|
||||
void initializeMazdaMiataNbShape(TriggerShape *s);
|
||||
void configureMazdaProtegeSOHC(TriggerShape *s);
|
||||
void configureMazdaProtegeLx(TriggerShape *s);
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
||||
void initializeMazdaMiataNbShape(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
||||
void configureMazdaProtegeSOHC(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
||||
void configureMazdaProtegeLx(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
|
||||
|
||||
#endif /* TRIGGER_MAZDA_H_ */
|
||||
|
|
|
@ -251,6 +251,10 @@ operation_mode_e TriggerShape::getOperationMode() {
|
|||
extern bool printTriggerDebug;
|
||||
#endif
|
||||
|
||||
void TriggerShape::addEvent2(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const stateParam DECLARE_ENGINE_PARAMETER_S) {
|
||||
addEvent(angle, waveIndex, stateParam);
|
||||
}
|
||||
|
||||
void TriggerShape::addEvent(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const stateParam) {
|
||||
efiAssertVoid(operationMode != OM_NONE, "operationMode not set");
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ public:
|
|||
*/
|
||||
int size;
|
||||
|
||||
void addEvent2(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const state DECLARE_ENGINE_PARAMETER_S);
|
||||
void addEvent(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const state);
|
||||
void addEvent(angle_t angle, trigger_wheel_e const waveIndex, trigger_value_e const stateParam, float filterLeft, float filterRight);
|
||||
operation_mode_e getOperationMode();
|
||||
|
|
Loading…
Reference in New Issue