Honda K cam wheels #3405

This commit is contained in:
Andrey 2021-10-24 17:12:19 -04:00
parent d683a06e20
commit 229419d04b
6 changed files with 44 additions and 7 deletions

View File

@ -1,6 +1,6 @@
#include "global.h"
#include "engine_types.h"
// was generated automatically by rusEFI tool from engine_types.h // by enum2string.jar tool on Sun Oct 24 19:26:39 UTC 2021
// was generated automatically by rusEFI tool from engine_types.h // by enum2string.jar tool on Sun Oct 24 17:07:42 EDT 2021
// see also gen_config_and_enums.bat
@ -409,6 +409,8 @@ case TT_HONDA_CBR_600:
return "TT_HONDA_CBR_600";
case TT_HONDA_K_12_1:
return "TT_HONDA_K_12_1";
case TT_HONDA_K_4_1:
return "TT_HONDA_K_4_1";
case TT_JEEP_18_2_2_2:
return "TT_JEEP_18_2_2_2";
case TT_JEEP_4_CYL:

View File

@ -514,13 +514,15 @@ typedef enum {
TT_SUZUKI_G13B = TT_TT_SUZUKI_G13B,
TT_HONDA_K_4_1 = 67,
// 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 = 67, // this is used if we want to iterate over all trigger types
TT_UNUSED = 68, // this is used if we want to iterate over all trigger types
// todo: convert to ENUM_16_BITS? I can see 257 triggers but not 65K triggers
Force_4_bytes_size_trigger_type = ENUM_32_BITS,

View File

@ -272,3 +272,31 @@ void configureHondaK_12_1(TriggerWaveform *s) {
}
}
/**
* Exhaust cam shaft, not variable on Honda K
* 2003 Honda Element
*/
void configureHondaK_4_1(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
s->setTriggerSynchronizationGap(1.61);
s->setSecondTriggerSynchronizationGap(0.38);
int start = 100;
int end = 150;
s->addEventAngle(start + 180 * 0, T_PRIMARY, TV_RISE);
s->addEventAngle(end + 180 * 0, T_PRIMARY, TV_FALL);
s->addEventAngle(start + 180 * 1, T_PRIMARY, TV_RISE);
s->addEventAngle(end + 180 * 1, T_PRIMARY, TV_FALL);
s->addEventAngle(start + 180 * 2, T_PRIMARY, TV_RISE);
s->addEventAngle(end + 180 * 2, T_PRIMARY, TV_FALL);
s->addEventAngle(start + 180 * 3, T_PRIMARY, TV_RISE);
s->addEventAngle(end + 180 * 3, T_PRIMARY, TV_FALL);
s->addEventAngle(709, T_PRIMARY, TV_RISE);
s->addEventAngle(720, T_PRIMARY, TV_FALL);
}

View File

@ -22,3 +22,4 @@ void configureOnePlus16(TriggerWaveform *s);
void configureHondaCbr600(TriggerWaveform *s);
void configureHondaK_12_1(TriggerWaveform *s);
void configureHondaK_4_1(TriggerWaveform *s);

View File

@ -463,6 +463,10 @@ void TriggerWaveform::setTriggerSynchronizationGap(float syncRatio) {
setTriggerSynchronizationGap3(/*gapIndex*/0, syncRatio * TRIGGER_GAP_DEVIATION_LOW, syncRatio * TRIGGER_GAP_DEVIATION_HIGH);
}
void TriggerWaveform::setSecondTriggerSynchronizationGap(float syncRatio) {
setTriggerSynchronizationGap3(/*gapIndex*/1, syncRatio * TRIGGER_GAP_DEVIATION_LOW, syncRatio * TRIGGER_GAP_DEVIATION_HIGH);
}
void TriggerWaveform::setSecondTriggerSynchronizationGap2(float syncRatioFrom, float syncRatioTo) {
setTriggerSynchronizationGap3(/*gapIndex*/1, syncRatioFrom, syncRatioTo);
}
@ -471,11 +475,6 @@ void TriggerWaveform::setThirdTriggerSynchronizationGap(float syncRatio) {
setTriggerSynchronizationGap3(/*gapIndex*/2, syncRatio * TRIGGER_GAP_DEVIATION_LOW, syncRatio * TRIGGER_GAP_DEVIATION_HIGH);
}
void TriggerWaveform::setSecondTriggerSynchronizationGap(float syncRatio) {
setTriggerSynchronizationGap3(/*gapIndex*/1, syncRatio * TRIGGER_GAP_DEVIATION_LOW, syncRatio * TRIGGER_GAP_DEVIATION_HIGH);
}
/**
* External logger is needed because at this point our logger is not yet initialized
*/
@ -650,6 +649,10 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e ambiguousOperat
configureBarra3plus1cam(this);
break;
case TT_HONDA_K_4_1:
configureHondaK_4_1(this);
break;
case TT_HONDA_K_12_1:
configureHondaK_12_1(this);
break;

View File

@ -71,6 +71,7 @@ public enum trigger_type_e {
TT_SUBARU_SVX_CAM_VVT,
TT_FORD_TFI_PIP,
TT_SUZUKI_G13B,
TT_HONDA_K_4_1,
TT_UNUSED,
Force_4_bytes_size_trigger_type,
}