diff --git a/firmware/controllers/algo/accel_enrichment.h b/firmware/controllers/algo/accel_enrichment.h index 6a09e23b54..796edc0ee1 100644 --- a/firmware/controllers/algo/accel_enrichment.h +++ b/firmware/controllers/algo/accel_enrichment.h @@ -13,6 +13,7 @@ #include "global.h" #include "cyclic_buffer.h" #include "table_helper.h" +#include "wall_fuel.h" typedef Map3D tps_tps_Map3D_t; @@ -57,7 +58,7 @@ private: * Wall wetting, also known as fuel film * See https://github.com/rusefi/rusefi/issues/151 for the theory */ -class WallFuel { +class WallFuel : public wall_fuel_state { public: WallFuel(); /** @@ -67,15 +68,7 @@ public: floatms_t adjust(int injectorIndex, floatms_t target DECLARE_ENGINE_PARAMETER_SUFFIX); floatms_t getWallFuel(int injectorIndex) const; void resetWF(); - /** - * fuel injection time correction to account for wall wetting effect, for current cycle - */ - floatms_t wallFuelCorrection = 0; private: - /** - * Amount of fuel on the wall, in ms of injector open time, for each injector. - */ - floatms_t wallFuel/*[INJECTION_PIN_COUNT]*/; }; void initAccelEnrichment(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/controllers/generated/wall_fuel.h b/firmware/controllers/generated/wall_fuel.h new file mode 100644 index 0000000000..fcced07ca5 --- /dev/null +++ b/firmware/controllers/generated/wall_fuel.h @@ -0,0 +1,25 @@ +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/wall_fuel.txt Fri Jul 12 22:41:50 EDT 2019 +// begin +#ifndef CONTROLLERS_GENERATED_WALL_FUEL_H +#define CONTROLLERS_GENERATED_WALL_FUEL_H +#include "rusefi_types.h" +// start of wall_fuel_state +struct wall_fuel_state { + /** + * * fuel injection time correction to account for wall wetting effect, for current cycle + * offset 0 + */ + float wallFuelCorrection = 0; + /** + * Amount of fuel on the wall, in ms of injector open time, for each injector. + * offset 4 + */ + floatms_t wallFuel = 0; + /** total size 8*/ +}; + +typedef struct wall_fuel_state wall_fuel_state; + +#endif +// end +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/wall_fuel.txt Fri Jul 12 22:41:50 EDT 2019 diff --git a/firmware/gen_config2.bat b/firmware/gen_config2.bat index e42f0fdfce..8f2b10463b 100644 --- a/firmware/gen_config2.bat +++ b/firmware/gen_config2.bat @@ -41,3 +41,11 @@ java -DSystemOut.name=gen_config2 ^ com.rusefi.ldmp.LiveDocsMetaParser ^ controllers/math/speed_density.cpp ^ "../" + +java -DSystemOut.name=gen_config2 ^ + -jar ../java_tools/ConfigDefinition.jar ^ + -definition integration/wall_fuel.txt ^ + -initialize_to_zero yes ^ + -java_destination ../java_console/models/src/com/rusefi/config/generated/WallFuelState.java ^ + -c_destination controllers/generated/wall_fuel.h + diff --git a/firmware/integration/wall_fuel.txt b/firmware/integration/wall_fuel.txt new file mode 100644 index 0000000000..1c1e61f4d9 --- /dev/null +++ b/firmware/integration/wall_fuel.txt @@ -0,0 +1,5 @@ +struct_no_prefix wall_fuel_state +float wallFuelCorrection;* fuel injection time correction to account for wall wetting effect, for current cycle +floatms_t wallFuel;Amount of fuel on the wall, in ms of injector open time, for each injector. +! wall_fuel_state +end_struct diff --git a/java_console/models/src/com/rusefi/config/generated/WallFuelState.java b/java_console/models/src/com/rusefi/config/generated/WallFuelState.java new file mode 100644 index 0000000000..f1283baca3 --- /dev/null +++ b/java_console/models/src/com/rusefi/config/generated/WallFuelState.java @@ -0,0 +1,14 @@ +package com.rusefi.config.generated; + +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/wall_fuel.txt Fri Jul 12 22:41:50 EDT 2019 + +import com.rusefi.config.*; + +public class WallFuelState { + public static final Field WALLFUELCORRECTION = Field.create("WALLFUELCORRECTION", 0, FieldType.FLOAT); + public static final Field WALLFUEL = Field.create("WALLFUEL", 4, FieldType.FLOAT); + public static final Field[] VALUES = { + WALLFUELCORRECTION, + WALLFUEL, + }; +}