mirror of https://github.com/rusefi/rusefi-1.git
Merge remote-tracking branch 'origin/master' into fresh_chibios_2nd
This commit is contained in:
commit
778530ce74
|
@ -16,4 +16,8 @@ void setNissanPrimeraEngineConfiguration(engine_configuration_s *engineConfigura
|
|||
engineConfiguration->trigger.type = TT_NISSAN_SR20VE;
|
||||
}
|
||||
|
||||
void setNissanPrimeraEngineConfiguration_360(engine_configuration_s *engineConfiguration) {
|
||||
engineConfiguration->trigger.type = TT_NISSAN_SR20VE_360;
|
||||
}
|
||||
|
||||
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include "engine_configuration.h"
|
||||
|
||||
void setNissanPrimeraEngineConfiguration(engine_configuration_s *engineConfiguration);
|
||||
void setNissanPrimeraEngineConfiguration_360(engine_configuration_s *engineConfiguration);
|
||||
|
||||
#endif /* EFI_SUPPORT_NISSAN_PRIMERA */
|
||||
|
||||
#endif /* NISSAN_PRIMERA_H_ */
|
||||
|
|
|
@ -215,8 +215,8 @@ case TT_2JZ_3_34:
|
|||
return "TT_2JZ_3_34";
|
||||
case TT_ROVER_K:
|
||||
return "TT_ROVER_K";
|
||||
case TT_TEMP_WIP:
|
||||
return "TT_TEMP_WIP";
|
||||
case TT_NISSAN_SR20VE_360:
|
||||
return "TT_NISSAN_SR20VE_360";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ typedef enum {
|
|||
|
||||
TT_JEEP_18_2_2_2 = 37,
|
||||
|
||||
TT_TEMP_WIP = 38,
|
||||
TT_NISSAN_SR20VE_360 = 38,
|
||||
|
||||
TT_UNUSED = 39, // this is used if we want to iterate over all trigger types
|
||||
|
||||
|
|
|
@ -6,40 +6,98 @@
|
|||
*/
|
||||
|
||||
#include "trigger_nissan.h"
|
||||
#include "trigger_universal.h"
|
||||
|
||||
/**
|
||||
* Nissan Primera p11 year 1995-2002
|
||||
*/
|
||||
|
||||
void initializeNissanSR20VE_4(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR, false);
|
||||
static void initializeNissanSR20VE_4_optional_360(TriggerShape *s, bool with2nd DECLARE_ENGINE_PARAMETER_S) {
|
||||
s->initialize(FOUR_STROKE_CAM_SENSOR, with2nd);
|
||||
s->isSynchronizationNeeded = true;
|
||||
s->gapBothDirections = true;
|
||||
s->useOnlyPrimaryForSync = true;
|
||||
|
||||
s->tdcPosition = 630;
|
||||
|
||||
float w = 5;
|
||||
s->setTriggerSynchronizationGap2(9.67 * 0.75, 16);
|
||||
|
||||
float left = 0;
|
||||
float right;
|
||||
|
||||
int total = 360; // 360 on cam, over 720 crank degree
|
||||
|
||||
float base = 180;
|
||||
s->addEvent2(base - 15, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
right = base - 15;
|
||||
|
||||
if (with2nd) {
|
||||
addSkippedToothTriggerEvents(T_SECONDARY, s, total, 0, 0.5, 0, 720,
|
||||
left, right PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
|
||||
s->addEvent2(right, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
|
||||
left = right;
|
||||
right = base;
|
||||
if (with2nd) {
|
||||
addSkippedToothTriggerEvents(T_SECONDARY, s, total, 0, 0.5, 0, 720,
|
||||
left, right PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
s->addEvent2(right, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
|
||||
// was is the the one with 360 opto sensor?
|
||||
|
||||
base += 180;
|
||||
s->addEvent2(base - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
|
||||
left = right;
|
||||
right = base - w;
|
||||
if (with2nd) {
|
||||
// addSkippedToothTriggerEvents(T_SECONDARY, s, total, 0, 0.5, 0, 720,
|
||||
// left, right PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
s->addEvent2(right, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
|
||||
left = right;
|
||||
right = base;
|
||||
if (with2nd) {
|
||||
// addSkippedToothTriggerEvents(T_SECONDARY, s, total, 0, 0.5, 0, 720,
|
||||
// left, right PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
s->addEvent2(right, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
|
||||
base += 180;
|
||||
s->addEvent2(base - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
left = right;
|
||||
right = base - w;
|
||||
if (with2nd) {
|
||||
// addSkippedToothTriggerEvents(T_SECONDARY, s, total, 0, 0.5, 0, 720,
|
||||
// left, right PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
s->addEvent2(right, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
|
||||
left = right;
|
||||
right = base;
|
||||
if (with2nd) {
|
||||
// addSkippedToothTriggerEvents(T_SECONDARY, s, total, 0, 0.5, 0, 720,
|
||||
// left, right PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
s->addEvent2(right, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
|
||||
base += 180;
|
||||
s->addEvent2(base - w, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
s->addEvent2(base, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
left = right;
|
||||
right = base - w;
|
||||
|
||||
s->addEvent2(right, T_PRIMARY, TV_RISE PASS_ENGINE_PARAMETER);
|
||||
left = right;
|
||||
right = base;
|
||||
s->addEvent2(right, T_PRIMARY, TV_FALL PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Nissan Primera p11 year 1995-2002
|
||||
*/
|
||||
|
||||
void initializeNissanSR20VE_4(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
initializeNissanSR20VE_4_optional_360(s, false PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
|
||||
void initializeNissanSR20VE_4_360(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
|
||||
|
||||
initializeNissanSR20VE_4_optional_360(s, true PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
|
|
|
@ -634,10 +634,13 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
|||
break;
|
||||
|
||||
case TT_NISSAN_SR20VE:
|
||||
case TT_TEMP_WIP:
|
||||
initializeNissanSR20VE_4(this PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_NISSAN_SR20VE_360:
|
||||
initializeNissanSR20VE_4_360(this PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
||||
case TT_ROVER_K:
|
||||
initializeRoverK(this PASS_ENGINE_PARAMETER);
|
||||
break;
|
||||
|
|
|
@ -125,4 +125,8 @@ int getRemainingStack(thread_t *otp);
|
|||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* GLOBAL_H_ */
|
||||
|
|
Loading…
Reference in New Issue