rusEFI
The most advanced open source ECU
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  SentEtbType : uint8_t { NONE = 0 , GM_TYPE_1 = 1 , FORD_TYPE_1 = 2 , CUSTOM = 3 }
 
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
}
 
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. More...
 

Variables

 brain_pin_diag_e
 
 vvt_mode_e
 
 engine_load_mode_e
 
 display_mode_e
 
 tle8888_mode_e
 
 mc33810maxDwellTimer_e
 
 idle_mode_e
 
 pin_output_mode_e
 
 pin_input_mode_e
 
 ignition_mode_e
 
 injection_mode_e
 
 uart_device_e
 
 spi_speed_e
 
 spi_device_e
 
 can_vss_nbc_e
 
 imu_type_e
 
 ego_sensor_e
 
 air_pressure_sensor_type_e
 
 sensor_chart_e
 
 maf_sensor_type_e
 
 timing_mode_e
 
 can_nbc_e
 
 tChargeMode_e
 
 idle_state_e
 
 boostType_e
 
 launchActivationMode_e
 
 antiLagActivationMode_e
 
 gppwm_channel_e
 
 can_baudrate_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
 

Enumeration Type Documentation

◆ CanGpioType

enum CanGpioType : uint8_t
strong
Enumerator
NONE 
DRT 
MS 

Definition at line 194 of file rusefi_enums.h.

194  : uint8_t {
195  NONE = 0,
196  DRT = 1,
197  MS = 2,
198 };

◆ gear_e

enum gear_e
Enumerator
REVERSE 
NEUTRAL 
GEAR_1 
GEAR_2 
GEAR_3 
GEAR_4 

Definition at line 498 of file rusefi_enums.h.

498  {
499  REVERSE = -1,
500  NEUTRAL = 0,
501  GEAR_1 = 1,
502  GEAR_2 = 2,
503  GEAR_3 = 3,
504  GEAR_4 = 4,
505 
506 } gear_e;
gear_e
Definition: rusefi_enums.h:498
@ GEAR_2
Definition: rusefi_enums.h:502
@ REVERSE
Definition: rusefi_enums.h:499
@ GEAR_1
Definition: rusefi_enums.h:501
@ GEAR_4
Definition: rusefi_enums.h:504
@ NEUTRAL
Definition: rusefi_enums.h:500
@ GEAR_3
Definition: rusefi_enums.h:503

◆ GearControllerMode

enum GearControllerMode : uint8_t
strong
Enumerator
None 
ButtonShift 
Automatic 
Generic 

Definition at line 713 of file rusefi_enums.h.

713  : uint8_t {
714  None = 0,
715  ButtonShift = 1,
716  Automatic = 2,
717  Generic = 3,
718 };

◆ InjectionTimingMode

enum InjectionTimingMode : uint8_t
strong
Enumerator
End 
Start 
Center 

Definition at line 727 of file rusefi_enums.h.

727  : uint8_t {
728  End = 0,
729  Start = 1,
730  Center = 2,
731 };

◆ MsIoBoxId

enum MsIoBoxId : uint8_t
strong
Enumerator
OFF 
ID200 
ID220 
ID240 

Definition at line 200 of file rusefi_enums.h.

200  : uint8_t {
201  OFF = 0,
202  ID200 = 1,
203  ID220 = 2,
204  ID240 = 3
205 };

◆ MsIoBoxVss

enum MsIoBoxVss : uint8_t
strong
Enumerator
OFF 
VR12 
HALL34 
ALL1234 

Definition at line 207 of file rusefi_enums.h.

207  : uint8_t {
208  OFF = 0,
209  VR12 = 1,
210  HALL34 = 2,
211  ALL1234 = 3
212 };

◆ 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 247 of file rusefi_enums.h.

