rusEFI
The most advanced open source ECU
sensor_type.h
Go to the documentation of this file.
1 /**
2  * @file sensor_type.h
3  * @brief Enumeration of sensors supported by the ECU.
4  *
5  * @date September 12, 2019
6  * @author Matthew Kennedy, (c) 2019
7  */
8 
9 #pragma once
10 
11 #define VBAT_FALLBACK_VALUE 12
12 
13 /**
14  **************************************
15  * SEE sensor.h ON HOW TO ADD NEW SENSOR TYPES
16  **************************************
17  */
18 enum class SensorType : unsigned char {
19  Invalid, // we need indeces for Lua consumers. At the moment we still do not expose constants into Lua :(
20  Clt, // 1
21  Iat,
22  Rpm,
23  /**
24  * This value is result of averaging within user-defined window
25  * See also MapFast, MapSlow
26  */
27  Map,
28  Maf,
29 
31 
34 
35  FuelPressureLow, // in kPa
36  FuelPressureHigh, // in kPa
38 
40 
41  // This is the "resolved" position, potentially composited out of the following two
42  Tps1, // 10
43  // This is the first sensor
45  // This is the second sensor
47 
48  Tps2,
51 
52  // Redundant and combined sensors for acc pedal
54  // pedal according to only first physical sensor
56  // pedal according to only second physical sensor
58 
59  // This maps to the pedal if we have one, and Tps1 if not.
61 
62  AuxTemp1, // 20
63  AuxTemp2,
64 
65  Lambda1,
66  Lambda2,
67 
70 
72 
74 
76 
77  FuelLevel,
78 
81 
83 
84  // Fast MAP is synchronous to crank angle - user selectable phase/window
85  MapFast,
86  // Slow MAP is asynchronous - not synced to anything, normal analog sampling
87  // MAP decoding happens only that often thus this is NOT raw MAP as flows from ADC
88  MapSlow,
89 
91 
92  EGT1,
93  EGT2,
94  EGT3,
95  EGT4,
96  EGT5,
97  EGT6,
98  EGT7,
99  EGT8,
100 
101  Maf2, // Second bank MAF sensor
102 
103  Map2,
104  MapSlow2,
105  MapFast2,
106 
107  // Pressure sensor after compressor, before intercooler
110 
111  // Pressure sensor before the throttle, after any turbo/etc
113 
114  DetectedGear,
115 
116  RangeInput1,
117  RangeInput2,
118  RangeInput3,
119  RangeInput4,
120  RangeInput5,
121  RangeInput6,
122 
123  // analog voltage inputs for Lua
124  AuxAnalog1,
125  AuxAnalog2,
126  AuxAnalog3,
127  AuxAnalog4,
128  AuxAnalog5,
129  AuxAnalog6,
130  AuxAnalog7,
131  AuxAnalog8,
132 
133  LuaGauge1,
134  LuaGauge2,
135  LuaGauge3,
136  LuaGauge4,
137  LuaGauge5,
138  LuaGauge6,
139  LuaGauge7,
140  LuaGauge8,
141 
143 
148 
149  AuxLinear1,
150  AuxLinear2,
151 
152  // frequency sensors
153  AuxSpeed1,
154  AuxSpeed2,
155 
156  // Let's always have all auxiliary sensors at the end - please add specific sensors above auxiliary
157 
158  // Leave me at the end!
160 };
@ Invalid
SensorType
Definition: sensor_type.h:18
@ FuelEthanolPercent
@ ThrottleInletPressure
@ AmbientTemperature
@ CompressorDischargePressure
@ AcceleratorPedalPrimary
@ CompressorDischargeTemperature
@ FuelPressureInjector
@ AcceleratorPedalSecondary
@ DriverThrottleIntent
@ DashOverrideBatteryVoltage
@ DashOverrideVehicleSpeed
@ BarometricPressure