rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Enumerations | Functions | Variables
rusefi_enums.h File Reference

Detailed Description

Fundamental rusEFI enumerable types live here.

This and few over headers are part of integration API between C/C++ and code generator for memory meta and java code. TODO: move enums which should not be visible outside of the firmware out of 'integration API' headers like this one

Note
this file should probably not include any other files
Date
Jan 14, 2014
Author
Andrey Belomutskiy, (c) 2012-2020

Definition in file rusefi_enums.h.

Enumerations

enum class  TriggerWheel : uint8_t { T_PRIMARY = 0 , T_SECONDARY = 1 }
 
enum class  idle_mode_e : uint8_t { IM_AUTO = 0 , IM_MANUAL = 1 }
 
enum class  SentEtbType : uint8_t { NONE = 0 , GM_TYPE_1 = 1 , FORD_TYPE_1 = 2 , CUSTOM = 3 }
 
enum class  SentFuelHighPressureType : uint8_t { NONE = 0 , GM_TYPE = 1 }
 
enum class  SentInput : uint8_t {
  NONE = 0 , INPUT1 = 1 , INPUT2 = 2 , INPUT3 = 3 ,
  INPUT4 = 4 , INPUT5 = 5 , INPUT6 = 6 , INPUT7 = 7
}
 
enum class  CanGpioType : uint8_t { NONE = 0 , DRT = 1 , MS = 2 }
 
enum class  MsIoBoxId : uint8_t { OFF = 0 , ID200 = 1 , ID220 = 2 , ID240 = 3 }
 
enum class  MsIoBoxVss : uint8_t { OFF = 0 , VR12 = 1 , HALL34 = 2 , ALL1234 = 3 }
 
enum class  UiMode : uint8_t { FULL = 0 , INSTALLATION = 1 , TUNING = 2 }
 
enum  operation_mode_e {
  OM_NONE = 0 , FOUR_STROKE_CRANK_SENSOR = 1 , FOUR_STROKE_CAM_SENSOR = 2 , TWO_STROKE = 3 ,
  FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR = 4 , FOUR_STROKE_THREE_TIMES_CRANK_SENSOR = 5 , FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR = 6 , FOUR_STROKE_SIX_TIMES_CRANK_SENSOR = 7
}
 
enum  gear_e {
  REVERSE = -1 , NEUTRAL = 0 , GEAR_1 = 1 , GEAR_2 = 2 ,
  GEAR_3 = 3 , GEAR_4 = 4
}
 
enum class  TsCalMode : uint8_t {
  None = 0 , Tps1Max = 1 , Tps1Min = 2 , EtbKp = 3 ,
  EtbKi = 4 , EtbKd = 5 , Tps1SecondaryMax = 6 , Tps1SecondaryMin = 7 ,
  Tps2Max = 8 , Tps2Min = 9 , Tps2SecondaryMax = 10 , Tps2SecondaryMin = 11 ,
  PedalMin = 12 , PedalMax = 13 , EwgPosMax = 14 , EwgPosMin = 15
}
 
enum class  GearControllerMode : uint8_t { None = 0 , ButtonShift = 1 , Automatic = 2 , Generic = 3 }
 
enum class  TransmissionControllerMode : uint8_t { None = 0 , SimpleTransmissionController = 1 , Generic4 = 2 , Gm4l6x = 3 }
 
enum class  InjectionTimingMode : uint8_t { End = 0 , Start = 1 , Center = 2 }
 
enum class  SelectedGear : uint8_t {
  Invalid = 0 , ManualPlus = 1 , ManualMinus = 2 , Park = 3 ,
  Reverse = 4 , Neutral = 5 , Drive = 6 , Manual = 7 ,
  Manual3 = 8 , Manual2 = 9 , Manual1 = 10 , Low = 11
}
 

Functions

enum __attribute__ ((__packed__))
 Ignition Mode.
 

