rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
rusefi_enums.h
Go to the documentation of this file.
1/**
2 * @file rusefi_enums.h
3 * @brief Fundamental rusEFI enumerable types live here
4 *
5 * This and few over headers are part of integration API between C/C++ and code generator for memory meta and java code.
6 * TODO: move enums which should not be visible outside of the firmware out of 'integration API' headers like this one
7 *
8 * @note this file should probably not include any other files
9 *
10 * @date Jan 14, 2014
11 * @author Andrey Belomutskiy, (c) 2012-2020
12 */
13
14#pragma once
15
16#include <rusefi/true_false.h>
17#include "efifeatures.h"
18#include "obd_error_codes.h"
19#include "engine_types.h"
20#include "engine_type_e.h"
21// we do not want to start the search for header from current folder so we use brackets here
22// https://stackoverflow.com/questions/21593/what-is-the-difference-between-include-filename-and-include-filename
23#include <rusefi_hw_enums.h>
24#include "rusefi_hw_pin_mode.h"
25
26#define PERCENT_MULT 100.0f
27#define PERCENT_DIV 0.01f
28
29/* diagnostic for brain pins
30 * can be combination of few bits
31 * defined as bit mask
32 * PIN_UNKNOWN is reported for pins with no diagnostic support, like on-chip gpio
33 */
34typedef enum __attribute__ ((__packed__))
35{
36 PIN_OK = 0,
37 PIN_OPEN = 0x01,
38 PIN_SHORT_TO_GND = 0x02,
39 PIN_SHORT_TO_BAT = 0x04,
40 PIN_OVERLOAD = 0x08,
41 PIN_DRIVER_OVERTEMP = 0x10,
42 PIN_DRIVER_OFF = 0x20,
43 PIN_UNKNOWN = 0x80
45
46// see also PWM_PHASE_MAX_WAVE_PER_PWM
47// todo: better names?
48enum class TriggerWheel : uint8_t {
49 T_PRIMARY = 0,
50 T_SECONDARY = 1,
51};
52
53typedef enum __attribute__ ((__packed__)) {
54 /**
55 * This mode is useful for troubleshooting and research - events are logged but no effects on phase synchronization
56 */
57 VVT_INACTIVE = 0,
58
59 /**
60 * Single tooth on the camshaft anywhere in the 720 degree cycle
61 */
62 VVT_SINGLE_TOOTH = 1,
63 /**
64 * Toyota 2JZ has three cam tooth. We pick one of these three tooth to synchronize based on the expected angle position of the event
65 */
66 VVT_TOYOTA_3_TOOTH = 2,
67 /**
68 * Mazda NB2 has three cam tooth. We synchronize based on gap ratio.
69 * @see TT_VVT_MIATA_NB
70 */
71 VVT_MIATA_NB = 3,
72
73 VVT_MITSUBISHI_4G69 = 4,
74
75 /**
76 * @see TT_VVT_BOSCH_QUICK_START
77 */
78 VVT_BOSCH_QUICK_START = 5,
79
80 /**
81 * 1.8l Toyota 1ZZ-FE https://rusefi.com/forum/viewtopic.php?f=3&t=1735
82 * 4 minus one
83 */
84 VVT_TOYOTA_4_1 = 6,
85
86 VVT_FORD_ST170 = 7,
87
88 VVT_BARRA_3_PLUS_1 = 8,
89
90 VVT_NISSAN_VQ = 9,
91
92 /**
93 * 4 equally spaced no way to sync
94 */
95 VVT_HONDA_K_INTAKE = 10,
96
97 VVT_NISSAN_MR = 11,
98
99 VVT_MITSUBISHI_3A92 = 12,
100
101 VVT_MAP_V_TWIN = 13,
102
103 VVT_CHRYSLER_PHASER = 14,
104
105 VVT_MAZDA_SKYACTIV = 15,
106
107 /**
108 * 4 plus one
109 */
110 VVT_HONDA_K_EXHAUST = 16,
111
112 VVT_UNUSED_17 = 17,
113 // also 4G92/93/94
114 VVT_MITSUBISHI_4G63 = 18,
115
116 VVT_FORD_COYOTE = 19,
117
118 VVT_MITSUBISHI_6G72 = 20,
119
120 VVT_HONDA_CBR_600 = 21,
121
122 VVT_MAZDA_L = 22,
123
124 VVT_DEV = 23,
125
126 VVT_HR12DDR_IN = 24,
127
128 VVT_CUSTOM_25 = 25,
129
130 VVT_CUSTOM_26 = 26,
131
132 VVT_TOYOTA_3TOOTH_UZ = 27,
133
134 VVT_SUBARU_7TOOTH = 28,
135
136 VVT_CUSTOM_1 = 29,
137
138 VVT_CUSTOM_2 = 30,
140
141typedef enum __attribute__ ((__packed__)) {
142 DM_NONE = 0,
143 DM_HD44780 = 1,
144 DM_HD44780_OVER_PCF8574 = 2,
145
146
148
149typedef enum __attribute__ ((__packed__)) {
150 TL_AUTO = 0,
151 TL_SEMI_AUTO = 1,
152 TL_MANUAL = 2,
153 TL_HALL = 3,
154
156
157typedef enum __attribute__ ((__packed__)) {
158 DWELL_2MS = 0,
159 DWELL_4MS = 1,
160 DWELL_8MS = 2,
161 DWELL_16MS = 3,
162 DWELL_32MS = 4,
163 DWELL_64MS = 5,
164
166
167enum class idle_mode_e : uint8_t {
168 /**
169 * In auto mode we currently have some pid-like-but-not really PID logic which is trying
170 * to get idle RPM to desired value by dynamically adjusting idle valve position.
171 * TODO: convert to PID
172 */
173 IM_AUTO = 0,
174 /**
175 * Manual idle control is extremely simple: user just specifies desired idle valve position
176 * which could be adjusted according to current CLT
177 */
178 IM_MANUAL = 1,
179
180};
181
182enum class SentEtbType : uint8_t {
183 NONE = 0,
184 GM_TYPE_1 = 1,
185 FORD_TYPE_1 = 2,
186 CUSTOM = 3,
187};
188
189enum class SentFuelHighPressureType : uint8_t {
190 NONE = 0,
191 GM_TYPE = 1,
192};
193
194enum class SentInput : uint8_t {
195 NONE = 0,
196 INPUT1 = 1,
197 INPUT2 = 2,
198 INPUT3 = 3,
199 INPUT4 = 4,
200 INPUT5 = 5,
201 INPUT6 = 6,
202 INPUT7 = 7
203};
204
205enum class CanGpioType : uint8_t {
206 NONE = 0,
207 DRT = 1,
208 MS = 2,
209};
210
211enum class MsIoBoxId : uint8_t {
212 OFF = 0,
213 ID200 = 1,
214 ID220 = 2,
215 ID240 = 3
216};
217
218enum class MsIoBoxVss : uint8_t {
219 OFF = 0,
220 VR12 = 1,
221 HALL34 = 2,
222 ALL1234 = 3
223};
224
225enum class UiMode : uint8_t {
226 FULL = 0,
227 INSTALLATION = 1,
228 TUNING = 2,
229};
230
231typedef enum __attribute__ ((__packed__)) {
232 /**
233 * GND for logical OFF, VCC for logical ON
234 */
235 OM_DEFAULT = 0,
236 /**
237 * GND for logical ON, VCC for logical OFF
238 */
239 OM_INVERTED = 1,
240 /**
241 * logical OFF is floating, logical ON is GND
242 */
243 OM_OPENDRAIN = 2,
244 OM_OPENDRAIN_INVERTED = 3
246
247typedef enum __attribute__ ((__packed__)) {
248 PI_DEFAULT = 0,
249 PI_PULLUP = 1,
250 PI_PULLDOWN = 2,
251 /**
252 * bit 2 is used as inverted flag, so skip one here
253 */
254 PI_INVERTED_DEFAULT = 4,
255 PI_INVERTED_PULLUP = 5,
256 PI_INVERTED_PULLDOWN = 6
258
259/**
260 * @see getCycleDuration
261 * @see getEngineCycle
262 */
263// todo: better enum name
264typedef enum {
266 /**
267 * 720 degree engine cycle but trigger is defined using a 360 cycle which is when repeated.
268 * For historical reasons we have a pretty weird approach where one crank trigger revolution is
269 * defined as if it's stretched to 720 degrees. See CRANK_MODE_MULTIPLIER
270 */
272 /**
273 * 720 degree engine and trigger cycle
274 */
276 /**
277 * 360 degree cycle
278 */
280
281 /**
282 * 720 degree engine cycle but trigger is defined using a 180 cycle which is when repeated three more times
283 * In other words, same pattern is repeated on the crank wheel twice.
284 */
286
287 /**
288 * Same pattern repeated three times on crank wheel. Crazy, I know!
289 */
291
292 // Same pattern TWELVE TIMES on the crank wheel!
293 // This usually means Honda, which often has a 12 tooth crank wheel or 24 tooth cam wheel
294 // without a missing tooth, plus a single tooth cam channel to resolve the engine phase.
296
297 /**
298 * Same pattern repeated six times on crank wheel like 1995 Lamborghini Diablo
299 */
302
303/**
304 * @brief Ignition Mode
305 */
306typedef enum __attribute__ ((__packed__)) {
307 /**
308 * in this mode only SPARKOUT_1_OUTPUT is used
309 */
310 IM_ONE_COIL = 0,
311 /**
312 * in this mode we use as many coils as we have cylinders
313 */
314 IM_INDIVIDUAL_COILS = 1,
315 IM_WASTED_SPARK = 2,
316
317 /**
318 * some v12 engines line BMW M70 and M73 run two distributors, one for each bank of cylinders
319 */
320 IM_TWO_COILS = 3,
321
323
324/**
325 * @see getNumberOfInjections
326 */
327typedef enum __attribute__ ((__packed__)) {
328 /**
329 * each cylinder has it's own injector but they all works in parallel
330 */
331 IM_SIMULTANEOUS = 0,
332 /**
333 * each cylinder has it's own injector, each injector is wired separately
334 */
335 IM_SEQUENTIAL = 1,
336 /**
337 * each cylinder has it's own injector but these injectors work in pairs. Injectors could be wired in pairs or separately.
338 * Each pair is fired once per engine cycle
339 * todo: we might want to implement one additional mode where each pair of injectors is floating twice per engine cycle.
340 * todo: this could reduce phase offset from injection to stroke but would not work great for large injectors
341 */
342 IM_BATCH = 2,
343 /**
344 * only one injector located in throttle body
345 */
346 IM_SINGLE_POINT = 3,
347
349
350typedef enum __attribute__ ((__packed__)) {
351 UART_NONE = 0,
352 UART_DEVICE_1 = 1,
353 UART_DEVICE_2 = 2,
354 UART_DEVICE_3 = 3,
355 UART_DEVICE_4 = 4,
357
358/**
359 * See spi3mosiPin
360 * See spi2MisoMode
361 */
362typedef enum __attribute__ ((__packed__)) {
363 SPI_NONE = 0,
364 SPI_DEVICE_1 = 1,
365 SPI_DEVICE_2 = 2,
366 SPI_DEVICE_3 = 3,
367 SPI_DEVICE_4 = 4,
368 SPI_DEVICE_5 = 5,
369 SPI_DEVICE_6 = 6,
371
372#define SPI_TOTAL_COUNT 6
373
374typedef enum __attribute__ ((__packed__)) {
375 BMW_e46 = 0,
376 W202 = 1,
377 BMW_e90 = 2,
378 NISSAN_350 = 3,
379 HYUNDAI_PB = 4,
380 HONDA_CIVIC9 = 5,
382
383/**
384 * inertia measurement unit, yawn accelerometer
385 * By the way both kinds of BOSCH use Housing : TE 1-967640-1, pins 144969-1 seal 967056-1 plug 967067-2
386 */
387typedef enum __attribute__ ((__packed__)) {
388 IMU_NONE = 0,
389 IMU_VAG = 1,
390 /**
391 * f037000002
392 * https://github.com/rusefi/rusefi_documentation/blob/master/OEM-Docs/Bosch/Data%20Sheet_68903691_Acceleration_Sensor_MM5.10.pdf
393 */
394 IMU_MM5_10 = 2,
395 IMU_TYPE_3 = 3,
396 IMU_TYPE_4 = 4,
397 /**
398 * Mercedes pn: A 006 542 26 18
399 * Almost the same as BOSCH above, but XY only and different CAN IDs
400 */
401 IMU_TYPE_MB_A0065422618 = 5,
403
404typedef enum __attribute__ ((__packed__)) {
405 ES_BPSX_D1 = 0,
406 /**
407 * same as innovate LC2
408 * 0v->7.35afr, 5v->22.39
409 */
410 ES_Innovate_MTX_L = 1,
411 /**
412 * Same as AEM
413 * 0v->10.0afr
414 * 5v->20.0afr
415 */
416 ES_14Point7_Free = 2,
417
418 ES_PLX = 4,
419
420 ES_Custom = 5,
421
422 ES_AEM = 6,
423
425
426typedef enum __attribute__ ((__packed__)) {
427 MT_CUSTOM = 0,
428 MT_DENSO183 = 1,
429 /**
430 * 20 to 250 kPa (2.9 to 36.3 psi) 0.2 to 4.9 V OUTPUT
431 */
432 MT_MPX4250 = 2,
433 MT_HONDA3BAR = 3,
434 MT_DODGE_NEON_2003 = 4,
435 /**
436 * 22012AA090
437 */
438 MT_SUBY_DENSO = 5,
439 /**
440 * 16040749
441 */
442 MT_GM_3_BAR = 6,
443
444 /**
445 * 20 to 105 kPa (2.9 to 15.2 psi) 0.3 to 4.9 V Output
446 */
447 MT_MPX4100 = 7,
448
449 /**
450 * http://rusefi.com/forum/viewtopic.php?f=3&t=906&p=18976#p18976
451 * Toyota 89420-02010
452 */
453 MT_TOYOTA_89420_02010 = 8,
454
455 /**
456 * 20 to 250 kPa (2.9 to 36.3 psi) 0.25 to 4.875 OUTPUT
457 * More precise calibration data for new NXP sensor revisions MPX4250A and MPXA4250A.
458 * For an old Freescale MPX4250D use "MT_MPX4250".
459 * See https://www.nxp.com/docs/en/data-sheet/MPX4250A.pdf
460 */
461 MT_MPX4250A = 9,
462
463
464 /**
465 * Bosch 2.5 Bar TMap Map Sensor with IAT
466 * 20 kPa at 0.40V, 250 kPa at 4.65V
467 * 4 pin:
468 * Pin 1 : Sensor Ground
469 * Pin 2 : Temp Signal
470 * Pin 3 : 5v
471 * Pin 4 : Map Signal
472 * Volkswagen Passat B6
473 */
474
475 MT_BOSCH_2_5 = 10,
476
477 MT_MAZDA_1_BAR = 11,
478
479 MT_GM_2_BAR = 12,
480
481 MT_GM_1_BAR = 13,
482
483 /**
484 * 4 bar
485 */
486 MT_MPXH6400 = 14,
487 /**
488 * 3 bar
489 */
490 MT_MPXH6300 = 15,
491
493
494typedef enum {
501
502} gear_e;
503
504typedef enum __attribute__ ((__packed__)) {
505 /**
506 * This is the default mode in which ECU controls timing dynamically
507 */
508 TM_DYNAMIC = 0,
509 /**
510 * Fixed timing is useful while you are playing with a timing gun - you need to have fixed
511 * timing if you want to install your distributor at some specific angle
512 */
513 TM_FIXED = 1,
514
516
517 /* I am confused: wingdi.h has CCNONE meaning TODO migrate to proper enum! */
518typedef enum __attribute__ ((__packed__)) {
519 CCNONE = 0,
520 CC_BRAKE = 1,
521 CC_CLUTCH = 2,
523
524/**
525 * Net Body Computer types
526 */
527typedef enum __attribute__ ((__packed__)) {
528 CAN_BUS_NBC_NONE = 0,
529 CAN_BUS_NBC_FIAT = 1,
530 CAN_BUS_NBC_VAG = 2,
531 CAN_BUS_MAZDA_RX8 = 3,
532 CAN_BUS_BMW_E46 = 4,
533 CAN_BUS_W202_C180 = 5,
534 CAN_BUS_BMW_E90 = 6,
535 CAN_BUS_Haltech = 7,
536 CAN_BUS_MQB = 8,
537 CAN_BUS_NISSAN_VQ = 9,
538 CAN_BUS_GENESIS_COUPE = 10,
539 CAN_BUS_HONDA_K = 11,
540 CAN_AIM_DASH = 12,
541 CAN_BUS_MS_SIMPLE_BROADCAST = 13,
542
544
545typedef enum __attribute__ ((__packed__)) {
546 TCHARGE_MODE_RPM_TPS = 0,
547 TCHARGE_MODE_AIR_INTERP = 1,
548 TCHARGE_MODE_AIR_INTERP_TABLE = 2,
549
551
552typedef enum __attribute__ ((__packed__)) {
553 INIT = 0,
554 TPS_THRESHOLD = 1,
555 RPM_DEAD_ZONE = 2,
556 PID_VALUE = 4,
557 PID_UPPER = 16,
558 BLIP = 64,
559
561
562// todo: should this be just a boolean?
563typedef enum __attribute__ ((__packed__)) {
564 OPEN_LOOP = 0,
565 CLOSED_LOOP = 1,
566
568
569typedef enum __attribute__ ((__packed__)) {
570 SWITCH_INPUT_LAUNCH = 0,
571 CLUTCH_INPUT_LAUNCH = 1,
572 ALWAYS_ACTIVE_LAUNCH = 2,
573 STOP_INPUT_LAUNCH = 3,
574 LUA_LAUNCH = 4,
576
577typedef enum __attribute__ ((__packed__)) {
578 TORQUE_REDUCTION_BUTTON = 0,
579 LAUNCH_BUTTON = 1,
580 TORQUE_REDUCTION_CLUTCH_DOWN_SWITCH = 2,
581 TORQUE_REDUCTION_CLUTCH_UP_SWITCH = 3,
583
584typedef enum __attribute__ ((__packed__)) {
585 DIGITAL_SWITCH_INPUT = 0,
586 LUA_GAUGE = 1,
588
589typedef enum __attribute__ ((__packed__)) {
590 LUA_GAUGE_1 = 0,
591 LUA_GAUGE_2 = 1,
592 LUA_GAUGE_3 = 2,
593 LUA_GAUGE_4 = 3,
594 LUA_GAUGE_5 = 4,
595 LUA_GAUGE_6 = 5,
596 LUA_GAUGE_7 = 6,
597 LUA_GAUGE_8 = 7,
599
600typedef enum __attribute__ ((__packed__)) {
601 LUA_GAUGE_LOWER_BOUND = 0,
602 LUA_GAUGE_UPPER_BOUND = 1,
604
605// this one is "Rotational Idle", it's a naming mess https://github.com/rusefi/rusefi/issues/8435
606typedef enum __attribute__ ((__packed__)) {
607 SWITCH_INPUT_ANTILAG = 0,
608 ALWAYS_ON_ANTILAG = 1,
609 LUA_ANTILAG = 2,
611
612typedef enum __attribute__ ((__packed__)) {
613 GPPWM_Zero = 0,
614 GPPWM_Tps = 1,
615 GPPWM_Map = 2,
616 GPPWM_Clt = 3,
617 GPPWM_Iat = 4,
618 GPPWM_FuelLoad = 5,
619 GPPWM_IgnLoad = 6,
620 GPPWM_AuxTemp1 = 7,
621 GPPWM_AuxTemp2 = 8,
622 GPPWM_AccelPedal = 9,
623 GPPWM_Vbatt = 10,
624 GPPWM_VVT_1I = 11,
625 GPPWM_VVT_1E = 12,
626 GPPWM_VVT_2I = 13,
627 GPPWM_VVT_2E = 14,
628 GPPWM_EthanolPercent = 15,
629 GPPWM_AuxLinear1 = 16,
630 GPPWM_AuxLinear2 = 17,
631 GPPWM_GppwmOutput1 = 18,
632 GPPWM_GppwmOutput2 = 19,
633 GPPWM_GppwmOutput3 = 20,
634 GPPWM_GppwmOutput4 = 21,
635 GPPWM_LuaGauge1 = 22,
636 GPPWM_LuaGauge2 = 23,
637 GPPWM_Rpm = 24,
638 GPPWM_DetectedGear = 25,
639 GPPWM_BaroPressure = 26,
640 GPPWM_Egt1 = 27,
641 GPPWM_Egt2 = 28,
642 GPPWM_AuxLinear3 = 29,
643 GPPWM_AuxLinear4 = 30,
644 GPPWM_VehicleSpeed = 31,
645 GPPWM_OilPressure = 32,
646 GPPWM_OilTemp = 33,
647 GPPWM_FuelPressure = 34,
648 GPPWM_ThrottleRatio = 35,
649 // remember to manually sync 'pwmAxisLabels' in tunerstudio.template.ini
650 // todo: rename 'pwmAxisLabels' and maybe even gppwm_channel_e since we now use wider than just 'gppwm'?
652
653typedef enum __attribute__ ((__packed__)) {
654 B33KBPS = 0, // 33.33kbps
655 B50KBPS = 1, // 50kbps
656 B83KBPS = 2, // 83.33kbps
657 B100KBPS = 3, // 100kbps
658 B125KBPS = 4, // 125kbps
659 B250KBPS = 5, // 250kbps
660 B500KBPS = 6, // 500kbps
661 B666KBPS = 7, // 666kbps
662 B1MBPS = 8, // 1Mbps
664
665typedef enum __attribute__ ((__packed__)) {
666 RUSEFI = 0,
667 AEM = 1,
668 DISABLED = 2
670
671typedef enum __attribute__ ((__packed__)) {
672 WBO_RE_IDLE = 0,
673 WBO_RE_DONE = 1,
674 WBO_RE_BUSY = 2,
675 WBO_RE_FAILED = 3
677
678typedef enum __attribute__((__packed__)) {
679 WBO_RE_ID1 = 0,
680 WBO_RE_ID2 = 1,
681 WBO_RE_ID3 = 2,
682 WBO_RE_ID4 = 3,
683 WBO_RE_ID5 = 4,
684 WBO_RE_ID6 = 5,
685 WBO_RE_ID7 = 6,
686 WBO_RE_ID8 = 7,
687 WBO_RE_ID9 = 8,
688 WBO_RE_ID10 = 9,
689 WBO_RE_ID11 = 10,
690 WBO_RE_ID12 = 11,
691 WBO_RE_ID13 = 12,
692 WBO_RE_ID14 = 13,
693 WBO_RE_ID15 = 14,
694 WBO_RE_ID16 = 15
696
697// Hardware index, usually strapped by cfg pins and pull-up/pull-down resistors
698typedef enum __attribute__((__packed__)) {
699 WBO_RE_HWIDX0 = 0,
700 WBO_RE_HWIDX1 = 1,
701 WBO_RE_HWIDX2 = 2,
702 WBO_RE_HWIDX3 = 3,
703 WBO_RE_HWIDX4 = 4,
704 WBO_RE_HWIDX5 = 5,
705 WBO_RE_HWIDX6 = 6,
706 WBO_RE_HWIDX7 = 7,
708
709typedef enum __attribute__((__packed__)) {
710 WBO_AEM_ID1 = 0,
711 WBO_AEM_ID2 = 1,
712 WBO_AEM_ID3 = 2,
713 WBO_AEM_ID4 = 3,
714 WBO_AEM_ID5 = 4,
715 WBO_AEM_ID6 = 5,
716 WBO_AEM_ID7 = 6,
717 WBO_AEM_ID8 = 7,
718 WBO_AEM_ID9 = 8,
719 WBO_AEM_ID10 = 9,
720 WBO_AEM_ID11 = 10,
721 WBO_AEM_ID12 = 11,
722 WBO_AEM_ID13 = 12,
723 WBO_AEM_ID14 = 13,
724 WBO_AEM_ID15 = 14,
725 WBO_AEM_ID16 = 15
727
728typedef enum __attribute__ ((__packed__)) {
729 GPPWM_GreaterThan = 0,
730 GPPWM_LessThan = 1,
732
733typedef enum __attribute__ ((__packed__)) {
734 VE_None = 0,
735 VE_MAP = 1,
736 VE_TPS = 2,
738
739typedef enum __attribute__ ((__packed__)) {
740 AFR_None = 0,
741 AFR_MAP = 1,
742 AFR_Tps = 2,
743 AFR_AccPedal = 3,
744 AFR_CylFilling = 4,
746
747typedef enum __attribute__ ((__packed__)) {
748 DC_None = 0,
749 DC_Throttle1 = 1,
750 DC_Throttle2 = 2,
751 // this is about SINGLE DC-motor idle valve like 90s volkswagen/earlier M111 engines
752 // NOT to be used in dual H-bridge stepper control
753 DC_IdleValve = 3,
754 DC_Wastegate = 4,
756
757typedef enum __attribute__ ((__packed__)) {
758 STEPPER_FULL = 0,
759 STEPPER_HALF = 2,
760 STEPPER_FOURTH = 4,
761 STEPPER_EIGHTH = 8,
763
764typedef enum __attribute__ ((__packed__)) {
765 IPT_Low = 0,
766 IPT_High = 1,
768
769typedef enum __attribute__ ((__packed__)) {
770 ICM_None = 0,
771 ICM_FixedRailPressure = 1,
772 ICM_SensedRailPressure = 2,
773 ICM_HPFP_Manual_Compensation = 3,
775
776typedef enum __attribute__ ((__packed__)) {
777 FPM_Absolute = 0,
778 FPM_Gauge = 1,
779 FPM_Differential = 2,
781
782typedef enum __attribute__ ((__packed__)) {
783 INJ_None = 0,
784 INJ_PolynomialAdder = 1,
785 INJ_FordModel = 2,
787
788typedef enum __attribute__ ((__packed__)) {
789 HPFP_CAM_NONE = 0,
790 HPFP_CAM_IN1 = 1,
791 HPFP_CAM_EX1 = 2,
792 HPFP_CAM_IN2 = 3,
793 HPFP_CAM_EX2 = 4,
795
796// IMPORTANT: This enum must be kept in sync with the definition in rusefi_config.txt
797typedef enum __attribute__ ((__packed__)) {
798 AE_MODE_MS_ADDER = 0,
799 AE_MODE_PERCENT_ADDER = 1,
800 AE_MODE_PREDICTIVE_MAP = 2,
802
803#if __cplusplus
804#include <cstdint>
805
806enum class TsCalMode : uint8_t {
807 None = 0,
808 Tps1Max = 1,
809 Tps1Min = 2,
810 EtbKp = 3,
811 EtbKi = 4,
812 EtbKd = 5,
815 Tps2Max = 8,
816 Tps2Min = 9,
817 Tps2SecondaryMax = 10,
818 Tps2SecondaryMin = 11,
819 PedalMin = 12,
820 PedalMax = 13,
821 EwgPosMax = 14,
822 EwgPosMin = 15,
823};
824
825enum class GearControllerMode : uint8_t {
826 None = 0,
827 ButtonShift = 1,
828 Automatic = 2,
829 Generic = 3,
830};
831
832enum class TransmissionControllerMode : uint8_t {
833 None = 0,
835 Generic4 = 2,
836 Gm4l6x = 3,
837};
838
839enum class InjectionTimingMode : uint8_t {
840 End = 0,
841 Start = 1,
842 Center = 2,
843};
844
845enum class SelectedGear : uint8_t {
846 Invalid = 0,
847 ManualPlus = 1,
848 ManualMinus = 2,
849 Park = 3,
850 Reverse = 4,
851 Neutral = 5,
852 Drive = 6,
853 Manual = 7,
854 Manual3 = 8,
855 Manual2 = 9,
856 Manual1 = 10,
857 Low = 11,
858};
859
860#define SC_Exhaust_First 1
861
862typedef enum __attribute__ ((__packed__)) {
863 stftEnabled = 0,
864 stftDisabledSettings = 1,
865 stftDisabledTuning = 2,
866 stftDisabledRPM = 3,
867 stftDisabledCrankingDelay = 4,
868 stftDisabledClt = 5,
869 // below state related to learning only
870 stftDisabledAfrOurOfRange = 6,
871 stftDisabledDFCO = 7,
872 stftDisabledTpsAccel = 8,
873 stftDisabledFuelCut = 9
875
876typedef enum __attribute__((__packed__)) {
877 ftRegionIdle = 0,
878 ftRegionOverrun = 1,
879 ftRegionPower = 2,
880 ftRegionCruise = 3,
882
883#endif // __cplusplus
884
886
887using namespace rusefi::generated::enums;
typedef __attribute__
Ignition Mode.
Standard and custom OBD-II error codes.
TsCalMode
@ Tps1SecondaryMax
@ Tps2SecondaryMax
@ Tps2SecondaryMin
@ Tps1SecondaryMin
idle_state_e
ve_override_e
idle_mode_e
MsIoBoxVss
launchActivationMode_e
can_wbo_re_hwidx_e
ft_region_e
can_wbo_aem_id_e
stft_state_e
InjectorNonlinearMode
boostType_e
MsIoBoxId
tle8888_mode_e
gear_e
@ GEAR_2
@ REVERSE
@ GEAR_1
@ GEAR_4
@ NEUTRAL
@ GEAR_3
cranking_condition_e
lua_gauge_e
mc33810maxDwellTimer_e
ignition_mode_e
vvt_mode_e
stepper_num_micro_steps_e
gppwm_channel_e
air_pressure_sensor_type_e
can_wbo_type_e
dc_function_e
can_wbo_re_id_e
SentInput
ego_sensor_e
load_override_e
injector_pressure_type_e
SentFuelHighPressureType
injector_compensation_mode_e
SentEtbType
operation_mode_e
@ FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR
@ FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR
@ FOUR_STROKE_THREE_TIMES_CRANK_SENSOR
@ FOUR_STROKE_CRANK_SENSOR
@ OM_NONE
@ FOUR_STROKE_CAM_SENSOR
@ TWO_STROKE
@ FOUR_STROKE_SIX_TIMES_CRANK_SENSOR
uart_device_e
InjectionTimingMode
nitrous_arming_method_e
can_vss_nbc_e
can_wbo_re_status_e
CanGpioType
spi_device_e
pin_input_mode_e
fuel_pressure_sensor_mode_e
hpfp_cam_e
can_baudrate_e
gppwm_compare_mode_e
antiLagActivationMode_e
injection_mode_e
display_mode_e
timing_mode_e
SelectedGear
can_nbc_e
brain_pin_diag_e
UiMode
@ INSTALLATION
TriggerWheel
imu_type_e
torqueReductionActivationMode_e
TransmissionControllerMode
pin_output_mode_e
tChargeMode_e
GearControllerMode
accel_enrichment_mode_e
lua_gauge_meaning_e