247  {
248  OM_NONE = 0,
249  /**
250  * 720 degree engine cycle but trigger is defined using a 360 cycle which is when repeated.
251  * For historical reasons we have a pretty weird approach where one crank trigger revolution is
252  * defined as if it's stretched to 720 degrees. See CRANK_MODE_MULTIPLIER
253  */
255  /**
256  * 720 degree engine and trigger cycle
257  */
259  /**
260  * 360 degree cycle
261  */
262  TWO_STROKE = 3,
263 
264  /**
265  * 720 degree engine cycle but trigger is defined using a 180 cycle which is when repeated three more times
266  * In other words, same pattern is repeated on the crank wheel twice.
267  */
269 
270  /**
271  * Same pattern repeated three times on crank wheel. Crazy, I know!
272  */
274 
275  // Same pattern TWELVE TIMES on the crank wheel!
276  // This usually means Honda, which often has a 12 tooth crank wheel or 24 tooth cam wheel
277  // without a missing tooth, plus a single tooth cam channel to resolve the engine phase.
279 
280  /**
281  * Same pattern repeated six times on crank wheel like 1995 Lamborghini Diablo
282  */
operation_mode_e
Definition: rusefi_enums.h:247
@ FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR
Definition: rusefi_enums.h:268
@ FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR
Definition: rusefi_enums.h:278
@ FOUR_STROKE_THREE_TIMES_CRANK_SENSOR
Definition: rusefi_enums.h:273
@ FOUR_STROKE_CRANK_SENSOR
Definition: rusefi_enums.h:254
@ OM_NONE
Definition: rusefi_enums.h:248
@ FOUR_STROKE_CAM_SENSOR
Definition: rusefi_enums.h:258
@ TWO_STROKE
Definition: rusefi_enums.h:262
@ FOUR_STROKE_SIX_TIMES_CRANK_SENSOR
Definition: rusefi_enums.h:283

◆ SelectedGear

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

Definition at line 733 of file rusefi_enums.h.

733  : uint8_t {
734  Invalid = 0,
735  ManualPlus = 1,
736  ManualMinus = 2,
737  Park = 3,
738  Reverse = 4,
739  Neutral = 5,
740  Drive = 6,
741  Manual = 7,
742  Manual3 = 8,
743  Manual2 = 9,
744  Manual1 = 10,
745  Low = 11,
746 };
@ Invalid

◆ SentEtbType

enum SentEtbType : uint8_t
strong
Enumerator
NONE 
GM_TYPE_1 
FORD_TYPE_1 
CUSTOM 

Definition at line 187 of file rusefi_enums.h.

187  : uint8_t {
188  NONE = 0,
189  GM_TYPE_1 = 1,
190  FORD_TYPE_1 = 2,
191  CUSTOM = 3,
192 };

◆ TransmissionControllerMode

enum TransmissionControllerMode : uint8_t
strong
Enumerator
None 
SimpleTransmissionController 
Generic4 
Gm4l6x 

Definition at line 720 of file rusefi_enums.h.

720  : uint8_t {
721  None = 0,
723  Generic4 = 2,
724  Gm4l6x = 3,
725 };

◆ TriggerWheel

enum TriggerWheel : uint8_t
strong
Enumerator
T_PRIMARY 
T_SECONDARY 

Definition at line 47 of file rusefi_enums.h.

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

◆ TsCalMode

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

Definition at line 696 of file rusefi_enums.h.

696  : uint8_t {
697  None = 0,
698  Tps1Max = 1,
699  Tps1Min = 2,
700  EtbKp = 3,
701  EtbKi = 4,
702  EtbKd = 5,
703  Tps1SecondaryMax = 6,
704  Tps1SecondaryMin = 7,
705  Tps2Max = 8,
706  Tps2Min = 9,
707  Tps2SecondaryMax = 10,
708  Tps2SecondaryMin = 11,
709  PedalMin = 12,
710  PedalMax = 13,
711 };
@ Tps1SecondaryMax
@ Tps2SecondaryMax
@ Tps2SecondaryMin
@ Tps1SecondaryMin

◆ UiMode

enum UiMode : uint8_t
strong
Enumerator
FULL 
INSTALLATION 
TUNING 

Definition at line 214 of file rusefi_enums.h.

214  : uint8_t {
215  FULL = 0,
216  INSTALLATION = 1,
217  TUNING = 2,
218 };
@ INSTALLATION

Function Documentation

◆ __attribute__()

enum __attribute__ ( (__packed__)  )

Ignition Mode.

This enum is used to select your desired Engine Load calculation algorithm

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

Speed Density algorithm - Engine Load is a function of MAP, VE and target AFR http://articles.sae.org/8539/

MAF with a known kg/hour function

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

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

GND for logical OFF, VCC for logical ON

GND for logical ON, VCC for logical OFF

logical OFF is floating, logical ON is GND

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

You would use this value if you want to see a detailed graph of your trigger events

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.

34 {
35  PIN_OK = 0,
36  PIN_OPEN = 0x01,
37  PIN_SHORT_TO_GND = 0x02,
38  PIN_SHORT_TO_BAT = 0x04,
39  PIN_OVERLOAD = 0x08,
40  PIN_DRIVER_OVERTEMP = 0x10,
41  PIN_DRIVER_OFF = 0x20,
42  PIN_UNKNOWN = 0x80
brain_pin_diag_e
Definition: rusefi_enums.h:43

Variable Documentation

◆ air_pressure_sensor_type_e

air_pressure_sensor_type_e

Definition at line 483 of file rusefi_enums.h.

◆ antiLagActivationMode_e

antiLagActivationMode_e

Definition at line 584 of file rusefi_enums.h.

◆ boostType_e

boostType_e

Definition at line 572 of file rusefi_enums.h.

◆ brain_pin_diag_e

brain_pin_diag_e

Definition at line 43 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 624 of file rusefi_enums.h.

◆ can_nbc_e

can_nbc_e

Definition at line 548 of file rusefi_enums.h.

Referenced by setCanType().

◆ can_vss_nbc_e

can_vss_nbc_e

Definition at line 372 of file rusefi_enums.h.

Referenced by setCanVss().

◆ dc_function_e

dc_function_e

Definition at line 653 of file rusefi_enums.h.

◆ display_mode_e

display_mode_e

Definition at line 152 of file rusefi_enums.h.

◆ ego_sensor_e

ego_sensor_e

Definition at line 415 of file rusefi_enums.h.

◆ engine_load_mode_e

engine_load_mode_e

Definition at line 144 of file rusefi_enums.h.

Referenced by lua_getAirmassResolveMode(), and setAlgorithmInt().

◆ fuel_pressure_sensor_mode_e

fuel_pressure_sensor_mode_e

Definition at line 677 of file rusefi_enums.h.

◆ gppwm_channel_e

gppwm_channel_e

Definition at line 614 of file rusefi_enums.h.

◆ gppwm_compare_mode_e

gppwm_compare_mode_e

Definition at line 629 of file rusefi_enums.h.

◆ hpfp_cam_e

hpfp_cam_e

Definition at line 691 of file rusefi_enums.h.

◆ idle_mode_e

idle_mode_e

Definition at line 185 of file rusefi_enums.h.

◆ idle_state_e

idle_state_e

Definition at line 565 of file rusefi_enums.h.

◆ ignition_mode_e

ignition_mode_e

Definition at line 305 of file rusefi_enums.h.

Referenced by getCurrentIgnitionMode(), and setIgnitionMode().

◆ imu_type_e

imu_type_e

Definition at line 393 of file rusefi_enums.h.

◆ injection_mode_e

injection_mode_e

◆ injector_compensation_mode_e

injector_compensation_mode_e

Definition at line 671 of file rusefi_enums.h.

◆ injector_pressure_type_e

injector_pressure_type_e

Definition at line 665 of file rusefi_enums.h.

◆ InjectorNonlinearMode

InjectorNonlinearMode

Definition at line 683 of file rusefi_enums.h.

◆ launchActivationMode_e

launchActivationMode_e

Definition at line 579 of file rusefi_enums.h.

◆ load_override_e

load_override_e

Definition at line 643 of file rusefi_enums.h.

◆ maf_sensor_type_e

maf_sensor_type_e

Definition at line 514 of file rusefi_enums.h.

◆ mc33810maxDwellTimer_e

mc33810maxDwellTimer_e

Definition at line 170 of file rusefi_enums.h.

◆ pin_input_mode_e

pin_input_mode_e

Definition at line 240 of file rusefi_enums.h.

◆ pin_output_mode_e

pin_output_mode_e

◆ sensor_chart_e

sensor_chart_e

Definition at line 496 of file rusefi_enums.h.

Referenced by setSensorChartMode().

◆ spi_device_e

spi_device_e

Definition at line 361 of file rusefi_enums.h.

◆ spi_speed_e

spi_speed_e

Definition at line 346 of file rusefi_enums.h.

◆ stepper_num_micro_steps_e

stepper_num_micro_steps_e

Definition at line 660 of file rusefi_enums.h.

◆ tChargeMode_e

tChargeMode_e

Definition at line 555 of file rusefi_enums.h.

◆ timing_mode_e

timing_mode_e

Definition at line 527 of file rusefi_enums.h.

Referenced by setTimingMode().

◆ tle8888_mode_e

tle8888_mode_e

Definition at line 160 of file rusefi_enums.h.

◆ uart_device_e

uart_device_e

Definition at line 339 of file rusefi_enums.h.

◆ ve_override_e

ve_override_e

Definition at line 635 of file rusefi_enums.h.

◆ vvt_mode_e

vvt_mode_e

Definition at line 120 of file rusefi_enums.h.

Referenced by adjustCrankPhase(), and setValue().

Go to the source code of this file.