honda J30 trigger wheel

This commit is contained in:
Roman 2025-02-02 05:22:58 +03:00 committed by rusefillc
parent f84ff146e7
commit 3bc78c4bc0
5 changed files with 48 additions and 2 deletions

View File

@ -224,13 +224,15 @@ enum class trigger_type_e : uint32_t {
TT_NISSAN_HR_CAM_IN = 86,
TT_HONDA_J30A2_24_1_1 = 87,
// 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 = 87, // this is used if we want to iterate over all trigger types
TT_UNUSED = 88, // this is used if we want to iterate over all trigger types
};
typedef enum {

View File

@ -68,3 +68,41 @@ void configureHondaK_4_1(TriggerWaveform *s) {
s->addToothRiseFall(360, 7);
}
void initialize_one_of_24_2_2(TriggerWaveform *s, int firstCount, int secondCount) {
s->initialize(FOUR_STROKE_CRANK_SENSOR, SyncEdge::RiseOnly);
float narrow = 360 / 24;
float wide = narrow * 2;
float base = 0;
for (int i = 0; i < firstCount; i++) {
s->addToothFallRise(base + narrow, narrow / 2);
base += narrow;
}
s->addToothFallRise(base + wide, wide / 2);
base += wide;
for (int i = 0; i < secondCount; i++) {
s->addToothFallRise(base + narrow, narrow / 2);
base += narrow;
}
s->addToothFallRise(360, narrow/2);
}
void configureHondaJ30A2_24_1_1(TriggerWaveform *s) {
initialize_one_of_24_2_2(s, 6, 14);
size_t count = 6;
s->tdcPosition = 0;
s->setTriggerSynchronizationGap3(/*gapIndex*/0, 1.6, 4);
for (size_t i = 1 ; i < count ; i++) {
s->setTriggerSynchronizationGap3(/*gapIndex*/i, 0.65, 1.4);
}
s->setTriggerSynchronizationGap3(/*gapIndex*/count, 0.2, 0.55);
}

View File

@ -13,3 +13,5 @@ void configureHondaCbr600(TriggerWaveform *s);
void configureHondaK_12_1(TriggerWaveform *s);
void configureHondaK_4_1(TriggerWaveform *s);
void configureHondaJ30A2_24_1_1(TriggerWaveform *s);

View File

@ -649,6 +649,10 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio
configureHondaK_12_1(this);
break;
case trigger_type_e::TT_HONDA_J30A2_24_1_1:
configureHondaJ30A2_24_1_1(this);
break;
case trigger_type_e::TT_SUBARU_EZ30:
initializeSubaruEZ30(this);
break;

View File

@ -659,7 +659,7 @@ adc_channel_e fuelLevelSensor;This is the processor pin that your fuel level sen
struct trigger_config_s
! 'INVALID' for TT_VVT_* wheels
#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "INVALID", "GM_7X", "Daihatsu 3 cylinder", "Mazda SOHC 4", "60-2", "36-1", "Mercedes Two Segment", "Single Tooth", "EZ30", "INVALID", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Half Moon", "Dodge Ram 1+16", "60-2 Wrong Polarity", "Benelli Tre", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM 24x 5 degree", "Honda CBR 600 Cam", "INVALID", "Honda CBR 600 custom", "3-1 skipped", "Dodge Neon 2003 crank", "Miata NB", "INVALID", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "12crank/24cam", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36-2", "Subaru SVX", "Suzuki K6A", "Subaru 7 without 6", "INVALID", "INVALID", "GM 60-2-2-2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "INVALID", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32-2", "36-2-1", "36-2-1-1", "3-0", "INVALID", "GM 24x 3 degree", "60-2-2 F3R", "Mitsu 4G63 Crank", "x2 30 Deg camshaft BTDC", "INVALID", "Mitsu 6G72 Cam", "6-0", "Daihatsu 4 cylinder", "INVALID", "dev", "Nissan HR", "Arctic Cat", "HR12 in", "HR12 ex", "trg88"
#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "INVALID", "GM_7X", "Daihatsu 3 cylinder", "Mazda SOHC 4", "60-2", "36-1", "Mercedes Two Segment", "Single Tooth", "EZ30", "INVALID", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "INVALID", "Half Moon", "Dodge Ram 1+16", "60-2 Wrong Polarity", "Benelli Tre", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "dev 2JZ 3/34 simulator", "Rover K", "GM 24x 5 degree", "Honda CBR 600 Cam", "INVALID", "Honda CBR 600 custom", "3-1 skipped", "Dodge Neon 2003 crank", "Miata NB", "INVALID", "INVALID", "Subaru 7+6", "Jeep 18-2-2-2", "12crank/24cam", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "INVALID", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "INVALID", "36-2", "Subaru SVX", "Suzuki K6A", "Subaru 7 without 6", "INVALID", "INVALID", "GM 60-2-2-2", "Skoda Favorit", "Barra 3+1 Cam", "Kawa KX450F", "Nissan VQ35", "INVALID", "Nissan VQ30", "Nissan QR25", "INVALID", "Subaru SVX Crank 1", "Subaru SVX Cam VVT", "Ford PIP", "Suzuki G13B", "Honda K 4+1", "Nissan MR18 Crank", "32-2", "36-2-1", "36-2-1-1", "3-0", "INVALID", "GM 24x 3 degree", "60-2-2 F3R", "Mitsu 4G63 Crank", "x2 30 Deg camshaft BTDC", "INVALID", "Mitsu 6G72 Cam", "6-0", "Daihatsu 4 cylinder", "INVALID", "dev", "Nissan HR", "Arctic Cat", "HR12 in", "HONDA J30A2", "trg88"
custom trigger_type_e 4 bits, U32, @OFFSET@, [0:6], @@trigger_type_e_enum@@
trigger_type_e type;https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers