rusefillc 2022-06-20 11:41:33 -04:00
parent b5a523af57
commit a4347668c5
6 changed files with 24 additions and 12 deletions

View File

@ -25,6 +25,7 @@ Release template (copy/paste this for new release):
### Added
- verbose trigger sync should reuse engineSnifferRpmThreshold #4259
- Subaru EZ30 variation of 36/2/2/2 trigger
### Fixed
- Improved logic used to disambiguate trigger sync using cam/VVT information. Engine now runs in wasted spark until cam sync is achieved, at which point it switches to fully sequential. #4099

View File

@ -400,8 +400,8 @@ case TT_DODGE_RAM:
return "TT_DODGE_RAM";
case TT_DODGE_STRATUS:
return "TT_DODGE_STRATUS";
case TT_EZ30:
return "TT_EZ30";
case TT_SUBARU_EZ30:
return "TT_SUBARU_EZ30";
case TT_FIAT_IAW_P8:
return "TT_FIAT_IAW_P8";
case TT_FORD_ASPIRE:

View File

@ -502,7 +502,7 @@ typedef enum {
// GM 24x with 3/12 degree gaps
TT_GM_24x_2 = 74,
TT_EZ30 = 12,
TT_SUBARU_EZ30 = 12,
UNUSED_13 = 13,
UNUSED_21 = 21,
UNUSED_34 = 34,

View File

@ -684,7 +684,10 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio
configureHondaK_12_1(this);
break;
case TT_EZ30:
case TT_SUBARU_EZ30:
initializeSubaruEZ30(this);
break;
case UNUSED_13:
case UNUSED_21:
case UNUSED_34:

View File

@ -9,11 +9,7 @@
#include "trigger_subaru.h"
/**
* This trigger is also used by Nissan and Mazda
* https://rusefi.com/forum/viewtopic.php?f=2&t=1932
*/
void initialize36_2_2_2(TriggerWaveform *s) {
static void initialize_one_of_36_2_2_2(TriggerWaveform *s, int firstCount, int secondCount, bool hasRotaryRelevance) {
s->initialize(FOUR_STROKE_CRANK_SENSOR);
#if EFI_UNIT_TEST
@ -30,7 +26,7 @@ void initialize36_2_2_2(TriggerWaveform *s) {
float base = 0;
for (int i = 0; i < 12; i++) {
for (int i = 0; i < firstCount; i++) {
s->addEvent720(base + narrow / 2, T_PRIMARY, TV_FALL);
s->addEvent720(base + narrow, T_PRIMARY, TV_RISE);
base += narrow;
@ -40,7 +36,7 @@ void initialize36_2_2_2(TriggerWaveform *s) {
s->addEvent720(base + wide, T_PRIMARY, TV_RISE);
base += wide;
for (int i = 0; i < 15; i++) {
for (int i = 0; i < secondCount; i++) {
s->addEvent720(base + narrow / 2, T_PRIMARY, TV_FALL);
s->addEvent720(base + narrow, T_PRIMARY, TV_RISE);
base += narrow;
@ -54,6 +50,18 @@ void initialize36_2_2_2(TriggerWaveform *s) {
s->useOnlyPrimaryForSync = true;
}
/**
* This trigger is also used by Nissan and Mazda
* https://rusefi.com/forum/viewtopic.php?f=2&t=1932
*/
void initialize36_2_2_2(TriggerWaveform *s) {
initialize_one_of_36_2_2_2(s, 12, 15, true);
}
void initializeSubaruEZ30(TriggerWaveform *s) {
initialize_one_of_36_2_2_2(s, 18, 9, true);
}
static void initializeSubaru7_6(TriggerWaveform *s, bool withCrankWheel) {
s->initialize(FOUR_STROKE_CAM_SENSOR);

View File

@ -13,4 +13,4 @@ void initialize36_2_2_2(TriggerWaveform *s);
void initializeSubaru7_6(TriggerWaveform *s);
void initializeSubaruOnly7(TriggerWaveform *s);
void initializeSubaru_SVX(TriggerWaveform *s);
void initializeSubaruEZ30(TriggerWaveform *s);