2022-01-04 22:49:51 -08:00
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/engine_state.txt Wed Jan 05 06:47:26 UTC 2022
2019-07-20 11:56:56 -07:00
// by class com.rusefi.output.CHeaderConsumer
2019-06-17 09:18:55 -07:00
// begin
2020-07-05 23:07:22 -07:00
# pragma once
2019-06-17 09:18:55 -07:00
# include "rusefi_types.h"
2019-06-19 19:34:11 -07:00
// start of speed_density_s
struct speed_density_s {
2019-06-17 09:18:55 -07:00
/**
offset 0 bit 0 */
2021-12-01 21:04:17 -08:00
bool isTChargeAirModel : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 1 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_1 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 2 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_2 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 3 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_3 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 4 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_4 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 5 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_5 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 6 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_6 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 7 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_7 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 8 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_8 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 9 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_9 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 10 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_10 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 11 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_11 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 12 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_12 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 13 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_13 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 14 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_14 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 15 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_15 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 16 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_16 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 17 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_17 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 18 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_18 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 19 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_19 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 20 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_20 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 21 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_21 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 22 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_22 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 23 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_23 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 24 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_24 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 25 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_25 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 26 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_26 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 27 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_27 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 28 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_28 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 29 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_29 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 30 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_30 : 1 { } ;
2020-02-25 19:01:13 -08:00
/**
offset 0 bit 31 */
2021-12-01 21:04:17 -08:00
bool unusedBit_1_31 : 1 { } ;
2019-06-17 09:18:55 -07:00
/**
2019-06-19 19:34:11 -07:00
* Speed - density logic : calculated air mass in one cylinder , in grams
2019-06-17 09:18:55 -07:00
* offset 4
*/
2019-07-21 14:06:16 -07:00
float airMassInOneCylinder = ( float ) 0 ;
2019-06-17 09:18:55 -07:00
/**
2019-06-19 19:34:11 -07:00
* speed density
* Rate - of - change limiter is applied to degrees , so we store both Kelvin and degrees .
2019-06-17 09:18:55 -07:00
* offset 8
*/
2019-07-21 14:06:16 -07:00
float tCharge = ( float ) 0 ;
2019-06-17 09:18:55 -07:00
/**
* offset 12
*/
2019-07-21 14:06:16 -07:00
float tChargeK = ( float ) 0 ;
2019-06-17 09:18:55 -07:00
/**
* offset 16
*/
2019-07-21 14:06:16 -07:00
float Tcharge_coff = ( float ) 0 ;
2019-06-17 09:18:55 -07:00
/**
* offset 20
*/
2019-07-21 14:06:16 -07:00
floatms_t airFlow = ( floatms_t ) 0 ;
2021-10-16 18:49:38 -07:00
/** total size 24*/
2019-06-19 19:34:11 -07:00
} ;
2019-08-26 20:41:04 -07:00
// start of cranking_fuel_s
struct cranking_fuel_s {
/**
* Duration of injection , in ms . During cranking we do not account for injector flow , so if you change injectors you would need to change settings .
* Deprecated . Please use ' 1 ' .
* TODO : maybe account for injector flow ?
* offset 0
*/
floatms_t baseFuel = ( floatms_t ) 0 ;
/**
* offset 4
*/
float coolantTemperatureCoefficient = ( float ) 0 ;
/**
* offset 8
*/
float tpsCoefficient = ( float ) 0 ;
/**
* offset 12
*/
float durationCoefficient = ( float ) 0 ;
/**
* Actual injection duration based on all above coefficients .
* offset 16
*/
floatms_t fuel = ( floatms_t ) 0 ;
/** total size 20*/
} ;
// start of running_fuel_s
struct running_fuel_s {
/**
* offset 0
*/
float postCrankingFuelCorrection = ( float ) 0 ;
/**
* offset 4
*/
float intakeTemperatureCoefficient = ( float ) 0 ;
/**
* offset 8
*/
float coolantTemperatureCoefficient = ( float ) 0 ;
/**
* offset 12
*/
float timeSinceCrankingInSecs = ( float ) 0 ;
/**
* injectorLag ( VBatt )
* this value depends on a slow - changing VBatt value , so
* we update it once in a while
* offset 16
*/
floatms_t injectorLag = ( floatms_t ) 0 ;
/**
* offset 20
*/
2019-08-27 21:29:55 -07:00
floatms_t baseFuel = ( floatms_t ) 0 ;
2019-08-26 20:41:04 -07:00
/**
* Actual injection duration with CLT , IAT and TPS acceleration corrections per cycle , as squirt duration .
* Without injector lag .
* @ see baseFuel
* @ see actualLastInjection
2021-05-08 14:43:56 -07:00
* offset 24
2019-08-26 20:41:04 -07:00
*/
floatms_t fuel = ( floatms_t ) 0 ;
2021-05-08 14:43:56 -07:00
/** total size 28*/
2019-08-26 20:41:04 -07:00
} ;
2019-06-19 19:34:11 -07:00
// start of engine_state2_s
struct engine_state2_s {
/**
* offset 0
*/
speed_density_s sd ;
2019-06-17 18:37:11 -07:00
/**
2021-10-16 18:49:38 -07:00
* offset 24
2019-06-17 18:37:11 -07:00
*/
2019-07-21 14:06:16 -07:00
float targetAFR = ( float ) 0 ;
2019-06-19 19:34:11 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 28
2019-06-19 19:34:11 -07:00
*/
2019-07-21 14:06:16 -07:00
float engineCycleDurationMs = ( float ) 0 ;
2019-06-19 19:34:11 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 32
2019-06-19 19:34:11 -07:00
*/
2019-07-21 14:06:16 -07:00
float minRpmKcurrentTPS = ( float ) 0 ;
2019-06-19 19:34:11 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 36
2019-06-19 19:34:11 -07:00
*/
2019-07-21 14:06:16 -07:00
int currentTpsAdc = ( int ) 0 ;
2019-06-19 19:34:11 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 40
2019-06-19 19:34:11 -07:00
*/
2019-07-21 14:06:16 -07:00
float tpsVoltageMCU = ( float ) 0 ;
2019-06-19 19:34:11 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 44
2019-06-19 19:34:11 -07:00
*/
2019-07-21 14:06:16 -07:00
float tpsVoltageBoard = ( float ) 0 ;
2019-06-19 19:34:11 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 48
2019-06-19 19:34:11 -07:00
*/
2019-07-21 14:06:16 -07:00
float currentBaroCorrectedVE = ( float ) 0 ;
2019-08-26 20:41:04 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 52
2019-08-26 20:41:04 -07:00
*/
2019-09-24 15:39:26 -07:00
float injectorFlowCorrection = ( float ) 0 ;
/**
2021-10-16 20:55:29 -07:00
* offset 56
2019-09-24 15:39:26 -07:00
*/
2019-08-26 20:41:04 -07:00
float baroCorrection = ( float ) 0 ;
/**
2021-10-16 20:55:29 -07:00
* offset 60
2019-08-26 20:41:04 -07:00
*/
cranking_fuel_s cranking ;
/**
2021-10-16 20:55:29 -07:00
* offset 80
2019-08-26 20:41:04 -07:00
*/
running_fuel_s running ;
2019-09-01 12:46:40 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 108
2019-09-01 12:46:40 -07:00
*/
percent_t etbFeedForward = ( percent_t ) 0 ;
2019-09-22 05:44:51 -07:00
/**
2021-10-16 20:55:29 -07:00
* offset 112
2019-09-22 05:44:51 -07:00
*/
percent_t targetFromTable = ( percent_t ) 0 ;
2019-11-05 20:36:33 -08:00
/**
* ignition dwell duration in ms
* See also dwellAngle
2021-10-16 20:55:29 -07:00
* offset 116
2019-11-05 20:36:33 -08:00
*/
floatms_t sparkDwell = ( floatms_t ) 0 ;
/**
* ignition dwell duration as crankshaft angle
* NAN if engine is stopped
* See also sparkDwell
2021-10-16 20:55:29 -07:00
* offset 120
2019-11-05 20:36:33 -08:00
*/
angle_t dwellAngle = ( angle_t ) 0 ;
/**
2021-10-16 20:55:29 -07:00
* offset 124
2019-11-05 20:36:33 -08:00
*/
angle_t cltTimingCorrection = ( angle_t ) 0 ;
2021-10-16 20:55:29 -07:00
/** total size 128*/
2019-06-17 09:18:55 -07:00
} ;
// end
2022-01-04 22:49:51 -08:00
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/engine_state.txt Wed Jan 05 06:47:26 UTC 2022