Nissan VVT trigger decoder #2887
This commit is contained in:
parent
c8784147c3
commit
fd3aa4ec18
|
@ -1,7 +1,7 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "rusefi_enums.h"
|
#include "rusefi_enums.h"
|
||||||
#include "rusefi_hw_enums.h"
|
#include "rusefi_hw_enums.h"
|
||||||
// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 17:26:03 EDT 2021
|
// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 19:48:34 EDT 2021
|
||||||
// see also gen_config_and_enums.bat
|
// see also gen_config_and_enums.bat
|
||||||
|
|
||||||
|
|
||||||
|
@ -1474,6 +1474,8 @@ case TT_VVT_JZ:
|
||||||
return "TT_VVT_JZ";
|
return "TT_VVT_JZ";
|
||||||
case TT_VVT_MIATA_NB2:
|
case TT_VVT_MIATA_NB2:
|
||||||
return "TT_VVT_MIATA_NB2";
|
return "TT_VVT_MIATA_NB2";
|
||||||
|
case TT_VVT_NISSAN_VQ:
|
||||||
|
return "TT_VVT_NISSAN_VQ";
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "rusefi_enums.h"
|
#include "rusefi_enums.h"
|
||||||
#include "rusefi_hw_enums.h"
|
#include "rusefi_hw_enums.h"
|
||||||
// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 17:26:01 EDT 2021
|
// was generated automatically by rusEFI tool from rusefi_hw_enums.h // was generated automatically by rusEFI tool from rusefi_enums.h // by enum2string.jar tool on Thu Jul 01 19:48:33 EDT 2021
|
||||||
// see also gen_config_and_enums.bat
|
// see also gen_config_and_enums.bat
|
||||||
|
|
||||||
|
|
||||||
|
@ -1450,6 +1450,8 @@ case TT_VVT_JZ:
|
||||||
return "TT_VVT_JZ";
|
return "TT_VVT_JZ";
|
||||||
case TT_VVT_MIATA_NB2:
|
case TT_VVT_MIATA_NB2:
|
||||||
return "TT_VVT_MIATA_NB2";
|
return "TT_VVT_MIATA_NB2";
|
||||||
|
case TT_VVT_NISSAN_VQ:
|
||||||
|
return "TT_VVT_NISSAN_VQ";
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -396,13 +396,15 @@ typedef enum {
|
||||||
|
|
||||||
TT_NISSAN_VQ = TT_TT_NISSAN_VQ,
|
TT_NISSAN_VQ = TT_TT_NISSAN_VQ,
|
||||||
|
|
||||||
|
TT_VVT_NISSAN_VQ = TT_TT_VVT_NISSAN_VQ,
|
||||||
|
|
||||||
// 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 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
|
// 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
|
// 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
|
// Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests
|
||||||
//
|
//
|
||||||
TT_UNUSED = 59, // this is used if we want to iterate over all trigger types
|
TT_UNUSED = 60, // this is used if we want to iterate over all trigger types
|
||||||
|
|
||||||
Force_4_bytes_size_trigger_type = ENUM_32_BITS,
|
Force_4_bytes_size_trigger_type = ENUM_32_BITS,
|
||||||
} trigger_type_e; // TriggerProcessor.java has this "trigger_type_e" name hard-coded!
|
} trigger_type_e; // TriggerProcessor.java has this "trigger_type_e" name hard-coded!
|
||||||
|
|
|
@ -105,3 +105,33 @@ void initializeNissanSR20VE_4(TriggerWaveform *s) {
|
||||||
void initializeNissanSR20VE_4_360(TriggerWaveform *s) {
|
void initializeNissanSR20VE_4_360(TriggerWaveform *s) {
|
||||||
initializeNissanSR20VE_4_optional_360(s, true);
|
initializeNissanSR20VE_4_optional_360(s, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void addPrimaryToothEndingAt(TriggerWaveform *s, float fallAngle) {
|
||||||
|
int vvtWidth = 20;
|
||||||
|
|
||||||
|
s->addEventAngle(fallAngle - vvtWidth, T_PRIMARY, TV_RISE);
|
||||||
|
s->addEventAngle(fallAngle, T_PRIMARY, TV_FALL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void initializeNissanVQvvt(TriggerWaveform *s) {
|
||||||
|
s->initialize(FOUR_STROKE_CAM_SENSOR);
|
||||||
|
|
||||||
|
int offset = 720 - 520;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
addPrimaryToothEndingAt(s, offset + 40);
|
||||||
|
|
||||||
|
addPrimaryToothEndingAt(s, offset + 160);
|
||||||
|
addPrimaryToothEndingAt(s, offset + 200);
|
||||||
|
|
||||||
|
|
||||||
|
addPrimaryToothEndingAt(s, offset + 280);
|
||||||
|
|
||||||
|
|
||||||
|
addPrimaryToothEndingAt(s, offset + 320);
|
||||||
|
|
||||||
|
addPrimaryToothEndingAt(s, offset + 520);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -11,3 +11,6 @@
|
||||||
|
|
||||||
void initializeNissanSR20VE_4(TriggerWaveform *s);
|
void initializeNissanSR20VE_4(TriggerWaveform *s);
|
||||||
void initializeNissanSR20VE_4_360(TriggerWaveform *s);
|
void initializeNissanSR20VE_4_360(TriggerWaveform *s);
|
||||||
|
|
||||||
|
void initializeNissanVQvvt(TriggerWaveform *s);
|
||||||
|
void initializeNissanVQcrank(TriggerWaveform *s);
|
||||||
|
|
|
@ -545,6 +545,10 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e ambiguousOperat
|
||||||
configureFordAspireTriggerWaveform(this);
|
configureFordAspireTriggerWaveform(this);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TT_VVT_NISSAN_VQ:
|
||||||
|
initializeNissanVQvvt(this);
|
||||||
|
break;
|
||||||
|
|
||||||
case TT_TT_NISSAN_VQ:
|
case TT_TT_NISSAN_VQ:
|
||||||
case TT_KAWA_KX450F:
|
case TT_KAWA_KX450F:
|
||||||
configureKawaKX450F(this);
|
configureKawaKX450F(this);
|
||||||
|
|
Loading…
Reference in New Issue