rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
engine_types.h
Go to the documentation of this file.
1/*
2 * @file engine_types.h
3 *
4 * this header alone few similar ones is consumed by code generation layer for values to be available in .ini template etc
5 *
6 * See 'integration API' note in rusefi_enums.h
7 * TODO: spell out which enums belong here and which enums belong in rusefi_enums.h for what reasons
8 *
9 * @date Oct 23, 2021
10 * @author Andrey Belomutskiy, (c) 2012-2021
11 */
12
13#pragma once
14
16
17/**
18 * https://rusefi.com//wiki/index.php?title=Manual:Debug_fields
19 */
20typedef enum __attribute__ ((__packed__)) {
21 DBG_0 = 0,
22 DBG_1 = 1,
23 DBG_2 = 2,
24 DBG_STEPPER_IDLE_CONTROL = 3,
25 DBG_EL_ACCEL = 4,
26 DBG_5 = 5,
27 DBG_6 = 6,
28 DBG_7 = 7,
29 DBG_8 = 8,
30 DBG_9 = 9,
31 DBG_10 = 10,
32 DBG_11 = 11,
33 DBG_12 = 12,
34 DBG_13 = 13,
35 DBG_SR5_PROTOCOL = 14,
36 DBG_KNOCK = 15,
37 DBG_16 = 16,
38 /**
39 * See also DBG_ELECTRONIC_THROTTLE_EXTRA
40 */
41 DBG_ELECTRONIC_THROTTLE_PID = 17,
42 DBG_EXECUTOR = 18,
43
44 DBG_19 = 19,
45 DBG_20 = 20,
46 DBG_21 = 21,
47
48 DBG_22 = 22,
49 UNUSED23 = 23,
50 DBG_24 = 24,
51 DBG_25 = 25,
52 DBG_26 = 26,
53 DBG_27 = 27,
54 DBG_METRICS = 28,
55 DBG_29 = 29,
56 DBG_ION = 30,
57 DBG_TLE8888 = 31,
58 DBG_32 = 32,
59 DBG_33 = 33,
60 DBG_34 = 34,
61 DBG_35 = 35,
62 DBG_36 = 36,
63 DBG_37 = 37,
64 DBG_38 = 38,
65 DBG_ETB_AUTOTUNE = 39,
66 DBG_COMPOSITE_LOG = 40,
67 DBG_UNUSED41 = 41,
68 DBG_UNUSED_42 = 42,
69 DBG_43 = 43,
70 DBG_DYNO_VIEW = 44,
71 DBG_LOGIC_ANALYZER = 45,
72 DBG_46 = 46,
73 DBG_TCU = 47,
74 DBG_LUA = 48,
75
77
78/**
79 * @see http://rusefi.com/wiki/index.php?title=Manual:Software:Trigger
80 * TriggerProcessor.java has this "trigger_type_e" name hard-coded!
81 */
82enum class trigger_type_e : uint32_t {
83
87 // https://rusefi.com/wiki/index.php?title=Manual:Software:Trigger#Mazda_Miata_NA
90 TT_GM_7X = 5,
93 // "60/2"
94 // See also TT_ONE_PLUS_TOOTHED_WHEEL_60_2
98 // a single tooth on lazy Hall or VR. See also TT_HALF_MOON
100 TT_SUBARU_EZ30 = 12,
102 // cam-based
105 // * "1+1" - one tooth on primary channel, one tooth on secondary channel
106 // * Note: this trigger is used only by unit tests
107 // * see also TT_HALF_MOON a bit below
108 TT_ONE_PLUS_ONE = 16,
109 /**
110 * VVT for 2JZ
111 * three evenly spaces teeth
112 */
114 // just one channel with one perfectly 180 degree tooth with proper reliable Hall sensor, see also TT_NARROW_SINGLE_TOOTH
115 TT_HALF_MOON = 18,
116
117 TT_DODGE_RAM = 19,
118 // keeping for compatibility with M73 PnP harnesses which until 2023 were build with VR wires flipped
120 TT_BENELLI_TRE = 21,
121 TT_DODGE_STRATUS = 22,
122 // Subaru but also Mazda RX-8, we suspect that it's VR
123 TT_36_2_2_2 = 23,
124 // * only the 4 tooth signal, without the 360 signal
125 // * 8,2,2,2 Nissan pattern
126 TT_NISSAN_SR20VE = 24,
128 TT_ROVER_K = 26,
129 // GM 24x with 5/10 degree gaps
130 TT_GM_24x_5 = 27,
131 TT_HONDA_CBR_600 = 28,
132 TT_UNUSED29 = 29,
133 // todo: we syspect that this one is broken while TT_JEEP_EVD_36_2_2 is potentially better?
135 // skipped 3/1 with cam sensor for testing
136 TT_3_1_CAM = 31,
137 // crank-based in case your cam is broken
139 // * this takes care of crank sensor, VVT sensor should be configured separately
140 // * for VVT simulated trigger signal we have https://github.com/rusefi/rusefi/issues/566 gap
141 // * See also TT_MAZDA_MIATA_VVT_TEST
142 TT_MIATA_VVT = 33,
144 // * a version of NB1 with shifted CAM, useful for VVT testing & development
146 TT_SUBARU_7_6 = 36,
147 // this one is 6 cylinder, see TT_JEEP_4_cyl for 4 cylinders
148 TT_JEEP_18_2_2_2 = 37,
151 // Jeep XJ 2500cc 4 cylinder. See also TT_JEEP_18_2_2_2 for 6 cylinders
152 TT_JEEP_4_CYL = 40,
153 // magneti marelli Fiat/Lancia IAW P8 from the 90', 2.0 16 v turbo engine - Lancia Coupe
154 // https://rusefi.com/forum/viewtopic.php?f=5&t=1440
155 TT_FIAT_IAW_P8 = 41,
156 TT_FORD_ST170 = 42,
157 // * cam sensor of Mazda Miata NB2 - the VVT signal shape
158 TT_VVT_MIATA_NB = 43,
159 TT_RENIX_44_2_2 = 44,
160 //* Same as TT_RENIX_44_2_2 but repeated three times, not two.
161 // todo: we suspect that TT_JEEPRENIX_66_2_2_2 is correct while this one here is broken VR polarity!
163 // * Honda K crank shape
167 TT_SUBARU_SVX = 49,
168 TT_SUZUKI_K6A = 50,
169 // todo: remove this trigger once we have https://github.com/rusefi/rusefi/issues/2073
172 // https://rusefi.com/forum/viewtopic.php?f=5&t=1912
173 TT_TRI_TACH = 53,
174 TT_GM_60_2_2_2 = 54,
175 // * https://rusefi.com/forum/viewtopic.php?f=5&t=1937
176 // * HALL sensor, and can be used on all Skoda's engines (from 1000MB to 130, Favorit, Felicia)
177 TT_SKODA_FAVORIT = 55,
179 TT_KAWA_KX450F = 57,
180 TT_NISSAN_VQ35 = 58,
182 TT_NISSAN_VQ30 = 60,
183 TT_NISSAN_QR25 = 61,
187 TT_FORD_TFI_PIP = 65,
188 TT_SUZUKI_G13B = 66,
189 // * Honda K exhaust cam shaft
193 // Mitsubishi 4B11 would be this with half moon camshaft
194 // 4G69 would use it with different cam
195 TT_36_2_1 = 70,
196 // Mitsubishi 3 cyl and 6 cyl
197 // 36-2-1-1
198 TT_36_2_1_1 = 71,
199 // 3-0
200 TT_3_TOOTH_CRANK = 72,
202 // GM 24x with 3/12 degree gaps
203 TT_GM_24x_3 = 74,
204 // Renault F3R
205 TT_60_2_2_F3R = 75,
207 /* pull-up'ed(inverted in): pull down 2x 30 deg before tdc on cam, till tdc.
208 e.g. Sovek, Saruman ignition blind type */
209 TT_60DEG_TOOTH = 77,
210 // trigger setup matches 4G15T
212
214
215 TT_6_TOOTH_CRANK = 80,
216
218
219 TT_VVT_MAZDA_L = 82,
220
221 TT_DEV = 83,
222
223 TT_NISSAN_HR = 84,
224
225 TT_ARCTIC_CAT = 85,
226
228
230
231 TT_CUSTOM_1 = 88,
232 TT_CUSTOM_2 = 89,
233
234 // 53022243AF 6.2 2009-22 Dodge Chrysler Jeep RAM 5.7L 6.2L 6.4L OHV V8
236
238
239 // See also TT_CHRYSLER_NGC_36_2_2
241
243
244 // symmetrical crank
246 // 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
247 // do not forget to invoke "gen_config.bat" once you make changes to integration/rusefi_config.txt
248 // todo: one day a hero would integrate some of these things into Makefile in order to reduce manual magic
249 //
250 // Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests
251 //
252 TT_UNUSED = 95, // this is used if we want to iterate over all trigger types
253};
254
291
333
typedef __attribute__
Ignition Mode.
debug_mode_e
ts_14_command
@ TS_GRAB_TPS_CLOSED
@ TS_TRIGGER_STIMULATOR_ENABLE
@ TS_ETB_STOP_AUTOTUNE
@ TS_WRITE_FLASH
@ TS_ETB_DISABLE_JAM_DETECT
@ COMMAND_X14_UNUSED_2
@ TS_SD_FORMAT
@ COMMAND_X14_UNUSED_0
@ TS_SD_MOUNT_PC
@ TS_GRAB_PEDAL_UP
@ TS_ETB_AUTOCAL_0_FAST
@ TS_START_STOP_ENGINE
@ COMMAND_X14_UNUSED_4
@ COMMAND_X14_UNUSED_5
@ TS_SD_UNMOUNT
@ TS_ETB_AUTOCAL_0
@ TS_RESET_TLE8888
@ TS_ETB_AUTOCAL_1
@ TS_TRIGGER_STIMULATOR_DISABLE
@ TS_SD_MOUNT_ECU
@ TS_ETB_RESET
@ TS_RESET_MC33810
@ TS_EWG_AUTOCAL_0_FAST
@ COMMAND_X14_UNUSED_1
@ TS_EWG_AUTOCAL_0
@ TS_ETB_START_AUTOTUNE
@ TS_GRAB_PEDAL_WOT
@ TS_GRAB_TPS_OPEN
@ TS_SD_DELETE_REPORTS
@ COMMAND_X14_UNUSED_15
@ TS_ETB_AUTOCAL_1_FAST
@ COMMAND_X14_UNUSED_3
@ TS_EXTERNAL_TRIGGER_STIMULATOR_ENABLE
@ TS_WIDEBAND_UPDATE
bench_mode_e
@ LUA_COMMAND_3
@ BENCH_AC_COMPRESSOR_RELAY
@ LUA_COMMAND_9
@ LUA_COMMAND_2
@ BENCH_FAN_RELAY
@ BENCH_CANCEL
@ BENCH_GPPWM3_VALVE
@ BENCH_VVT0_VALVE
@ BENCH_AUXOUT4
@ BENCH_AUXOUT2
@ LUA_COMMAND_1
@ BENCH_MAIN_RELAY
@ LUA_COMMAND_7
@ BENCH_AUXOUT7
@ HD_ACR2
@ BENCH_IDLE_VALVE
@ LTFT_APPLY_TO_VE
@ LTFT_DEV_POKE
@ HD_ACR
@ BENCH_AUXOUT3
@ BENCH_GPPWM4_VALVE
@ BENCH_CHECK_ENGINE_LIGHT
@ BENCH_VVT3_VALVE
@ LUA_COMMAND_6
@ BENCH_GPPWM2_VALVE
@ BENCH_AUXOUT5
@ LUA_COMMAND_4
@ BENCH_AUXOUT1
@ BENCH_VVT1_VALVE
@ BENCH_STARTER_DISABLE_RELAY
@ BENCH_AUXOUT0
@ BENCH_FAN_RELAY_2
@ LTFT_RESET
@ BENCH_GPPWM1_VALVE
@ BENCH_HPFP_VALVE
@ BENCH_FUEL_PUMP
@ LUA_COMMAND_5
@ BENCH_AUXOUT6
@ BENCH_SECOND_IDLE_VALVE
@ LUA_COMMAND_10
@ BENCH_STARTER_ENABLE_RELAY
@ LUA_COMMAND_8
@ BENCH_VVT2_VALVE
trigger_type_e
@ TT_2JZ_3_34_SIMULATION_ONLY
@ TT_DODGE_NEON_1995_ONLY_CRANK
ts_command_e
@ TS_UNUSED_24
@ TS_WIDEBAND_SET_IDX_BY_ID
@ TS_COMMAND_4
@ TS_UNUSED_28
@ TS_COMMAND_15
@ TS_WIDEBAND
@ TS_UNUSED_26
@ TS_COMMAND_5
@ TS_CLEAR_WARNINGS
@ TS_COMMAND_9
@ TS_COMMAND_16
@ TS_BOARD_ACTION
@ TS_COMMAND_10
@ TS_SOLENOID_CATEGORY
@ TS_UNUSED_27
@ TS_LUA_OUTPUT_CATEGORY
@ TS_DEBUG_MODE
@ TS_COMMAND_11
@ TS_UNUSED_23
@ TS_SET_ENGINE_TYPE
@ TS_COMMAND_14
@ TS_COMMAND_13
@ TS_X14
@ TS_IGNITION_CATEGORY
@ TS_BENCH_CATEGORY
@ TS_COMMAND_6
@ TS_COMMAND_2
@ TS_WIDEBAND_SET_SENS_BY_ID
@ TS_COMMAND_8
@ TS_WIDEBAND_PING_BY_ID
@ TS_COMMAND_12
@ TS_COMMAND_3
@ TS_COMMAND_7
@ TS_WIDEBAND_FLASH_BY_ID
@ TS_SET_DEFAULT_ENGINE
@ TS_INJECTOR_CATEGORY
@ TS_COMMAND_1
@ TS_STOP_ENGINE