Variables

 brain_pin_diag_e
 
 vvt_mode_e
 
 display_mode_e
 
 tle8888_mode_e
 
 mc33810maxDwellTimer_e
 
 pin_output_mode_e
 
 pin_input_mode_e
 
 ignition_mode_e
 
 injection_mode_e
 
 uart_device_e
 
 spi_device_e
 
 can_vss_nbc_e
 
 imu_type_e
 
 ego_sensor_e
 
 air_pressure_sensor_type_e
 
 timing_mode_e
 
 cranking_condition_e
 
 can_nbc_e
 
 tChargeMode_e
 
 idle_state_e
 
 boostType_e
 
 launchActivationMode_e
 
 torqueReductionActivationMode_e
 
 nitrous_arming_method_e
 
 lua_gauge_e
 
 lua_gauge_meaning_e
 
 antiLagActivationMode_e
 
 gppwm_channel_e
 
 can_baudrate_e
 
 can_wbo_type_e
 
 can_wbo_re_status_e
 
 can_wbo_re_id_e
 
 can_wbo_re_hwidx_e
 
 can_wbo_aem_id_e
 
 gppwm_compare_mode_e
 
 ve_override_e
 
 load_override_e
 
 dc_function_e
 
 stepper_num_micro_steps_e
 
 injector_pressure_type_e
 
 injector_compensation_mode_e
 
 fuel_pressure_sensor_mode_e
 
 InjectorNonlinearMode
 
 hpfp_cam_e
 
 accel_enrichment_mode_e
 
 stft_state_e
 

Enumeration Type Documentation

◆ CanGpioType

enum class CanGpioType : uint8_t
strong
Enumerator
NONE 
DRT 
MS 

Definition at line 205 of file rusefi_enums.h.

205 : uint8_t {
206 NONE = 0,
207 DRT = 1,
208 MS = 2,
209};

◆ gear_e

enum gear_e
Enumerator
REVERSE 
NEUTRAL 
GEAR_1 
GEAR_2 
GEAR_3 
GEAR_4 

Definition at line 494 of file rusefi_enums.h.

494 {
495 REVERSE = -1,
496 NEUTRAL = 0,
497 GEAR_1 = 1,
498 GEAR_2 = 2,
499 GEAR_3 = 3,
500 GEAR_4 = 4,
501
502} gear_e;
gear_e
@ GEAR_2
@ REVERSE
@ GEAR_1
@ GEAR_4
@ NEUTRAL
@ GEAR_3

◆ GearControllerMode

enum class GearControllerMode : uint8_t
strong
Enumerator
None 
ButtonShift 
Automatic 
Generic 

Definition at line 824 of file rusefi_enums.h.

824 : uint8_t {
825 None = 0,
826 ButtonShift = 1,
827 Automatic = 2,
828 Generic = 3,
829};

◆ idle_mode_e

enum class idle_mode_e : uint8_t
strong
Enumerator
IM_AUTO 

In auto mode we currently have some pid-like-but-not really PID logic which is trying to get idle RPM to desired value by dynamically adjusting idle valve position. TODO: convert to PID

IM_MANUAL 

Manual idle control is extremely simple: user just specifies desired idle valve position which could be adjusted according to current CLT

Definition at line 167 of file rusefi_enums.h.

167 : 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};

◆ InjectionTimingMode

enum class InjectionTimingMode : uint8_t
strong
Enumerator
End 
Start 
Center 

Definition at line 838 of file rusefi_enums.h.

838 : uint8_t {
839 End = 0,
840 Start = 1,
841 Center = 2,
842};

◆ MsIoBoxId

enum class MsIoBoxId : uint8_t
strong
Enumerator
OFF 
ID200 
ID220 
ID240 

Definition at line 211 of file rusefi_enums.h.

211 : uint8_t {
212 OFF = 0,
213 ID200 = 1,
214 ID220 = 2,
215 ID240 = 3
216};

◆ MsIoBoxVss

enum class MsIoBoxVss : uint8_t
strong
Enumerator
OFF 
VR12 
HALL34 
ALL1234 

Definition at line 218 of file rusefi_enums.h.

218 : uint8_t {
219 OFF = 0,
220 VR12 = 1,
221 HALL34 = 2,
222 ALL1234 = 3
223};

◆ operation_mode_e

See also
getCycleDuration
getEngineCycle
Enumerator
OM_NONE 
FOUR_STROKE_CRANK_SENSOR 

720 degree engine cycle but trigger is defined using a 360 cycle which is when repeated. For historical reasons we have a pretty weird approach where one crank trigger revolution is defined as if it's stretched to 720 degrees. See CRANK_MODE_MULTIPLIER

FOUR_STROKE_CAM_SENSOR 

720 degree engine and trigger cycle

TWO_STROKE 

360 degree cycle

FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR 

720 degree engine cycle but trigger is defined using a 180 cycle which is when repeated three more times In other words, same pattern is repeated on the crank wheel twice.

