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_BMW_N63TU = 17,
113
114 // also 4G92/93/94
115 VVT_MITSUBISHI_4G63 = 18,
116
117 VVT_FORD_COYOTE = 19,
118
119 VVT_MITSUBISHI_6G72 = 20,
120
121 VVT_HONDA_CBR_600 = 21,
122
123 VVT_MAZDA_L = 22,
124
125 VVT_DEV = 23,
126
127 VVT_HR12DDR_IN = 24,
128
129 VVT_CUSTOM_25 = 25,
130
131 VVT_CUSTOM_26 = 26,
132
133 VVT_TOYOTA_3TOOTH_UZ = 27,
134
135 VVT_SUBARU_7TOOTH = 28,
136
137 VVT_CUSTOM_1 = 29,
138
139 VVT_CUSTOM_2 = 30,
140
142
143typedef enum __attribute__ ((__packed__)) {
144 DM_NONE = 0,
145 DM_HD44780 = 1,
146 DM_HD44780_OVER_PCF8574 = 2,
147
148
150
151typedef enum __attribute__ ((__packed__)) {
152 TL_AUTO = 0,
153 TL_SEMI_AUTO = 1,
154 TL_MANUAL = 2,
155 TL_HALL = 3,
156
158
159typedef enum __attribute__ ((__packed__)) {
160 DWELL_2MS = 0,
161 DWELL_4MS = 1,
162 DWELL_8MS = 2,
163 DWELL_16MS = 3,
164 DWELL_32MS = 4,
165 DWELL_64MS = 5,
166
168
169enum class idle_mode_e : uint8_t {
170 /**
171 * In auto mode we currently have some pid-like-but-not really PID logic which is trying
172 * to get idle RPM to desired value by dynamically adjusting idle valve position.
173 * TODO: convert to PID
174 */
175 IM_AUTO = 0,
176 /**
177 * Manual idle control is extremely simple: user just specifies desired idle valve position
178 * which could be adjusted according to current CLT
179 */
180 IM_MANUAL = 1,
181
182};
183
184enum class SentEtbType : uint8_t {
185 NONE = 0,
186 GM_TYPE_1 = 1,
187 FORD_TYPE_1 = 2,
188 CUSTOM = 3,
189};
190
191enum class SentFuelHighPressureType : uint8_t {
192 NONE = 0,
193 GM_TYPE = 1,
194};
195
196enum class SentInput : uint8_t {
197 NONE = 0,
198 INPUT1 = 1,
199 INPUT2 = 2,
200 INPUT3 = 3,
201 INPUT4 = 4,
202 INPUT5 = 5,
203 INPUT6 = 6,
204 INPUT7 = 7
205};
206
207enum class CanGpioType : uint8_t {
208 NONE = 0,
209 DRT = 1,
210 MS = 2,
211};
212
213enum class MsIoBoxId : uint8_t {
214 OFF = 0,
215 ID200 = 1,
216 ID220 = 2,
217 ID240 = 3
218};
219
220enum class MsIoBoxVss : uint8_t {
221 OFF = 0,
222 VR12 = 1,
223 HALL34 = 2,
224 ALL1234 = 3
225};
226
227enum class UiMode : uint8_t {
228 FULL = 0,
229 INSTALLATION = 1,
230 TUNING = 2,
231};
232
233typedef enum __attribute__ ((__packed__)) {
234 /**
235 * GND for logical OFF, VCC for logical ON
236 */
237 OM_DEFAULT = 0,
238 /**
239 * GND for logical ON, VCC for logical OFF
240 */
241 OM_INVERTED = 1,
242 /**
243 * logical OFF is floating, logical ON is GND
244 */
245 OM_OPENDRAIN = 2,
246 OM_OPENDRAIN_INVERTED = 3
248
249typedef enum __attribute__ ((__packed__)) {
250 PI_DEFAULT = 0,
251 PI_PULLUP = 1,
252 PI_PULLDOWN = 2,
253 /**
254 * bit 2 is used as inverted flag, so skip one here
255 */
256 PI_INVERTED_DEFAULT = 4,
257 PI_INVERTED_PULLUP = 5,
258 PI_INVERTED_PULLDOWN = 6
260
261/**
262 * @see getCycleDuration
263 * @see getEngineCycle
264 */
265// todo: better enum name
266typedef enum {
268 /**
269 * 720 degree engine cycle but trigger is defined using a 360 cycle which is when repeated.
270 * For historical reasons we have a pretty weird approach where one crank trigger revolution is
271 * defined as if it's stretched to 720 degrees. See CRANK_MODE_MULTIPLIER
272 */
274 /**
275 * 720 degree engine and trigger cycle
276 */
278 /**
279 * 360 degree cycle
280 */
282
283 /**
284 * 720 degree engine cycle but trigger is defined using a 180 cycle which is when repeated three more times
285 * In other words, same pattern is repeated on the crank wheel twice.
286 */
288
289 /**
290 * Same pattern repeated three times on crank wheel. Crazy, I know!
291 */
293
294 // Same pattern TWELVE TIMES on the crank wheel!
295 // This usually means Honda, which often has a 12 tooth crank wheel or 24 tooth cam wheel
296 // without a missing tooth, plus a single tooth cam channel to resolve the engine phase.
298
299 /**
300 * Same pattern repeated six times on crank wheel like 1995 Lamborghini Diablo
301 */
304
305/**
306 * @brief Ignition Mode
307 */
308typedef enum __attribute__ ((__packed__)) {
309 /**
310 * in this mode only SPARKOUT_1_OUTPUT is used
311 */
312 IM_ONE_COIL = 0,
313 /**
314 * in this mode we use as many coils as we have cylinders
315 */
316 IM_INDIVIDUAL_COILS = 1,
317 IM_WASTED_SPARK = 2,
318
319 /**
320 * some v12 engines line BMW M70 and M73 run two distributors, one for each bank of cylinders
321 */
322 IM_TWO_COILS = 3,
323
325
326/**
327 * @see getNumberOfInjections
328 */
329typedef enum __attribute__ ((__packed__)) {
330 /**
331 * each cylinder has it's own injector but they all works in parallel
332 */
333 IM_SIMULTANEOUS = 0,
334 /**
335 * each cylinder has it's own injector, each injector is wired separately
336 */
337 IM_SEQUENTIAL = 1,
338 /**
339 * each cylinder has it's own injector but these injectors work in pairs. Injectors could be wired in pairs or separately.
340 * Each pair is fired once per engine cycle
341 * todo: we might want to implement one additional mode where each pair of injectors is floating twice per engine cycle.
342 * todo: this could reduce phase offset from injection to stroke but would not work great for large injectors
343 */
344 IM_BATCH = 2,
345 /**
346 * only one injector located in throttle body
347 */
348 IM_SINGLE_POINT = 3,
349
351
352typedef enum __attribute__ ((__packed__)) {
353 UART_NONE = 0,
354 UART_DEVICE_1 = 1,
355 UART_DEVICE_2 = 2,
356 UART_DEVICE_3 = 3,
357 UART_DEVICE_4 = 4,
359
360/**
361 * See spi3mosiPin
362 * See spi2MisoMode
363 */
364typedef enum __attribute__ ((__packed__)) {
365 SPI_NONE = 0,
366 SPI_DEVICE_1 = 1,
367 SPI_DEVICE_2 = 2,
368 SPI_DEVICE_3 = 3,
369 SPI_DEVICE_4 = 4,
370 SPI_DEVICE_5 = 5,
371 SPI_DEVICE_6 = 6,
373
374#define SPI_TOTAL_COUNT 6
375
376typedef enum __attribute__ ((__packed__)) {
377 BMW_e46 = 0,
378 W202 = 1,
379 BMW_e90 = 2,
380 NISSAN_350 = 3,
381 HYUNDAI_PB = 4,
382 HONDA_CIVIC9 = 5,
384
385/**
386 * inertia measurement unit, yawn accelerometer
387 * By the way both kinds of BOSCH use Housing : TE 1-967640-1, pins 144969-1 seal 967056-1 plug 967067-2
388 */
389typedef enum __attribute__ ((__packed__)) {
390 IMU_NONE = 0,
391 IMU_VAG = 1,
392 /**
393 * f037000002
394 * https://github.com/rusefi/rusefi_documentation/blob/master/OEM-Docs/Bosch/Data%20Sheet_68903691_Acceleration_Sensor_MM5.10.pdf
395 */
396 IMU_MM5_10 = 2,
397 IMU_TYPE_3 = 3,
398 IMU_TYPE_4 = 4,
399 /**
400 * Mercedes pn: A 006 542 26 18
401 * Almost the same as BOSCH above, but XY only and different CAN IDs
402 */
403 IMU_TYPE_MB_A0065422618 = 5,
405
406typedef enum __attribute__ ((__packed__)) {
407 ES_BPSX_D1 = 0,
408 /**
409 * same as innovate LC2
410 * 0v->7.35afr, 5v->22.39
411 */
412 ES_Innovate_MTX_L = 1,
413 /**
414 * Same as AEM
415 * 0v->10.0afr
416 * 5v->20.0afr
417 */
418 ES_14Point7_Free = 2,
419
420 ES_PLX = 4,
421
422 ES_Custom = 5,
423
424 ES_AEM = 6,
425
427
428typedef enum __attribute__ ((__packed__)) {
429 MT_CUSTOM = 0,
430 MT_DENSO183 = 1,
431 /**
432 * 20 to 250 kPa (2.9 to 36.3 psi) 0.2 to 4.9 V OUTPUT
433 */
434 MT_MPX4250 = 2,
435 MT_HONDA3BAR = 3,
436 MT_DODGE_NEON_2003 = 4,
437 /**
438 * 22012AA090
439 */
440 MT_SUBY_DENSO = 5,
441 /**
442 * 16040749
443 */
444 MT_GM_3_BAR = 6,
445
446 /**
447 * 20 to 105 kPa (2.9 to 15.2 psi) 0.3 to 4.9 V Output
448 */
449 MT_MPX4100 = 7,
450
451 /**
452 * http://rusefi.com/forum/viewtopic.php?f=3&t=906&p=18976#p18976
453 * Toyota 89420-02010
454 */
455 MT_TOYOTA_89420_02010 = 8,
456
457 /**
458 * 20 to 250 kPa (2.9 to 36.3 psi) 0.25 to 4.875 OUTPUT
459 * More precise calibration data for new NXP sensor revisions MPX4250A and MPXA4250A.
460 * For an old Freescale MPX4250D use "MT_MPX4250".
461 * See https://www.nxp.com/docs/en/data-sheet/MPX4250A.pdf
462 */
463 MT_MPX4250A = 9,
464
465
466 /**
467 * Bosch 2.5 Bar TMap Map Sensor with IAT
468 * 20 kPa at 0.40V, 250 kPa at 4.65V
469 * 4 pin:
470 * Pin 1 : Sensor Ground
471 * Pin 2 : Temp Signal
472 * Pin 3 : 5v
473 * Pin 4 : Map Signal
474 * Volkswagen Passat B6
475 */
476
477 MT_BOSCH_2_5 = 10,
478
479 MT_MAZDA_1_BAR = 11,
480
481 MT_GM_2_BAR = 12,
482
483 MT_GM_1_BAR = 13,
484
485 /**
486 * 4 bar
487 */
488 MT_MPXH6400 = 14,
489 /**
490 * 3 bar
491 */
492 MT_MPXH6300 = 15,
493
495
496typedef enum {
503
504} gear_e;
505
506typedef enum __attribute__ ((__packed__)) {
507 /**
508 * This is the default mode in which ECU controls timing dynamically
509 */
510 TM_DYNAMIC = 0,
511 /**
512 * Fixed timing is useful while you are playing with a timing gun - you need to have fixed
513 * timing if you want to install your distributor at some specific angle
514 */
515 TM_FIXED = 1,
516
518
519 /* I am confused: wingdi.h has CCNONE meaning TODO migrate to proper enum! */
520typedef enum __attribute__ ((__packed__)) {
521 CCNONE = 0,
522 CC_BRAKE = 1,
523 CC_CLUTCH = 2,
525
526/**
527 * Net Body Computer types
528 */
529typedef enum __attribute__ ((__packed__)) {
530 CAN_BUS_NBC_NONE = 0,
531 CAN_BUS_NBC_FIAT = 1,
532 CAN_BUS_NBC_VAG = 2,
533 CAN_BUS_MAZDA_RX8 = 3,
534 CAN_BUS_BMW_E46 = 4,
535 CAN_BUS_W202_C180 = 5,
536 CAN_BUS_BMW_E90 = 6,
537 CAN_BUS_Haltech = 7,
538 CAN_BUS_MQB = 8,
539 CAN_BUS_NISSAN_VQ = 9,
540 CAN_BUS_GENESIS_COUPE = 10,
541 CAN_BUS_HONDA_K = 11,
542 CAN_AIM_DASH = 12,
543 CAN_BUS_MS_SIMPLE_BROADCAST = 13,
544
546
547typedef enum __attribute__ ((__packed__)) {
548 TCHARGE_MODE_RPM_TPS = 0,
549 TCHARGE_MODE_AIR_INTERP = 1,
550 TCHARGE_MODE_AIR_INTERP_TABLE = 2,
551
553
554typedef enum __attribute__ ((__packed__)) {
555 INIT = 0,
556 TPS_THRESHOLD = 1,
557 RPM_DEAD_ZONE = 2,
558 PID_VALUE = 4,
559 PID_UPPER = 16,
560 BLIP = 64,
561
563
564// todo: should this be just a boolean?
565typedef enum __attribute__ ((__packed__)) {
566 OPEN_LOOP = 0,
567 CLOSED_LOOP = 1,
568
570
571typedef enum __attribute__ ((__packed__)) {
572 SWITCH_INPUT_LAUNCH = 0,
573 CLUTCH_INPUT_LAUNCH = 1,
574 ALWAYS_ACTIVE_LAUNCH = 2,
575 STOP_INPUT_LAUNCH = 3,
576 LUA_LAUNCH = 4,
578
579typedef enum __attribute__ ((__packed__)) {
580 TORQUE_REDUCTION_BUTTON = 0,
581 LAUNCH_BUTTON = 1,
582 TORQUE_REDUCTION_CLUTCH_DOWN_SWITCH = 2,
583 TORQUE_REDUCTION_CLUTCH_UP_SWITCH = 3,
585
586typedef enum __attribute__ ((__packed__)) {
587 DIGITAL_SWITCH_INPUT = 0,
588 LUA_GAUGE = 1,
590
591typedef enum __attribute__ ((__packed__)) {
592 LUA_GAUGE_1 = 0,
593 LUA_GAUGE_2 = 1,
594 LUA_GAUGE_3 = 2,
595 LUA_GAUGE_4 = 3,
596 LUA_GAUGE_5 = 4,
597 LUA_GAUGE_6 = 5,
598 LUA_GAUGE_7 = 6,
599 LUA_GAUGE_8 = 7,
601
602typedef enum __attribute__ ((__packed__)) {
603 LUA_GAUGE_LOWER_BOUND = 0,
604 LUA_GAUGE_UPPER_BOUND = 1,
606
607// this one is "Rotational Idle", it's a naming mess https://github.com/rusefi/rusefi/issues/8435
608typedef enum __attribute__ ((__packed__)) {
609 SWITCH_INPUT_ANTILAG = 0,
610 ALWAYS_ON_ANTILAG = 1,
611 LUA_ANTILAG = 2,
613
614typedef enum __attribute__ ((__packed__)) {
615 GPPWM_Zero = 0,
616 GPPWM_Tps = 1,
617 GPPWM_Map = 2,
618 GPPWM_Clt = 3,
619 GPPWM_Iat = 4,
620 GPPWM_FuelLoad = 5,
621 GPPWM_IgnLoad = 6,
622 GPPWM_AuxTemp1 = 7,
623 GPPWM_AuxTemp2 = 8,
624 GPPWM_AccelPedal = 9,
625 GPPWM_Vbatt = 10,
626 GPPWM_VVT_1I = 11,
627 GPPWM_VVT_1E = 12,
628 GPPWM_VVT_2I = 13,
629 GPPWM_VVT_2E = 14,
630 GPPWM_EthanolPercent = 15,
631 GPPWM_AuxLinear1 = 16,
632 GPPWM_AuxLinear2 = 17,
633 GPPWM_GppwmOutput1 = 18,
634 GPPWM_GppwmOutput2 = 19,
635 GPPWM_GppwmOutput3 = 20,
636 GPPWM_GppwmOutput4 = 21,
637 GPPWM_LuaGauge1 = 22,
638 GPPWM_LuaGauge2 = 23,
639 GPPWM_Rpm = 24,
640 GPPWM_DetectedGear = 25,
641 GPPWM_BaroPressure = 26,
642 GPPWM_Egt1 = 27,
643 GPPWM_Egt2 = 28,
644 GPPWM_AuxLinear3 = 29,
645 GPPWM_AuxLinear4 = 30,
646 GPPWM_VehicleSpeed = 31,
647 GPPWM_OilPressure = 32,
648 GPPWM_OilTemp = 33,
649 GPPWM_FuelPressure = 34,
650 GPPWM_ThrottleRatio = 35,
651 // remember to manually sync 'pwmAxisLabels' in tunerstudio.template.ini
652 // todo: rename 'pwmAxisLabels' and maybe even gppwm_channel_e since we now use wider than just 'gppwm'?
654
655typedef enum __attribute__ ((__packed__)) {
656 B33KBPS = 0, // 33.33kbps
657 B50KBPS = 1, // 50kbps
658 B83KBPS = 2, // 83.33kbps
659 B100KBPS = 3, // 100kbps
660 B125KBPS = 4, // 125kbps
661 B250KBPS = 5, // 250kbps
662 B500KBPS = 6, // 500kbps
663 B666KBPS = 7, // 666kbps
664 B1MBPS = 8, // 1Mbps
666
667typedef enum __attribute__ ((__packed__)) {
668 RUSEFI = 0,
669 AEM = 1,
670 DISABLED = 2
672
673typedef enum __attribute__ ((__packed__)) {
674 WBO_RE_IDLE = 0,
675 WBO_RE_DONE = 1,
676 WBO_RE_BUSY = 2,
677 WBO_RE_FAILED = 3
679
680typedef enum __attribute__((__packed__)) {
681 WBO_RE_ID1 = 0,
682 WBO_RE_ID2 = 1,
683 WBO_RE_ID3 = 2,
684 WBO_RE_ID4 = 3,
685 WBO_RE_ID5 = 4,
686 WBO_RE_ID6 = 5,
687 WBO_RE_ID7 = 6,
688 WBO_RE_ID8 = 7,
689 WBO_RE_ID9 = 8,
690 WBO_RE_ID10 = 9,
691 WBO_RE_ID11 = 10,
692 WBO_RE_ID12 = 11,
693 WBO_RE_ID13 = 12,
694 WBO_RE_ID14 = 13,
695 WBO_RE_ID15 = 14,
696 WBO_RE_ID16 = 15
698
699// Hardware index, usually strapped by cfg pins and pull-up/pull-down resistors
700typedef enum __attribute__((__packed__)) {
701 WBO_RE_HWIDX0 = 0,
702 WBO_RE_HWIDX1 = 1,
703 WBO_RE_HWIDX2 = 2,
704 WBO_RE_HWIDX3 = 3,
705 WBO_RE_HWIDX4 = 4,
706 WBO_RE_HWIDX5 = 5,
707 WBO_RE_HWIDX6 = 6,
708 WBO_RE_HWIDX7 = 7,
710
711typedef enum __attribute__((__packed__)) {
712 WBO_AEM_ID1 = 0,
713 WBO_AEM_ID2 = 1,
714 WBO_AEM_ID3 = 2,
715 WBO_AEM_ID4 = 3,
716 WBO_AEM_ID5 = 4,
717 WBO_AEM_ID6 = 5,
718 WBO_AEM_ID7 = 6,
719 WBO_AEM_ID8 = 7,
720 WBO_AEM_ID9 = 8,
721 WBO_AEM_ID10 = 9,
722 WBO_AEM_ID11 = 10,
723 WBO_AEM_ID12 = 11,
724 WBO_AEM_ID13 = 12,
725 WBO_AEM_ID14 = 13,
726 WBO_AEM_ID15 = 14,
727 WBO_AEM_ID16 = 15
729
730typedef enum __attribute__ ((__packed__)) {
731 GPPWM_GreaterThan = 0,
732 GPPWM_LessThan = 1,
734
735typedef enum __attribute__ ((__packed__)) {
736 VE_None = 0,
737 VE_MAP = 1,
738 VE_TPS = 2,
740
741typedef enum __attribute__ ((__packed__)) {
742 AFR_None = 0,
743 AFR_MAP = 1,
744 AFR_Tps = 2,
745 AFR_AccPedal = 3,
746 AFR_CylFilling = 4,
748
749typedef enum __attribute__ ((__packed__)) {
750 DC_None = 0,
751 DC_Throttle1 = 1,
752 DC_Throttle2 = 2,
753 // this is about SINGLE DC-motor idle valve like 90s volkswagen/earlier M111 engines
754 // NOT to be used in dual H-bridge stepper control
755 DC_IdleValve = 3,
756 DC_Wastegate = 4,
758
759typedef enum __attribute__ ((__packed__)) {
760 STEPPER_FULL = 0,
761 STEPPER_HALF = 2,
762 STEPPER_FOURTH = 4,
763 STEPPER_EIGHTH = 8,
765
766typedef enum __attribute__ ((__packed__)) {
767 IPT_Low = 0,
768 IPT_High = 1,
770
771typedef enum __attribute__ ((__packed__)) {
772 ICM_None = 0,
773 ICM_FixedRailPressure = 1,
774 ICM_SensedRailPressure = 2,
775 ICM_HPFP_Manual_Compensation = 3,
777
778typedef enum __attribute__ ((__packed__)) {
779 FPM_Absolute = 0,
780 FPM_Gauge = 1,
781 FPM_Differential = 2,
783
784typedef enum __attribute__ ((__packed__)) {
785 INJ_None = 0,
786 INJ_PolynomialAdder = 1,
787 INJ_FordModel = 2,
789
790typedef enum __attribute__ ((__packed__)) {
791 HPFP_CAM_NONE = 0,
792 HPFP_CAM_IN1 = 1,
793 HPFP_CAM_EX1 = 2,
794 HPFP_CAM_IN2 = 3,
795 HPFP_CAM_EX2 = 4,
797
798// IMPORTANT: This enum must be kept in sync with the definition in rusefi_config.txt
799typedef enum __attribute__ ((__packed__)) {
800 AE_MODE_MS_ADDER = 0,
801 AE_MODE_PERCENT_ADDER = 1,
802 AE_MODE_PREDICTIVE_MAP = 2,
804
805#if __cplusplus
806#include <cstdint>
807
808enum class TsCalMode : uint8_t {
809 None = 0,
810 Tps1Max = 1,
811 Tps1Min = 2,
812 EtbKp = 3,
813 EtbKi = 4,
814 EtbKd = 5,
817 Tps2Max = 8,
818 Tps2Min = 9,
819 Tps2SecondaryMax = 10,
820 Tps2SecondaryMin = 11,
821 PedalMin = 12,
822 PedalMax = 13,
823 EwgPosMax = 14,
824 EwgPosMin = 15,
825};
826
827enum class GearControllerMode : uint8_t {
828 None = 0,
829 ButtonShift = 1,
830 Automatic = 2,
831 Generic = 3,
832};
833
834enum class TransmissionControllerMode : uint8_t {
835 None = 0,
837 Generic4 = 2,
838 Gm4l6x = 3,
839};
840
841enum class InjectionTimingMode : uint8_t {
842 End = 0,
843 Start = 1,
844 Center = 2,
845};
846
847enum class SelectedGear : uint8_t {
848 Invalid = 0,
849 ManualPlus = 1,
850 ManualMinus = 2,
851 Park = 3,
852 Reverse = 4,
853 Neutral = 5,
854 Drive = 6,
855 Manual = 7,
856 Manual3 = 8,
857 Manual2 = 9,
858 Manual1 = 10,
859 Low = 11,
860};
861
862enum class RotationalCutMode : uint8_t {
863 Spark = 0,
864 Fuel = 1,
865 Both = 2,
866};
867
868#define SC_Exhaust_First 1
869
870typedef enum __attribute__ ((__packed__)) {
871 stftEnabled = 0,
872 stftDisabledSettings = 1,
873 stftDisabledTuning = 2,
874 stftDisabledRPM = 3,
875 stftDisabledCrankingDelay = 4,
876 stftDisabledClt = 5,
877 // below state related to learning only
878 stftDisabledAfrOurOfRange = 6,
879 stftDisabledDFCO = 7,
880 stftDisabledTpsAccel = 8,
881 stftDisabledFuelCut = 9
883
884typedef enum __attribute__((__packed__)) {
885 ftRegionIdle = 0,
886 ftRegionOverrun = 1,
887 ftRegionPower = 2,
888 ftRegionCruise = 3,
890
891#endif // __cplusplus
892
894
895using 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
RotationalCutMode
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