Annotations in C++ code to produce formulas in rusEfi console #807

wall wetting
This commit is contained in:
rusefi 2019-07-12 22:51:59 -04:00
parent e5adb164e2
commit 4e6ccdb13b
5 changed files with 54 additions and 9 deletions

View File

@ -13,6 +13,7 @@
#include "global.h"
#include "cyclic_buffer.h"
#include "table_helper.h"
#include "wall_fuel.h"
typedef Map3D<TPS_TPS_ACCEL_TABLE, TPS_TPS_ACCEL_TABLE, float, float> 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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,
};
}