FOUR_STROKE_THREE_TIMES_CRANK_SENSOR 

Same pattern repeated three times on crank wheel. Crazy, I know!

FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR 
FOUR_STROKE_SIX_TIMES_CRANK_SENSOR 

Same pattern repeated six times on crank wheel like 1995 Lamborghini Diablo

Definition at line 264 of file rusefi_enums.h.

264 {
265 OM_NONE = 0,
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 */
279 TWO_STROKE = 3,
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 */
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

◆ SelectedGear

enum class SelectedGear : uint8_t
strong
Enumerator
Invalid 
ManualPlus 
ManualMinus 
Park 
Reverse 
Neutral 
Drive 
Manual 
Manual3 
Manual2 
Manual1 
Low 

Definition at line 844 of file rusefi_enums.h.

844 : uint8_t {
845 Invalid = 0,
846 ManualPlus = 1,
847 ManualMinus = 2,
848 Park = 3,
849 Reverse = 4,
850 Neutral = 5,
851 Drive = 6,
852 Manual = 7,
853 Manual3 = 8,
854 Manual2 = 9,
855 Manual1 = 10,
856 Low = 11,
857};

◆ SentEtbType

enum class SentEtbType : uint8_t
strong
Enumerator
NONE 
GM_TYPE_1 
FORD_TYPE_1 
CUSTOM 

Definition at line 182 of file rusefi_enums.h.

182 : uint8_t {
183 NONE = 0,
184 GM_TYPE_1 = 1,
185 FORD_TYPE_1 = 2,
186 CUSTOM = 3,
187};

◆ SentFuelHighPressureType

enum class SentFuelHighPressureType : uint8_t
strong
Enumerator
NONE 
GM_TYPE 

Definition at line 189 of file rusefi_enums.h.

189 : uint8_t {
190 NONE = 0,
191 GM_TYPE = 1,
192};

◆ SentInput

enum class SentInput : uint8_t
strong
Enumerator
NONE 
INPUT1 
INPUT2 
INPUT3 
INPUT4 
INPUT5 
INPUT6 
INPUT7 

Definition at line 194 of file rusefi_enums.h.

194 : 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};

◆ TransmissionControllerMode

enum class TransmissionControllerMode : uint8_t
strong
Enumerator
None 
SimpleTransmissionController 
Generic4 
Gm4l6x 

Definition at line 831 of file rusefi_enums.h.

◆ TriggerWheel

enum class TriggerWheel : uint8_t
strong
Enumerator
T_PRIMARY 
T_SECONDARY 

Definition at line 48 of file rusefi_enums.h.

48 : uint8_t {
49 T_PRIMARY = 0,
50 T_SECONDARY = 1,
51};

◆ TsCalMode

enum class TsCalMode : uint8_t
strong
Enumerator
None 
Tps1Max 
Tps1Min 
EtbKp 
EtbKi 
EtbKd 
Tps1SecondaryMax 
Tps1SecondaryMin 
Tps2Max 
Tps2Min 
Tps2SecondaryMax 
Tps2SecondaryMin 
PedalMin 
PedalMax 
EwgPosMax 
EwgPosMin 

Definition at line 805 of file rusefi_enums.h.

805 : uint8_t {
806 None = 0,
807 Tps1Max = 1,
808 Tps1Min = 2,
809 EtbKp = 3,
810 EtbKi = 4,
811 EtbKd = 5,
814 Tps2Max = 8,
815 Tps2Min = 9,
816 Tps2SecondaryMax = 10,
817 Tps2SecondaryMin = 11,
818 PedalMin = 12,
819 PedalMax = 13,
820 EwgPosMax = 14,
821 EwgPosMin = 15,
822};
@ Tps1SecondaryMax
@ Tps2SecondaryMax
@ Tps2SecondaryMin
@ Tps1SecondaryMin

◆ UiMode

enum class UiMode : uint8_t
strong
Enumerator
FULL 
INSTALLATION 
TUNING 

Definition at line 225 of file rusefi_enums.h.

225 : uint8_t {
226 FULL = 0,
227 INSTALLATION = 1,
228 TUNING = 2,
229};
@ INSTALLATION

Function Documentation

◆ __attribute__()

enum __attribute__ ( (__packed__)  )

Ignition Mode.

See also
getNumberOfInjections

See spi3mosiPin See spi2MisoMode

