auto-sync
This commit is contained in:
parent
67caa247b9
commit
e716044fe7
|
@ -14,6 +14,18 @@ EXTERN_ENGINE
|
|||
;
|
||||
|
||||
void setDodgeStratus(DECLARE_ENGINE_PARAMETER_F) {
|
||||
engineConfiguration->trigger.type = TT_DODGE_STRATUS;
|
||||
engineConfiguration->specs.cylindersCount = 6;
|
||||
engineConfiguration->specs.firingOrder = FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6;
|
||||
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
|
||||
boardConfiguration->ignitionPins[0] = GPIOC_9;
|
||||
boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||
boardConfiguration->ignitionPins[2] = GPIOE_8;
|
||||
boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||
boardConfiguration->ignitionPins[4] = GPIO_UNASSIGNED;
|
||||
boardConfiguration->ignitionPins[5] = GPIO_UNASSIGNED;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -119,6 +119,8 @@ case TT_HONDA_ACCORD_CD:
|
|||
return "TT_HONDA_ACCORD_CD";
|
||||
case TT_HONDA_ACCORD_1_24:
|
||||
return "TT_HONDA_ACCORD_1_24";
|
||||
case TT_DODGE_STRATUS:
|
||||
return "TT_DODGE_STRATUS";
|
||||
case TT_HONDA_ACCORD_CD_DIP:
|
||||
return "TT_HONDA_ACCORD_CD_DIP";
|
||||
case TT_HONDA_ACCORD_CD_TWO_WIRES:
|
||||
|
@ -305,6 +307,8 @@ case FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4:
|
|||
return "FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4";
|
||||
case FO_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6:
|
||||
return "FO_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6";
|
||||
case FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6:
|
||||
return "FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6";
|
||||
case FO_ONE_CYLINDER:
|
||||
return "FO_ONE_CYLINDER";
|
||||
case Force_4b_firing_order:
|
||||
|
|
|
@ -143,7 +143,9 @@ typedef enum {
|
|||
|
||||
TT_HONDA_ACCORD_1_24 = 21,
|
||||
|
||||
TT_UNUSED = 22, // this is used if we want to iterate over all trigger types
|
||||
TT_DODGE_STRATUS = 22,
|
||||
|
||||
TT_UNUSED = 23, // this is used if we want to iterate over all trigger types
|
||||
|
||||
Force_4b_trigger_type = ENUM_32_BITS,
|
||||
} trigger_type_e;
|
||||
|
@ -286,6 +288,7 @@ typedef enum {
|
|||
// 6 cylinder
|
||||
FO_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4 = 4,
|
||||
FO_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6 = 7,
|
||||
FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6 = 9,
|
||||
|
||||
|
||||
Force_4b_firing_order = ENUM_32_BITS,
|
||||
|
|
|
@ -291,6 +291,7 @@ static int order_1_2_4_5_3[] = {1, 2, 4, 5, 3};
|
|||
|
||||
static int order_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4[] = { 1, 5, 3, 6, 2, 4 };
|
||||
static int order_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6[] = { 1, 4, 2, 5, 3, 6 };
|
||||
static int order_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6[] = { 1, 2, 3, 4, 5, 6 };
|
||||
|
||||
static int order_1_8_4_3_6_5_7_2[] = { 1, 8, 4, 3, 6, 5, 7, 2 };
|
||||
|
||||
|
@ -324,6 +325,9 @@ int getCylinderId(firing_order_e firingOrder, int index) {
|
|||
return order_1_THEN_5_THEN_3_THEN_6_THEN_2_THEN_4[index];
|
||||
case FO_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6:
|
||||
return order_1_THEN_4_THEN_2_THEN_5_THEN_3_THEN_6[index];
|
||||
case FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6:
|
||||
return order_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6[index];
|
||||
|
||||
// 8 cylinder
|
||||
case FO_1_8_4_3_6_5_7_2:
|
||||
return order_1_8_4_3_6_5_7_2[index];
|
||||
|
|
|
@ -32,7 +32,7 @@ void configureNeon2003TriggerShape(TriggerShape *s) {
|
|||
s->gapBothDirections = true;
|
||||
|
||||
// are these non-default values really needed here now that the gap is finally precise?
|
||||
s->setTriggerSynchronizationGap2(0.5 * CHRYSLER_NGC_GAP, 1.5 * CHRYSLER_NGC_GAP);
|
||||
s->setTriggerSynchronizationGap2(0.5 * CHRYSLER_NGC4_GAP, 1.5 * CHRYSLER_NGC4_GAP);
|
||||
|
||||
s->useOnlyPrimaryForSync = true;
|
||||
|
||||
|
@ -208,6 +208,67 @@ void configureNeon2003TriggerShape(TriggerShape *s) {
|
|||
}
|
||||
}
|
||||
|
||||
void configureDodgeStratusTriggerShape(TriggerShape *s) {
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, false);
|
||||
s->isSynchronizationNeeded = true;
|
||||
|
||||
s->tdcPosition = 510;
|
||||
|
||||
float w = 7;
|
||||
float g = 20;
|
||||
s->setTriggerSynchronizationGap2(CHRYSLER_NGC6_GAP - 0.5, CHRYSLER_NGC6_GAP + 0.5);
|
||||
|
||||
float base = 0;
|
||||
float angle = base + 120.0 - w;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
|
||||
base += 120;
|
||||
// 3 teeth
|
||||
angle = base + 120.0 - w;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
angle += g;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
angle += g;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
|
||||
base += 120;
|
||||
// 2 teeth
|
||||
angle = base + 120.0 - w;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
angle += g;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
|
||||
base += 120;
|
||||
// just one
|
||||
angle = base + 120.0 - w;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
|
||||
base += 120;
|
||||
angle = base + 120.0 - w;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
angle += g;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
angle += g;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
|
||||
|
||||
base += 120;
|
||||
// just one again
|
||||
angle = base + 120.0 - w;
|
||||
s->addEvent(angle, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(angle + w, T_PRIMARY, TV_LOW);
|
||||
}
|
||||
|
||||
void configureNeon1995TriggerShape(TriggerShape *s) {
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR, true);
|
||||
|
||||
|
|
|
@ -10,10 +10,13 @@
|
|||
|
||||
#include "trigger_structure.h"
|
||||
|
||||
#define CHRYSLER_NGC_GAP 3.4390
|
||||
#define CHRYSLER_NGC4_GAP 3.4390
|
||||
#define CHRYSLER_NGC6_GAP 5
|
||||
|
||||
void configureNeon1995TriggerShape(TriggerShape *s);
|
||||
void configureNeon2003TriggerShape(TriggerShape *s);
|
||||
void initDodgeRam(TriggerShape *s);
|
||||
|
||||
void configureDodgeStratusTriggerShape(TriggerShape *s);
|
||||
|
||||
#endif /* TRIGGER_CHRYSLER_H_ */
|
||||
|
|
|
@ -45,7 +45,7 @@ EXTERN_ENGINE
|
|||
|
||||
static cyclic_buffer<int> errorDetection;
|
||||
|
||||
#if ! EFI_PROD_CODE
|
||||
#if ! EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
bool printTriggerDebug = false;
|
||||
float actualSynchGap;
|
||||
#endif /* ! EFI_PROD_CODE */
|
||||
|
@ -355,6 +355,10 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
|||
configureNeon1995TriggerShape(triggerShape);
|
||||
break;
|
||||
|
||||
case TT_DODGE_STRATUS:
|
||||
configureDodgeStratusTriggerShape(triggerShape);
|
||||
break;
|
||||
|
||||
case TT_DODGE_NEON_2003:
|
||||
configureNeon2003TriggerShape(triggerShape);
|
||||
break;
|
||||
|
|
|
@ -1946,6 +1946,12 @@
|
|||
<file>
|
||||
<name>$PROJ_DIR$\..\config\engines\dodge_ram.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\config\engines\dodge_stratus.cpp</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\config\engines\dodge_stratus.h</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\config\engines\engines.h</name>
|
||||
</file>
|
||||
|
|
|
@ -542,9 +542,12 @@ void testTriggerDecoder(void) {
|
|||
testTriggerDecoder3("miata 1994", MIATA_1994_DEVIATOR, 11, 0.2985, 0.3890, MIATA_NA_GAP);
|
||||
testTriggerDecoder3("citroen", CITROEN_TU3JP, 0, 0.4833, 0.0, 2.9994);
|
||||
|
||||
testTriggerDecoder3("neon NGC", DODGE_NEON_2003, 24, 0.4744, 0.4600, CHRYSLER_NGC_GAP);
|
||||
testTriggerDecoder3("neon NGC4", DODGE_NEON_2003, 24, 0.4744, 0.4600, CHRYSLER_NGC4_GAP);
|
||||
testTriggerDecoder2("sachs", SACHS, 0, 0.4800, 0.000);
|
||||
|
||||
printTriggerDebug = true;
|
||||
testTriggerDecoder3("stratus NGC6", DODGE_STRATUS, 12, 0.8930, 0.0, CHRYSLER_NGC6_GAP);
|
||||
|
||||
testTriggerDecoder2("vw ABA", VW_ABA, 114, 0.5000, 0.0);
|
||||
|
||||
testMazda323();
|
||||
|
|
Loading…
Reference in New Issue