rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
engine_state_generated.h
Go to the documentation of this file.
1// this section was generated automatically by rusEFI tool config_definition_base-all.jar based on (unknown script) controllers/algo/engine_state.txt
2// by class com.rusefi.output.CHeaderConsumer
3// begin
4#pragma once
5#include "rusefi_types.h"
6// start of LuaAdjustments
8 /**
9 * Lua: Fuel add
10 * units: g
11 * offset 0
12 */
13 float fuelAdd = (float)0;
14 /**
15 * Lua: Fuel mult
16 * offset 4
17 */
18 float fuelMult = (float)0;
19 /**
20 * Lua: torque
21 * offset 8
22 */
23 float engineTorque = (float)0;
24 /**
25 offset 12 bit 0 */
26 bool clutchUpState : 1 {};
27 /**
28 offset 12 bit 1 */
29 bool brakePedalState : 1 {};
30 /**
31 offset 12 bit 2 */
32 bool acRequestState : 1 {};
33 /**
34 offset 12 bit 3 */
35 bool luaDisableEtb : 1 {};
36 /**
37 offset 12 bit 4 */
38 bool luaIgnCut : 1 {};
39 /**
40 offset 12 bit 5 */
41 bool luaFuelCut : 1 {};
42 /**
43 offset 12 bit 6 */
44 bool clutchDownState : 1 {};
45 /**
46 offset 12 bit 7 */
48 /**
49 offset 12 bit 8 */
51 /**
52 offset 12 bit 9 */
53 bool unusedBit_12_9 : 1 {};
54 /**
55 offset 12 bit 10 */
56 bool unusedBit_12_10 : 1 {};
57 /**
58 offset 12 bit 11 */
59 bool unusedBit_12_11 : 1 {};
60 /**
61 offset 12 bit 12 */
62 bool unusedBit_12_12 : 1 {};
63 /**
64 offset 12 bit 13 */
65 bool unusedBit_12_13 : 1 {};
66 /**
67 offset 12 bit 14 */
68 bool unusedBit_12_14 : 1 {};
69 /**
70 offset 12 bit 15 */
71 bool unusedBit_12_15 : 1 {};
72 /**
73 offset 12 bit 16 */
74 bool unusedBit_12_16 : 1 {};
75 /**
76 offset 12 bit 17 */
77 bool unusedBit_12_17 : 1 {};
78 /**
79 offset 12 bit 18 */
80 bool unusedBit_12_18 : 1 {};
81 /**
82 offset 12 bit 19 */
83 bool unusedBit_12_19 : 1 {};
84 /**
85 offset 12 bit 20 */
86 bool unusedBit_12_20 : 1 {};
87 /**
88 offset 12 bit 21 */
89 bool unusedBit_12_21 : 1 {};
90 /**
91 offset 12 bit 22 */
92 bool unusedBit_12_22 : 1 {};
93 /**
94 offset 12 bit 23 */
95 bool unusedBit_12_23 : 1 {};
96 /**
97 offset 12 bit 24 */
98 bool unusedBit_12_24 : 1 {};
99 /**
100 offset 12 bit 25 */
101 bool unusedBit_12_25 : 1 {};
102 /**
103 offset 12 bit 26 */
104 bool unusedBit_12_26 : 1 {};
105 /**
106 offset 12 bit 27 */
107 bool unusedBit_12_27 : 1 {};
108 /**
109 offset 12 bit 28 */
110 bool unusedBit_12_28 : 1 {};
111 /**
112 offset 12 bit 29 */
113 bool unusedBit_12_29 : 1 {};
114 /**
115 offset 12 bit 30 */
116 bool unusedBit_12_30 : 1 {};
117 /**
118 offset 12 bit 31 */
119 bool unusedBit_12_31 : 1 {};
120};
121static_assert(sizeof(LuaAdjustments) == 16);
122
123// start of speed_density_s
125 /**
126 * Air: Charge temperature estimate
127 * units: deg C
128 * offset 0
129 */
130 scaled_channel<int16_t, 100, 1> tCharge = (int16_t)0;
131 /**
132 * need 4 byte alignment
133 * units: units
134 * offset 2
135 */
136 uint8_t alignmentFill_at_2[2] = {};
137 /**
138 * Air: Charge temperature estimate K
139 * offset 4
140 */
141 float tChargeK = (float)0;
142};
143static_assert(sizeof(speed_density_s) == 8);
144
145// start of cranking_fuel_s
147 /**
148 * Fuel: cranking CLT mult
149 * offset 0
150 */
152 /**
153 * Fuel: cranking TPS mult
154 * offset 4
155 */
157 /**
158 * Fuel: Cranking cycle base mass
159 * units: mg
160 * offset 8
161 */
162 scaled_channel<uint16_t, 100, 1> baseFuel = (uint16_t)0;
163 /**
164 * Fuel: Cranking cycle mass
165 * units: mg
166 * offset 10
167 */
168 scaled_channel<uint16_t, 100, 1> fuel = (uint16_t)0;
169};
170static_assert(sizeof(cranking_fuel_s) == 12);
171
172// start of engine_state_s
174 /**
175 * offset 0
176 */
177 float injectionMass[MAX_CYLINDER_COUNT] = {};
178 /**
179 * offset 48
180 */
182 /**
183 * offset 64
184 */
186 /**
187 * offset 72
188 */
190 /**
191 * @@GAUGE_NAME_FUEL_BARO_CORR@@
192 * offset 84
193 */
195 /**
196 * Detected Board ID
197 * units: id
198 * offset 88
199 */
200 int16_t hellenBoardId = (int16_t)0;
201 /**
202 * @@INDICATOR_NAME_CLUTCH_UP@@
203 * offset 90
204 */
205 int8_t clutchUpState = (int8_t)0;
206 /**
207 * @@INDICATOR_NAME_BRAKE_DOWN@@
208 * offset 91
209 */
210 int8_t brakePedalState = (int8_t)0;
211 /**
212 * offset 92
213 */
214 int8_t startStopState = (int8_t)0;
215 /**
216 * offset 93
217 */
218 int8_t smartChipState = (int8_t)0;
219 /**
220 * offset 94
221 */
222 int8_t smartChipRestartCounter = (int8_t)0;
223 /**
224 * offset 95
225 */
226 int8_t smartChipAliveCounter = (int8_t)0;
227 /**
228 offset 96 bit 0 */
230 /**
231 * Harley ACR Active
232 offset 96 bit 1 */
233 bool acrActive : 1 {};
234 /**
235 offset 96 bit 2 */
237 /**
238 offset 96 bit 3 */
240 /**
241 offset 96 bit 4 */
242 bool luaDigitalState0 : 1 {};
243 /**
244 offset 96 bit 5 */
245 bool luaDigitalState1 : 1 {};
246 /**
247 offset 96 bit 6 */
248 bool luaDigitalState2 : 1 {};
249 /**
250 offset 96 bit 7 */
251 bool luaDigitalState3 : 1 {};
252 /**
253 * @@INDICATOR_NAME_CLUTCH_DOWN@@
254 offset 96 bit 8 */
255 bool clutchDownState : 1 {};
256 /**
257 offset 96 bit 9 */
258 bool unusedBit_21_9 : 1 {};
259 /**
260 offset 96 bit 10 */
261 bool unusedBit_21_10 : 1 {};
262 /**
263 offset 96 bit 11 */
264 bool unusedBit_21_11 : 1 {};
265 /**
266 offset 96 bit 12 */
267 bool unusedBit_21_12 : 1 {};
268 /**
269 offset 96 bit 13 */
270 bool unusedBit_21_13 : 1 {};
271 /**
272 offset 96 bit 14 */
273 bool unusedBit_21_14 : 1 {};
274 /**
275 offset 96 bit 15 */
276 bool unusedBit_21_15 : 1 {};
277 /**
278 offset 96 bit 16 */
279 bool unusedBit_21_16 : 1 {};
280 /**
281 offset 96 bit 17 */
282 bool unusedBit_21_17 : 1 {};
283 /**
284 offset 96 bit 18 */
285 bool unusedBit_21_18 : 1 {};
286 /**
287 offset 96 bit 19 */
288 bool unusedBit_21_19 : 1 {};
289 /**
290 offset 96 bit 20 */
291 bool unusedBit_21_20 : 1 {};
292 /**
293 offset 96 bit 21 */
294 bool unusedBit_21_21 : 1 {};
295 /**
296 offset 96 bit 22 */
297 bool unusedBit_21_22 : 1 {};
298 /**
299 offset 96 bit 23 */
300 bool unusedBit_21_23 : 1 {};
301 /**
302 offset 96 bit 24 */
303 bool unusedBit_21_24 : 1 {};
304 /**
305 offset 96 bit 25 */
306 bool unusedBit_21_25 : 1 {};
307 /**
308 offset 96 bit 26 */
309 bool unusedBit_21_26 : 1 {};
310 /**
311 offset 96 bit 27 */
312 bool unusedBit_21_27 : 1 {};
313 /**
314 offset 96 bit 28 */
315 bool unusedBit_21_28 : 1 {};
316 /**
317 offset 96 bit 29 */
318 bool unusedBit_21_29 : 1 {};
319 /**
320 offset 96 bit 30 */
321 bool unusedBit_21_30 : 1 {};
322 /**
323 offset 96 bit 31 */
324 bool unusedBit_21_31 : 1 {};
325 /**
326 * offset 100
327 */
328 uint32_t startStopStateToggleCounter = (uint32_t)0;
329 /**
330 * offset 104
331 */
332 float currentVe = (float)0;
333 /**
334 * offset 108
335 */
337 /**
338 * offset 112
339 */
341 /**
342 * offset 116
343 */
345 /**
346 * Fuel: Injection counter
347 * offset 120
348 */
349 uint32_t fuelInjectionCounter = (uint32_t)0;
350 /**
351 * Ign: Spark counter
352 * offset 124
353 */
354 uint32_t globalSparkCounter = (uint32_t)0;
355 /**
356 * @@GAUGE_NAME_FUEL_LOAD@@
357 * offset 128
358 */
359 float fuelingLoad = (float)0;
360 /**
361 * @@GAUGE_NAME_IGNITION_LOAD@@
362 * offset 132
363 */
364 float ignitionLoad = (float)0;
365 /**
366 * units: %
367 * offset 136
368 */
369 scaled_channel<uint16_t, 100, 1> veTableYAxis = (uint16_t)0;
370 /**
371 * offset 138
372 */
373 scaled_channel<int16_t, 10, 1> veTableIdleYAxis = (int16_t)0;
374 /**
375 * "Ignition: overcharge canceled"
376 * offset 140
377 */
378 uint8_t overDwellCanceledCounter = (uint8_t)0;
379 /**
380 * "Ignition: overDwellNotScheduled"
381 * offset 141
382 */
383 uint8_t overDwellNotScheduledCounter = (uint8_t)0;
384 /**
385 * "Ignition: sparkOutOfOrder"
386 * offset 142
387 */
388 uint8_t sparkOutOfOrderCounter = (uint8_t)0;
389 /**
390 * "Ignition: undecharge warnings"
391 * offset 143
392 */
393 uint8_t dwellUnderChargeCounter = (uint8_t)0;
394 /**
395 * "Ignition: overcharge warnings"
396 * offset 144
397 */
398 uint8_t dwellOverChargeCounter = (uint8_t)0;
399 /**
400 * need 4 byte alignment
401 * units: units
402 * offset 145
403 */
404 uint8_t alignmentFill_at_145[3] = {};
405 /**
406 * "Ignition: Dwell deviation"
407 * units: %
408 * offset 148
409 */
411 /**
412 * STFT: Bank
413 * units: %
414 * offset 152
415 */
416 float stftCorrection[FT_BANK_COUNT] = {};
417};
418static_assert(sizeof(engine_state_s) == 160);
419
420// end
421// this section was generated automatically by rusEFI tool config_definition_base-all.jar based on (unknown script) controllers/algo/engine_state.txt
scaled_channel< uint16_t, 100, 1 > baseFuel
scaled_channel< uint16_t, 100, 1 > fuel
float stftCorrection[FT_BANK_COUNT]
float injectionMass[MAX_CYLINDER_COUNT]
cranking_fuel_s crankingFuel
scaled_channel< int16_t, 10, 1 > veTableIdleYAxis
scaled_channel< uint16_t, 100, 1 > veTableYAxis
scaled_channel< int16_t, 100, 1 > tCharge