inertia measurement unit, yawn accelerometer By the way both kinds of BOSCH use Housing : TE 1-967640-1, pins 144969-1 seal 967056-1 plug 967067-2

Net Body Computer types

This mode is useful for troubleshooting and research - events are logged but no effects on phase synchronization

Single tooth on the camshaft anywhere in the 720 degree cycle

Toyota 2JZ has three cam tooth. We pick one of these three tooth to synchronize based on the expected angle position of the event

Mazda NB2 has three cam tooth. We synchronize based on gap ratio.

See also
TT_VVT_MIATA_NB
TT_VVT_BOSCH_QUICK_START

1.8l Toyota 1ZZ-FE https://rusefi.com/forum/viewtopic.php?f=3&t=1735 4 minus one

4 equally spaced no way to sync

4 plus one

GND for logical OFF, VCC for logical ON

GND for logical ON, VCC for logical OFF

logical OFF is floating, logical ON is GND

bit 2 is used as inverted flag, so skip one here

in this mode only SPARKOUT_1_OUTPUT is used

in this mode we use as many coils as we have cylinders

some v12 engines line BMW M70 and M73 run two distributors, one for each bank of cylinders

each cylinder has it's own injector but they all works in parallel

each cylinder has it's own injector, each injector is wired separately

each cylinder has it's own injector but these injectors work in pairs. Injectors could be wired in pairs or separately. Each pair is fired once per engine cycle todo: we might want to implement one additional mode where each pair of injectors is floating twice per engine cycle. todo: this could reduce phase offset from injection to stroke but would not work great for large injectors

only one injector located in throttle body

f037000002 https://github.com/rusefi/rusefi_documentation/blob/master/OEM-Docs/Bosch/Data%20Sheet_68903691_Acceleration_Sensor_MM5.10.pdf

Mercedes pn: A 006 542 26 18 Almost the same as BOSCH above, but XY only and different CAN IDs

same as innovate LC2 0v->7.35afr, 5v->22.39

Same as AEM 0v->10.0afr 5v->20.0afr

20 to 250 kPa (2.9 to 36.3 psi) 0.2 to 4.9 V OUTPUT

22012AA090

16040749

20 to 105 kPa (2.9 to 15.2 psi) 0.3 to 4.9 V Output

http://rusefi.com/forum/viewtopic.php?f=3&t=906&p=18976#p18976 Toyota 89420-02010

20 to 250 kPa (2.9 to 36.3 psi) 0.25 to 4.875 OUTPUT More precise calibration data for new NXP sensor revisions MPX4250A and MPXA4250A. For an old Freescale MPX4250D use "MT_MPX4250". See https://www.nxp.com/docs/en/data-sheet/MPX4250A.pdf

Bosch 2.5 Bar TMap Map Sensor with IAT 20 kPa at 0.40V, 250 kPa at 4.65V 4 pin: Pin 1 : Sensor Ground Pin 2 : Temp Signal Pin 3 : 5v Pin 4 : Map Signal Volkswagen Passat B6

4 bar

3 bar

This is the default mode in which ECU controls timing dynamically

Fixed timing is useful while you are playing with a timing gun - you need to have fixed timing if you want to install your distributor at some specific angle

Definition at line 1 of file rusefi_enums.h.

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
brain_pin_diag_e

Variable Documentation

◆ accel_enrichment_mode_e

accel_enrichment_mode_e

Definition at line 800 of file rusefi_enums.h.

Referenced by getInjectionMass().

◆ air_pressure_sensor_type_e

air_pressure_sensor_type_e

Definition at line 492 of file rusefi_enums.h.

◆ antiLagActivationMode_e

antiLagActivationMode_e

Definition at line 610 of file rusefi_enums.h.

◆ boostType_e

boostType_e

Definition at line 567 of file rusefi_enums.h.

◆ brain_pin_diag_e

brain_pin_diag_e

Definition at line 44 of file rusefi_enums.h.

Referenced by benchOff(), reportPins(), and tle8888_2b_to_diag_with_temp().

◆ can_baudrate_e

can_baudrate_e

Definition at line 662 of file rusefi_enums.h.

◆ can_nbc_e

can_nbc_e

Definition at line 543 of file rusefi_enums.h.

Referenced by setCanType().

◆ can_vss_nbc_e

can_vss_nbc_e

Definition at line 381 of file rusefi_enums.h.

Referenced by setCanVss().

