diff --git a/firmware/controllers/algo/engine_types.h b/firmware/controllers/algo/engine_types.h index d7ca3763c9..3c8fdab970 100644 --- a/firmware/controllers/algo/engine_types.h +++ b/firmware/controllers/algo/engine_types.h @@ -321,3 +321,207 @@ typedef enum { Force_4_bytes_size_debug_mode_e = ENUM_32_BITS, } debug_mode_e; +/** + * @see http://rusefi.com/wiki/index.php?title=Manual:Software:Trigger + */ +typedef enum { + + TT_TOOTHED_WHEEL = TT_TT_TOOTHED_WHEEL, + TT_FORD_ASPIRE = TT_TT_FORD_ASPIRE, + TT_DODGE_NEON_1995 = 2, + /** + * https://rusefi.com/wiki/index.php?title=Manual:Software:Trigger#Mazda_Miata_NA + */ + TT_MAZDA_MIATA_NA = TT_TT_MAZDA_MIATA_NA, + /** + * NB1 means non-VVT NB, 99 and 00 1.8 engine + */ + TT_MAZDA_MIATA_NB1 = TT_TT_MAZDA_MIATA_NB1, + TT_GM_7X = TT_TT_GM_7X, + TT_MAZDA_SOHC_4 = TT_TT_MAZDA_SOHC_4, + TT_DAIHATSU = TT_TT_DAIHATSU, + /** + * "60/2" + * See also TT_ONE_PLUS_TOOTHED_WHEEL_60_2 + */ + TT_TOOTHED_WHEEL_60_2 = TT_TT_TOOTHED_WHEEL_60_2, + TT_TOOTHED_WHEEL_36_1 = TT_TT_TOOTHED_WHEEL_36_1, + + // todo: remove this weird trigger? + TT_UNUSED_10 = TT_TT_UNUSED_10, + + // todo: this really looks to be same as Miata_NA shall we remove? + TT_MITSUBISHI = 11, + + // this makes sense because mechanical spark distribution does not require synchronization + TT_HONDA_4_24 = 12, + + TT_HONDA_1_4_24 = TT_TT_HONDA_1_4_24, + + // cam-based + TT_DODGE_NEON_2003_CAM = 14, + + TT_MAZDA_DOHC_1_4 = TT_TT_MAZDA_DOHC_1_4, + + /** + * "1+1" - one tooth on primary channel, one tooth on secondary channel + * this trigger is used only by unit tests + * see also TT_ONE a bit below + */ + TT_ONE_PLUS_ONE = 16, + // VVT for 2JZ + TT_VVT_JZ = TT_TT_VVT_JZ, + // just one channel with just one tooth + TT_ONE = TT_TT_ONE, + + TT_DODGE_RAM = 19, + /** + * It looks like this is the VR shape if you have your wires flipped + */ + TT_60_2_VW = TT_TT_60_2_VW, + + TT_HONDA_1_24 = TT_TT_HONDA_1_24, + + TT_DODGE_STRATUS = 22, + + /** + * Subaru but also Mazda RX-8 + * We suspect that it's VR + */ + TT_36_2_2_2 = TT_TT_36_2_2_2, + + /** + * only the 4 tooth signal, without the 360 signal + * 8,2,2,2 Nissan pattern + * See also TT_NISSAN_SR20VE_360 + */ + TT_NISSAN_SR20VE = 24, + + TT_2JZ_3_34 = TT_TT_2JZ_3_34, + + TT_ROVER_K = 26, + + TT_GM_LS_24 = TT_TT_GM_LS_24, + + TT_HONDA_CBR_600 = 28, + + TT_2JZ_1_12 = TT_TT_2JZ_1_12, + + TT_CHRYSLER_NGC_36_2_2 = TT_TT_CHRYSLER_NGC_36_2_2, + + // skipped 3/1 with cam sensor for testing + TT_3_1_CAM = 31, + + // crank-based in case your cam is broken + TT_DODGE_NEON_2003_CRANK = 32, + + /** + * this takes care of crank sensor, VVT sensor should be configured separately + * for VVT simulated trigger signal we have https://github.com/rusefi/rusefi/issues/566 gap + * See also TT_MAZDA_MIATA_VVT_TEST + */ + TT_MIATA_VVT = TT_TT_MIATA_VVT, + + /** + * This is a different version of TT_HONDA_ACCORD_1_24 + * See https://sourceforge.net/p/rusefi/tickets/319/ + */ + TT_HONDA_ACCORD_1_24_SHIFTED = 34, + + /** + * a version of NB1 with shifted CAM, useful for VVT testing & development + */ + TT_MAZDA_MIATA_VVT_TEST = 35, + + TT_SUBARU_7_6 = TT_TT_SUBARU_7_6, + + // this one is 6 cylinder, see TT_JEEP_4_cyl for 4 cylinders + TT_JEEP_18_2_2_2 = TT_TT_JEEP_18_2_2_2, + + /* + * See also TT_NISSAN_SR20VE + */ + TT_NISSAN_SR20VE_360 = 38, + + TT_DODGE_NEON_1995_ONLY_CRANK = 39, + + // Jeep XJ 2500cc 4 cylinder. See also TT_JEEP_18_2_2_2 for 6 cylinders + TT_JEEP_4_CYL = TT_TT_JEEP_4_CYL, + + // magneti marelli Fiat/Lancia IAW P8 from the 90', 2.0 16 v turbo engine - Lancia Coupe + // https://rusefi.com/forum/viewtopic.php?f=5&t=1440 + TT_FIAT_IAW_P8 = 41, + + TT_FORD_ST170 = TT_TT_FORD_ST170, + + /** + * cam sensor of Mazda Miata NB2 - the VVT signal shape + */ + TT_VVT_MIATA_NB2 = TT_TT_VVT_MIATA_NB2, + + TT_RENIX_44_2_2 = TT_TT_RENIX_44_2_2, + + /** + * Same as TT_RENIX_44_2_2 but repeated three times, not two. + */ + TT_RENIX_66_2_2_2 = TT_TT_RENIX_66_2_2_2, + + TT_HONDA_K_12_1 = TT_TT_HONDA_K_12_1, + + TT_VVT_BOSCH_QUICK_START = TT_TT_VVT_BOSCH_QUICK_START, + + TT_TOOTHED_WHEEL_36_2 = TT_TT_TOOTHED_WHEEL_36_2, + + TT_SUBARU_SVX = TT_TT_SUBARU_SVX, + + TT_1_16 = 50, + + // todo: remove this trigger once we have https://github.com/rusefi/rusefi/issues/2073 + TT_SUBARU_7_WITHOUT_6 = TT_TT_SUBARU_7_WITHOUT_6, + + TT_52 = TT_TT_52, + + // https://rusefi.com/forum/viewtopic.php?f=5&t=1912 + TT_TRI_TACH = TT_TT_TRI_TACH, + + TT_GM_60_2_2_2 = TT_TT_GM_60_2_2_2, + + /** + * https://rusefi.com/forum/viewtopic.php?f=5&t=1937 + * HALL sensor, and can be used on all Skoda's engines (from 1000MB to 130, Favorit, Felicia) + */ + TT_SKODA_FAVORIT = TT_TT_SKODA_FAVORIT, + + TT_VVT_BARRA_3_PLUS_1 = TT_TT_VVT_BARRA_3_PLUS_1, + + TT_KAWA_KX450F = TT_TT_KAWA_KX450F, + + TT_NISSAN_VQ35 = TT_TT_NISSAN_VQ35, + + TT_VVT_NISSAN_VQ35 = TT_TT_VVT_NISSAN_VQ35, + + TT_NISSAN_VQ30 = TT_TT_NISSAN_VQ30, + + TT_NISSAN_QR25 = TT_TT_NISSAN_QR25, + + TT_TEMP_62 = TT_TT_TEMP_62, + + TT_SUBARU_SVX_CRANK_1 = TT_TT_SUBARU_SVX_CRANK_1, + + TT_SUBARU_SVX_CAM_VVT = TT_TT_SUBARU_SVX_CAM_VVT, + + TT_FORD_TFI_PIP = TT_TT_FORD_TFI_PIP, + + TT_SUZUKI_G13B = TT_TT_SUZUKI_G13B, + + // 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 + + // todo: convert to ENUM_16_BITS? I can see 257 triggers but not 65K triggers + Force_4_bytes_size_trigger_type = ENUM_32_BITS, +} trigger_type_e; // TriggerProcessor.java has this "trigger_type_e" name hard-coded! diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 4861810db1..c2d80ae658 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -27,212 +27,6 @@ #define PERCENT_MULT 100.0f #define PERCENT_DIV 0.01f - -/** - * @see http://rusefi.com/wiki/index.php?title=Manual:Software:Trigger - */ -typedef enum { - - TT_TOOTHED_WHEEL = TT_TT_TOOTHED_WHEEL, - TT_FORD_ASPIRE = TT_TT_FORD_ASPIRE, - TT_DODGE_NEON_1995 = 2, - /** - * https://rusefi.com/wiki/index.php?title=Manual:Software:Trigger#Mazda_Miata_NA - */ - TT_MAZDA_MIATA_NA = TT_TT_MAZDA_MIATA_NA, - /** - * NB1 means non-VVT NB, 99 and 00 1.8 engine - */ - TT_MAZDA_MIATA_NB1 = TT_TT_MAZDA_MIATA_NB1, - TT_GM_7X = TT_TT_GM_7X, - TT_MAZDA_SOHC_4 = TT_TT_MAZDA_SOHC_4, - TT_DAIHATSU = TT_TT_DAIHATSU, - /** - * "60/2" - * See also TT_ONE_PLUS_TOOTHED_WHEEL_60_2 - */ - TT_TOOTHED_WHEEL_60_2 = TT_TT_TOOTHED_WHEEL_60_2, - TT_TOOTHED_WHEEL_36_1 = TT_TT_TOOTHED_WHEEL_36_1, - - // todo: remove this weird trigger? - TT_UNUSED_10 = TT_TT_UNUSED_10, - - // todo: this really looks to be same as Miata_NA shall we remove? - TT_MITSUBISHI = 11, - - // this makes sense because mechanical spark distribution does not require synchronization - TT_HONDA_4_24 = 12, - - TT_HONDA_1_4_24 = TT_TT_HONDA_1_4_24, - - // cam-based - TT_DODGE_NEON_2003_CAM = 14, - - TT_MAZDA_DOHC_1_4 = TT_TT_MAZDA_DOHC_1_4, - - /** - * "1+1" - one tooth on primary channel, one tooth on secondary channel - * this trigger is used only by unit tests - * see also TT_ONE a bit below - */ - TT_ONE_PLUS_ONE = 16, - // VVT for 2JZ - TT_VVT_JZ = TT_TT_VVT_JZ, - // just one channel with just one tooth - TT_ONE = TT_TT_ONE, - - TT_DODGE_RAM = 19, - /** - * It looks like this is the VR shape if you have your wires flipped - */ - TT_60_2_VW = TT_TT_60_2_VW, - - TT_HONDA_1_24 = TT_TT_HONDA_1_24, - - TT_DODGE_STRATUS = 22, - - /** - * Subaru but also Mazda RX-8 - * We suspect that it's VR - */ - TT_36_2_2_2 = TT_TT_36_2_2_2, - - /** - * only the 4 tooth signal, without the 360 signal - * 8,2,2,2 Nissan pattern - * See also TT_NISSAN_SR20VE_360 - */ - TT_NISSAN_SR20VE = 24, - - TT_2JZ_3_34 = TT_TT_2JZ_3_34, - - TT_ROVER_K = 26, - - TT_GM_LS_24 = TT_TT_GM_LS_24, - - TT_HONDA_CBR_600 = 28, - - TT_2JZ_1_12 = TT_TT_2JZ_1_12, - - TT_CHRYSLER_NGC_36_2_2 = TT_TT_CHRYSLER_NGC_36_2_2, - - // skipped 3/1 with cam sensor for testing - TT_3_1_CAM = 31, - - // crank-based in case your cam is broken - TT_DODGE_NEON_2003_CRANK = 32, - - /** - * this takes care of crank sensor, VVT sensor should be configured separately - * for VVT simulated trigger signal we have https://github.com/rusefi/rusefi/issues/566 gap - * See also TT_MAZDA_MIATA_VVT_TEST - */ - TT_MIATA_VVT = TT_TT_MIATA_VVT, - - /** - * This is a different version of TT_HONDA_ACCORD_1_24 - * See https://sourceforge.net/p/rusefi/tickets/319/ - */ - TT_HONDA_ACCORD_1_24_SHIFTED = 34, - - /** - * a version of NB1 with shifted CAM, useful for VVT testing & development - */ - TT_MAZDA_MIATA_VVT_TEST = 35, - - TT_SUBARU_7_6 = TT_TT_SUBARU_7_6, - - // this one is 6 cylinder, see TT_JEEP_4_cyl for 4 cylinders - TT_JEEP_18_2_2_2 = TT_TT_JEEP_18_2_2_2, - - /* - * See also TT_NISSAN_SR20VE - */ - TT_NISSAN_SR20VE_360 = 38, - - TT_DODGE_NEON_1995_ONLY_CRANK = 39, - - // Jeep XJ 2500cc 4 cylinder. See also TT_JEEP_18_2_2_2 for 6 cylinders - TT_JEEP_4_CYL = TT_TT_JEEP_4_CYL, - - // magneti marelli Fiat/Lancia IAW P8 from the 90', 2.0 16 v turbo engine - Lancia Coupe - // https://rusefi.com/forum/viewtopic.php?f=5&t=1440 - TT_FIAT_IAW_P8 = 41, - - TT_FORD_ST170 = TT_TT_FORD_ST170, - - /** - * cam sensor of Mazda Miata NB2 - the VVT signal shape - */ - TT_VVT_MIATA_NB2 = TT_TT_VVT_MIATA_NB2, - - TT_RENIX_44_2_2 = TT_TT_RENIX_44_2_2, - - /** - * Same as TT_RENIX_44_2_2 but repeated three times, not two. - */ - TT_RENIX_66_2_2_2 = TT_TT_RENIX_66_2_2_2, - - TT_HONDA_K_12_1 = TT_TT_HONDA_K_12_1, - - TT_VVT_BOSCH_QUICK_START = TT_TT_VVT_BOSCH_QUICK_START, - - TT_TOOTHED_WHEEL_36_2 = TT_TT_TOOTHED_WHEEL_36_2, - - TT_SUBARU_SVX = TT_TT_SUBARU_SVX, - - TT_1_16 = 50, - - // todo: remove this trigger once we have https://github.com/rusefi/rusefi/issues/2073 - TT_SUBARU_7_WITHOUT_6 = TT_TT_SUBARU_7_WITHOUT_6, - - TT_52 = TT_TT_52, - - // https://rusefi.com/forum/viewtopic.php?f=5&t=1912 - TT_TRI_TACH = TT_TT_TRI_TACH, - - TT_GM_60_2_2_2 = TT_TT_GM_60_2_2_2, - - /** - * https://rusefi.com/forum/viewtopic.php?f=5&t=1937 - * HALL sensor, and can be used on all Skoda's engines (from 1000MB to 130, Favorit, Felicia) - */ - TT_SKODA_FAVORIT = TT_TT_SKODA_FAVORIT, - - TT_VVT_BARRA_3_PLUS_1 = TT_TT_VVT_BARRA_3_PLUS_1, - - TT_KAWA_KX450F = TT_TT_KAWA_KX450F, - - TT_NISSAN_VQ35 = TT_TT_NISSAN_VQ35, - - TT_VVT_NISSAN_VQ35 = TT_TT_VVT_NISSAN_VQ35, - - TT_NISSAN_VQ30 = TT_TT_NISSAN_VQ30, - - TT_NISSAN_QR25 = TT_TT_NISSAN_QR25, - - TT_TEMP_62 = TT_TT_TEMP_62, - - TT_SUBARU_SVX_CRANK_1 = TT_TT_SUBARU_SVX_CRANK_1, - - TT_SUBARU_SVX_CAM_VVT = TT_TT_SUBARU_SVX_CAM_VVT, - - TT_FORD_TFI_PIP = TT_TT_FORD_TFI_PIP, - - TT_SUZUKI_G13B = TT_TT_SUZUKI_G13B, - - // 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 - - // todo: convert to ENUM_16_BITS? I can see 257 triggers but not 65K triggers - Force_4_bytes_size_trigger_type = ENUM_32_BITS, -} trigger_type_e; // TriggerProcessor.java has this "trigger_type_e" name hard-coded! - typedef enum { ADC_OFF = 0, ADC_SLOW = 1, diff --git a/java_console/io/src/main/java/com/rusefi/enums/trigger_type_e.java b/java_console/io/src/main/java/com/rusefi/enums/trigger_type_e.java new file mode 100644 index 0000000000..2472cc9ba2 --- /dev/null +++ b/java_console/io/src/main/java/com/rusefi/enums/trigger_type_e.java @@ -0,0 +1,76 @@ +package com.rusefi.enums; +//auto-generated by ToJavaEnum.java + + + +public enum trigger_type_e { + TT_TOOTHED_WHEEL, + TT_FORD_ASPIRE, + TT_DODGE_NEON_1995, + TT_MAZDA_MIATA_NA, + TT_MAZDA_MIATA_NB1, + TT_GM_7X, + TT_DAIHATSU, + TT_MAZDA_SOHC_4, + TT_TOOTHED_WHEEL_60_2, + TT_TOOTHED_WHEEL_36_1, + TT_UNUSED_10, + TT_MITSUBISHI, + TT_HONDA_4_24, + TT_HONDA_1_4_24, + TT_DODGE_NEON_2003_CAM, + TT_MAZDA_DOHC_1_4, + TT_ONE_PLUS_ONE, + TT_VVT_JZ, + TT_ONE, + TT_DODGE_RAM, + TT_60_2_VW, + TT_HONDA_1_24, + TT_DODGE_STRATUS, + TT_36_2_2_2, + TT_NISSAN_SR20VE, + TT_2JZ_3_34, + TT_ROVER_K, + TT_GM_LS_24, + TT_HONDA_CBR_600, + TT_2JZ_1_12, + TT_CHRYSLER_NGC_36_2_2, + TT_3_1_CAM, + TT_DODGE_NEON_2003_CRANK, + TT_MIATA_VVT, + TT_HONDA_ACCORD_1_24_SHIFTED, + TT_MAZDA_MIATA_VVT_TEST, + TT_SUBARU_7_6, + TT_JEEP_18_2_2_2, + TT_NISSAN_SR20VE_360, + TT_DODGE_NEON_1995_ONLY_CRANK, + TT_JEEP_4_CYL, + TT_FIAT_IAW_P8, + TT_FORD_ST170, + TT_VVT_MIATA_NB2, + TT_RENIX_44_2_2, + TT_RENIX_66_2_2_2, + TT_HONDA_K_12_1, + TT_VVT_BOSCH_QUICK_START, + TT_TOOTHED_WHEEL_36_2, + TT_SUBARU_SVX, + TT_1_16, + TT_SUBARU_7_WITHOUT_6, + TT_52, + TT_TRI_TACH, + TT_GM_60_2_2_2, + TT_SKODA_FAVORIT, + TT_VVT_BARRA_3_PLUS_1, + TT_KAWA_KX450F, + TT_NISSAN_VQ35, + TT_VVT_NISSAN_VQ35, + TT_NISSAN_VQ30, + TT_NISSAN_QR25, + TT_TEMP_62, + TT_SUBARU_SVX_CRANK_1, + TT_SUBARU_SVX_CAM_VVT, + TT_FORD_TFI_PIP, + TT_SUZUKI_G13B, + TT_UNUSED, + Force_4_bytes_size_trigger_type, +}