Mitsubishi 4G93 Trigger issues #4918
This commit is contained in:
parent
81ea2cca8f
commit
0f1d46238f
|
@ -507,8 +507,8 @@ typedef enum {
|
|||
|
||||
TT_SUBARU_EZ30 = 12,
|
||||
TT_VVT_MAZDA_SKYACTIV = 13,
|
||||
UNUSED_29 = 29,
|
||||
UNUSED_34 = 34,
|
||||
TT_MITSU_ONLY_TOP_BOTH_FRONTS = 29,
|
||||
TT_MITSU_BOTH_BOTH = 34,
|
||||
|
||||
// do not forget to edit "#define trigger_type_e_enum" line in integration/rusefi_config.txt file to propogate new value to rusefi.ini TS project
|
||||
// do not forget to invoke "gen_config.bat" once you make changes to integration/rusefi_config.txt
|
||||
|
|
|
@ -31,6 +31,38 @@ void configureFordAspireTriggerWaveform(TriggerWaveform * s) {
|
|||
s->addEvent720(720, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
|
||||
}
|
||||
|
||||
static void addMitsu93(TriggerWaveform *s, bool addSecondary) {
|
||||
float narrowW = 66;
|
||||
|
||||
float offset = addSecondary ? 0 : 120;
|
||||
|
||||
s->addEvent720(offset + 60, TriggerValue::RISE, TriggerWheel::T_PRIMARY);
|
||||
if (addSecondary)
|
||||
s->addEvent720(offset + 180 - narrowW, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
|
||||
s->addEvent720(offset + 146, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
|
||||
if (addSecondary)
|
||||
s->addEvent720(offset + 180, TriggerValue::FALL, TriggerWheel::T_SECONDARY);
|
||||
|
||||
if (addSecondary)
|
||||
s->addEvent720(offset + 360 - narrowW, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
|
||||
if (addSecondary)
|
||||
s->addEvent720(offset + 360, TriggerValue::FALL, TriggerWheel::T_SECONDARY);
|
||||
|
||||
s->addEvent720(offset + 421, TriggerValue::RISE, TriggerWheel::T_PRIMARY);
|
||||
if (addSecondary)
|
||||
s->addEvent720(offset + 540 - narrowW, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
|
||||
if (addSecondary)
|
||||
s->addEvent720(offset + 540, TriggerValue::FALL, TriggerWheel::T_SECONDARY);
|
||||
|
||||
s->addEvent720(offset + 600, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
|
||||
if (addSecondary)
|
||||
s->addEvent720(offset + 720 - narrowW, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
|
||||
if (addSecondary)
|
||||
s->addEvent720(offset + 720.0, TriggerValue::FALL, TriggerWheel::T_SECONDARY);
|
||||
|
||||
s->useOnlyPrimaryForSync = addSecondary;
|
||||
}
|
||||
|
||||
/**
|
||||
* TT_MITSUBISHI = 11
|
||||
*/
|
||||
|
@ -39,19 +71,23 @@ void initializeMitsubishi4g18(TriggerWaveform *s) {
|
|||
|
||||
s->setTriggerSynchronizationGap(1.6666);
|
||||
|
||||
s->addEvent720(106.77999999999997, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
|
||||
s->addEvent720(120.09999999999998, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
|
||||
s->addEvent720(188.0775, TriggerValue::FALL, TriggerWheel::T_SECONDARY);
|
||||
s->addEvent720(286.33, TriggerValue::RISE, TriggerWheel::T_PRIMARY);
|
||||
s->addEvent720(298.875, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
|
||||
s->addEvent720(354.91999999999996, TriggerValue::FALL, TriggerWheel::T_PRIMARY);
|
||||
s->addEvent720(366.6825, TriggerValue::FALL, TriggerWheel::T_SECONDARY);
|
||||
s->addEvent720(476.45, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
|
||||
s->addEvent720(543.9749999999999, TriggerValue::FALL, TriggerWheel::T_SECONDARY);
|
||||
s->addEvent720(639.52, TriggerValue::RISE, TriggerWheel::T_PRIMARY);
|
||||
s->addEvent720(653.15, TriggerValue::RISE, TriggerWheel::T_SECONDARY);
|
||||
s->addEvent720(720.0, TriggerValue::FALL, TriggerWheel::T_SECONDARY);
|
||||
s->useOnlyPrimaryForSync = true;
|
||||
addMitsu93(s, true);
|
||||
}
|
||||
|
||||
void initializeMitsubishi4g93_both_both(TriggerWaveform *s) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR, SyncEdge::Both);
|
||||
|
||||
s->setTriggerSynchronizationGap(3.2);
|
||||
|
||||
addMitsu93(s, true);
|
||||
}
|
||||
|
||||
void initializeMitsubishi4g93_only_first_wheel_both_fronts(TriggerWaveform *s) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR, SyncEdge::Both);
|
||||
|
||||
s->setTriggerSynchronizationGap(3.2);
|
||||
|
||||
addMitsu93(s, false);
|
||||
}
|
||||
|
||||
void initialize36_2_1_1(TriggerWaveform *s) {
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
class TriggerWaveform;
|
||||
|
||||
void initializeMitsubishi4g18(TriggerWaveform *s);
|
||||
void initializeMitsubishi4g93_both_both(TriggerWaveform *s);
|
||||
void initializeMitsubishi4g93_only_first_wheel_both_fronts(TriggerWaveform *s);
|
||||
void configureFordAspireTriggerWaveform(TriggerWaveform * s);
|
||||
|
||||
void initialize36_2_1_1(TriggerWaveform *s);
|
||||
|
|
|
@ -631,8 +631,12 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio
|
|||
configureBenelli(this);
|
||||
break;
|
||||
|
||||
case UNUSED_29:
|
||||
case UNUSED_34:
|
||||
case TT_MITSU_BOTH_BOTH:
|
||||
initializeMitsubishi4g93_both_both(this);
|
||||
break;
|
||||
case TT_MITSU_ONLY_TOP_BOTH_FRONTS:
|
||||
initializeMitsubishi4g93_only_first_wheel_both_fronts(this);
|
||||
break;
|
||||
case TT_1_16:
|
||||
configureOnePlus16(this);
|
||||
break;
|
||||
|
|
|
@ -585,7 +585,7 @@ adc_channel_e fuelLevelSensor;This is the processor pin that your fuel level sen
|
|||
|
||||
struct trigger_config_s @brief Trigger wheel(s) configuration
|
||||
|
||||
#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "INVALID", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Mercedes Two Segment", "Mitsubishi 4G93", "EZ30", "INVALID", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Benelli Tre", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM 24x 5 degree", "Honda CBR 600", "INVALID", "Honda CBR 600 custom", "3/1 skipped", "Dodge Neon 2003 crank", "Miata NB", "INVALID", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "12 tooth crank", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36/2", "Subaru SVX", "1+16", "Subaru 7 without 6", "INVALID", "TriTach", "GM 60/2/2/2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "Mitsubishi 3A92", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32/2", "36-2-1", "36-2-1-1", "INVALID", "INVALID", "GM 24x 3 degree", "trg75"
|
||||
#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "INVALID", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Mercedes Two Segment", "Mitsubishi 4G93", "EZ30", "INVALID", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Benelli Tre", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM 24x 5 degree", "Honda CBR 600", "4g93 only cam", "Honda CBR 600 custom", "3/1 skipped", "Dodge Neon 2003 crank", "Miata NB", "4g93 both fronts", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "12 tooth crank", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36/2", "Subaru SVX", "1+16", "Subaru 7 without 6", "INVALID", "TriTach", "GM 60/2/2/2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "Mitsubishi 3A92", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32/2", "36-2-1", "36-2-1-1", "INVALID", "INVALID", "GM 24x 3 degree", "trg75"
|
||||
|
||||
custom trigger_type_e 4 bits, U32, @OFFSET@, [0:6], @@trigger_type_e_enum@@
|
||||
trigger_type_e type;https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers\nset trigger_type X
|
||||
|
|
|
@ -167,7 +167,7 @@ static void testTriggerDecoder2(const char *msg, engine_type_e type, int synchPo
|
|||
|
||||
ASSERT_FALSE(t->shapeDefinitionError) << "isError";
|
||||
|
||||
assertEqualsM("synchPointIndex", synchPointIndex, t->getTriggerWaveformSynchPointIndex());
|
||||
ASSERT_EQ(synchPointIndex, t->getTriggerWaveformSynchPointIndex()) << "synchPointIndex";
|
||||
if (!cisnan(expectedGapRatio)) {
|
||||
assertEqualsM2("actual gap ratio", expectedGapRatio, initState.triggerSyncGapRatio, 0.001);
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ TEST(trigger, testTriggerDecoder) {
|
|||
|
||||
testTriggerDecoder2("testCitroen", CITROEN_TU3JP, 0, 0.4833, 0);
|
||||
|
||||
testTriggerDecoder2("testMitsu", MITSU_4G93, 0, 0.3553, 0.3752);
|
||||
testTriggerDecoder2("testMitsu", MITSU_4G93, 9, 0.3553, 0.3752);
|
||||
{
|
||||
EngineTestHelper eth(MITSU_4G93);
|
||||
|
||||
|
|
Loading…
Reference in New Issue