◆ can_wbo_aem_id_e

can_wbo_aem_id_e

Definition at line 725 of file rusefi_enums.h.

Referenced by setDefaultWboSettings().

◆ can_wbo_re_hwidx_e

can_wbo_re_hwidx_e

Definition at line 706 of file rusefi_enums.h.

◆ can_wbo_re_id_e

can_wbo_re_id_e

Definition at line 694 of file rusefi_enums.h.

Referenced by setDefaultWboSettings().

◆ can_wbo_re_status_e

can_wbo_re_status_e

Definition at line 675 of file rusefi_enums.h.

◆ can_wbo_type_e

can_wbo_type_e

◆ cranking_condition_e

cranking_condition_e

Definition at line 522 of file rusefi_enums.h.

◆ dc_function_e

dc_function_e

Definition at line 754 of file rusefi_enums.h.

◆ display_mode_e

display_mode_e

Definition at line 147 of file rusefi_enums.h.

◆ ego_sensor_e

ego_sensor_e

Definition at line 424 of file rusefi_enums.h.

◆ fuel_pressure_sensor_mode_e

fuel_pressure_sensor_mode_e

Definition at line 779 of file rusefi_enums.h.

◆ gppwm_channel_e

gppwm_channel_e

Definition at line 651 of file rusefi_enums.h.

◆ gppwm_compare_mode_e

gppwm_compare_mode_e

Definition at line 730 of file rusefi_enums.h.

◆ hpfp_cam_e

hpfp_cam_e

Definition at line 793 of file rusefi_enums.h.

◆ idle_state_e

idle_state_e

Definition at line 560 of file rusefi_enums.h.

◆ ignition_mode_e

ignition_mode_e

Definition at line 322 of file rusefi_enums.h.

Referenced by getCurrentIgnitionMode(), and setIgnitionMode().

◆ imu_type_e

imu_type_e

Definition at line 402 of file rusefi_enums.h.

◆ injection_mode_e

injection_mode_e

◆ injector_compensation_mode_e

injector_compensation_mode_e

Definition at line 773 of file rusefi_enums.h.

◆ injector_pressure_type_e

injector_pressure_type_e

Definition at line 766 of file rusefi_enums.h.

◆ InjectorNonlinearMode

InjectorNonlinearMode

Definition at line 785 of file rusefi_enums.h.

◆ launchActivationMode_e

launchActivationMode_e

Definition at line 575 of file rusefi_enums.h.

◆ load_override_e

load_override_e

Definition at line 744 of file rusefi_enums.h.

◆ lua_gauge_e

lua_gauge_e

Definition at line 598 of file rusefi_enums.h.

◆ lua_gauge_meaning_e

lua_gauge_meaning_e

Definition at line 603 of file rusefi_enums.h.

◆ mc33810maxDwellTimer_e

mc33810maxDwellTimer_e

Definition at line 165 of file rusefi_enums.h.

◆ nitrous_arming_method_e

nitrous_arming_method_e

Definition at line 587 of file rusefi_enums.h.

◆ pin_input_mode_e

pin_input_mode_e

Definition at line 257 of file rusefi_enums.h.

Referenced by NitrousController::checkTriggerPinState().

◆ pin_output_mode_e

pin_output_mode_e

◆ spi_device_e

spi_device_e

Definition at line 370 of file rusefi_enums.h.

◆ stepper_num_micro_steps_e

stepper_num_micro_steps_e

Definition at line 761 of file rusefi_enums.h.

◆ stft_state_e

stft_state_e

Definition at line 873 of file rusefi_enums.h.

◆ tChargeMode_e

tChargeMode_e

Definition at line 550 of file rusefi_enums.h.

◆ timing_mode_e

timing_mode_e

Definition at line 515 of file rusefi_enums.h.

◆ tle8888_mode_e

tle8888_mode_e

Definition at line 155 of file rusefi_enums.h.

◆ torqueReductionActivationMode_e

torqueReductionActivationMode_e

Definition at line 582 of file rusefi_enums.h.

◆ uart_device_e

uart_device_e

Definition at line 356 of file rusefi_enums.h.

◆ ve_override_e

ve_override_e

Definition at line 736 of file rusefi_enums.h.

◆ vvt_mode_e

vvt_mode_e

Definition at line 139 of file rusefi_enums.h.

Referenced by adjustCrankPhase(), and setValue().

Go to the source code of this file.