implement mazda L cam
This commit is contained in:
parent
cedc0d0310
commit
fabec702e2
|
@ -90,6 +90,8 @@ trigger_type_e getVvtTriggerType(vvt_mode_e vvtMode) {
|
|||
return trigger_type_e::TT_VVT_FORD_COYOTE;
|
||||
case VVT_MAZDA_SKYACTIV:
|
||||
return trigger_type_e::TT_VVT_MAZDA_SKYACTIV;
|
||||
case VVT_MAZDA_L:
|
||||
return trigger_type_e::TT_VVT_MAZDA_L;
|
||||
case VVT_NISSAN_VQ:
|
||||
return trigger_type_e::TT_VVT_NISSAN_VQ35;
|
||||
case VVT_TOYOTA_4_1:
|
||||
|
|
|
@ -416,13 +416,15 @@ enum class trigger_type_e : uint32_t {
|
|||
|
||||
TT_DAIHATSU_4_CYL = 81,
|
||||
|
||||
TT_VVT_MAZDA_L = 82,
|
||||
|
||||
// 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 = 82, // this is used if we want to iterate over all trigger types
|
||||
TT_UNUSED = 83, // this is used if we want to iterate over all trigger types
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -117,6 +117,8 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
|
||||
VVT_HONDA_CBR_600 = 21,
|
||||
|
||||
VVT_MAZDA_L = 22,
|
||||
|
||||
} vvt_mode_e;
|
||||
|
||||
/**
|
||||
|
|
|
@ -200,3 +200,39 @@ void initializeMazdaSkyactivCam(TriggerWaveform *s) {
|
|||
s->setSecondTriggerSynchronizationGap(0.78);
|
||||
s->setThirdTriggerSynchronizationGap(1.12); // 3rd gap is not required but let's have it for some resiliency
|
||||
}
|
||||
|
||||
void initializeMazdaLCam(TriggerWaveform* s) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR, SyncEdge::RiseOnly);
|
||||
|
||||
// 6 teeth:
|
||||
// 0, 60, 90, 150, 180, 270
|
||||
// Tooth at 0 is just before #1 TDC
|
||||
|
||||
// 60
|
||||
s->addEvent360(50, TriggerValue::RISE);
|
||||
s->addEvent360(60, TriggerValue::FALL);
|
||||
|
||||
// 90
|
||||
s->addEvent360(80, TriggerValue::RISE);
|
||||
s->addEvent360(90, TriggerValue::FALL);
|
||||
|
||||
// 150
|
||||
s->addEvent360(140, TriggerValue::RISE);
|
||||
s->addEvent360(150, TriggerValue::FALL);
|
||||
|
||||
// 180
|
||||
s->addEvent360(170, TriggerValue::RISE);
|
||||
s->addEvent360(180, TriggerValue::FALL);
|
||||
|
||||
// 270
|
||||
s->addEvent360(260, TriggerValue::RISE);
|
||||
s->addEvent360(270, TriggerValue::FALL);
|
||||
|
||||
// 0 (aka 360)
|
||||
s->addEvent360(350, TriggerValue::RISE);
|
||||
s->addEvent360(360, TriggerValue::FALL);
|
||||
|
||||
s->setTriggerSynchronizationGap(0.5);
|
||||
s->setSecondTriggerSynchronizationGap(2);
|
||||
s->setThirdTriggerSynchronizationGap(0.5);
|
||||
}
|
||||
|
|
|
@ -25,3 +25,5 @@ void configureMazdaProtegeLx(TriggerWaveform *s);
|
|||
void initializeMazdaMiataVVtCamShape(TriggerWaveform *s);
|
||||
|
||||
void initializeMazdaSkyactivCam(TriggerWaveform *s);
|
||||
|
||||
void initializeMazdaLCam(TriggerWaveform* s);
|
||||
|
|
|
@ -652,6 +652,10 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio
|
|||
initializeMazdaSkyactivCam(this);
|
||||
break;
|
||||
|
||||
case trigger_type_e::TT_VVT_MAZDA_L:
|
||||
initializeMazdaLCam(this);
|
||||
break;
|
||||
|
||||
case trigger_type_e::TT_BENELLI_TRE:
|
||||
configureBenelli(this);
|
||||
break;
|
||||
|
|
|
@ -195,6 +195,7 @@ static angle_t adjustCrankPhase(int camIndex) {
|
|||
case VVT_BARRA_3_PLUS_1:
|
||||
case VVT_NISSAN_MR:
|
||||
case VVT_MAZDA_SKYACTIV:
|
||||
case VVT_MAZDA_L:
|
||||
case VVT_MITSUBISHI_4G69:
|
||||
case VVT_MITSUBISHI_3A92:
|
||||
case VVT_MITSUBISHI_6G72:
|
||||
|
|
|
@ -314,7 +314,7 @@ end_struct
|
|||
#define debug_mode_e_enum "INVALID", "TPS acceleration enrichment", "INVALID", "Stepper Idle Control", "Engine Load accl enrich", "Trigger Counters", "Soft Spark Cut", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "SD card", "sr5", "Knock", "INVALID", "Electronic Throttle", "Executor", "Bench Test / TS commands", "INVALID", "Analog inputs #1", "INSTANT_RPM", "INVALID", "Status", "INVALID", "INVALID", "MAP", "Metrics", "INVALID", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "INVALID", "Boost Control", "INVALID", "INVALID", "ETB Autotune", "Composite Log", "INVALID", "INVALID", "INVALID", "Dyno_View", "Logic_Analyzer", "INVALID", "TCU", "Lua"
|
||||
custom debug_mode_e 1 bits, U08, @OFFSET@, [0:5], @@debug_mode_e_enum@@
|
||||
|
||||
#define vvt_mode_e_enum "Inactive", "Single Tooth", "Toyota 3 Tooth", "Miata NB2", "Mitsu 4G69", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K Intake", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "Honda K Exhaust", "Mitsubishi 4G92/93/94", "Mitsubishi 4G63", "Ford Coyote", "Mitsu 6G72", "Honda 600", "vvt22", "vvt23"
|
||||
#define vvt_mode_e_enum "Inactive", "Single Tooth", "Toyota 3 Tooth", "Miata NB2", "Mitsu 4G69", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K Intake", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "Honda K Exhaust", "Mitsubishi 4G92/93/94", "Mitsubishi 4G63", "Ford Coyote", "Mitsu 6G72", "Honda 600", "Mazda L", "vvt23"
|
||||
custom vvt_mode_e 1 bits, U08, @OFFSET@, [0:5], @@vvt_mode_e_enum@@
|
||||
|
||||
! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU
|
||||
|
|
Loading…
Reference in New Issue