cam/vvt decoder

This commit is contained in:
rusefi 2020-02-05 01:49:33 -05:00
parent 4e8f9f0d30
commit 0d1f45422e
7 changed files with 39 additions and 1 deletions

View File

@ -1007,6 +1007,8 @@ case TT_MAZDA_MIATA_VVT_TEST:
return "TT_MAZDA_MIATA_VVT_TEST";
case TT_MAZDA_SOHC_4:
return "TT_MAZDA_SOHC_4";
case TT_MIATA_NB2_VVT_CAM:
return "TT_MIATA_NB2_VVT_CAM";
case TT_MAZDA_Z5:
return "TT_MAZDA_Z5";
case TT_MIATA_VVT:

View File

@ -1151,6 +1151,8 @@ case TT_MAZDA_MIATA_VVT_TEST:
return "TT_MAZDA_MIATA_VVT_TEST";
case TT_MAZDA_SOHC_4:
return "TT_MAZDA_SOHC_4";
case TT_MIATA_NB2_VVT_CAM:
return "TT_MIATA_NB2_VVT_CAM";
case TT_MAZDA_Z5:
return "TT_MAZDA_Z5";
case TT_MIATA_VVT:

View File

@ -314,13 +314,18 @@ typedef enum {
TT_MAZDA_Z5 = 42,
/**
* This shape for camshaft ONLY
*/
TT_MIATA_NB2_VVT_CAM = 43,
// 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
// todo: one day a hero would integrate some of these things into Makefile in order to reduce manual magic
//
// Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests
//
TT_UNUSED = 43, // this is used if we want to iterate over all trigger types
TT_UNUSED = 44, // this is used if we want to iterate over all trigger types
Force_4_bytes_size_trigger_type = ENUM_32_BITS,
} trigger_type_e;

View File

@ -205,3 +205,19 @@ void configureMazdaProtegeLx(TriggerWaveform *s) {
s->tdcPosition = 137.119154;
s->isSynchronizationNeeded = false;
}
void initializeMazdaMiataVVtCamShape(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
s->setTriggerSynchronizationGap2(8.50 * 0.75, 14.0);
s->addEvent720(325, T_PRIMARY, TV_FALL);
s->addEvent720(360, T_PRIMARY, TV_RISE);
s->addEvent720(641, T_PRIMARY, TV_FALL);
s->addEvent720(677, T_PRIMARY, TV_RISE);
s->addEvent720(700, T_PRIMARY, TV_FALL);
s->addEvent720(720, T_PRIMARY, TV_RISE);
}

View File

@ -19,3 +19,4 @@ void configureMazdaProtegeSOHC(TriggerWaveform *s);
void configureMazdaProtegeLx(TriggerWaveform *s);
void initialize_Mazda_Engine_z5_Shape(TriggerWaveform *s);
void initializeMazdaMiataVVtCamShape(TriggerWaveform *s);

View File

@ -459,6 +459,10 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_
initialize_Mazda_Engine_z5_Shape(this);
break;
case TT_MIATA_NB2_VVT_CAM:
initializeMazdaMiataVVtCamShape(this);
break;
case TT_MIATA_VVT:
initializeMazdaMiataNb2Crank(this);
break;

View File

@ -2457,3 +2457,11 @@ event 4 0 360.00
event 5 1 480.00
event 6 0 558.00
event 7 1 660.00
TRIGGERTYPE 43 6 TT_MIATA_NB2_VVT_CAM 0.00
# duty 0.13 0.00
event 0 1 0.00
event 1 0 281.00
event 2 1 317.00
event 3 0 340.00
event 4 1 360.00
event 5 0 685.00