auto-sync
This commit is contained in:
parent
dc6669e8fe
commit
d6db339524
|
@ -30,9 +30,9 @@
|
|||
EXTERN_ENGINE;
|
||||
|
||||
void initDataStructures(DECLARE_ENGINE_PARAMETER_F) {
|
||||
prepareFuelMap(engineConfiguration);
|
||||
prepareFuelMap(PASS_ENGINE_PARAMETER_F);
|
||||
prepareTimingMap(PASS_ENGINE_PARAMETER_F);
|
||||
initSpeedDensity(config);
|
||||
initSpeedDensity(PASS_ENGINE_PARAMETER_F);
|
||||
}
|
||||
|
||||
void initAlgo(Logging *sharedLogger, engine_configuration_s *engineConfiguration) {
|
||||
|
|
|
@ -134,13 +134,12 @@ void setWholeTimingTable(engine_configuration_s *engineConfiguration, float valu
|
|||
* This method sets the default global engine configuration. These values are later overridden by engine-specific defaults
|
||||
* and the settings saves in flash memory.
|
||||
*/
|
||||
void setDefaultConfiguration(persistent_config_s *config) {
|
||||
engine_configuration_s *engineConfiguration = &config->engineConfiguration;
|
||||
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
||||
memset(engineConfiguration, 0, sizeof(engine_configuration_s));
|
||||
memset(boardConfiguration, 0, sizeof(board_configuration_s));
|
||||
|
||||
setDetaultVETable(config);
|
||||
setDetaultVETable(PASS_ENGINE_PARAMETER_F);
|
||||
|
||||
boardConfiguration->mafSensorType = Bosch0280218037;
|
||||
setBosch0280218037(engineConfiguration);
|
||||
|
@ -540,7 +539,7 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
|
|||
/**
|
||||
* Let's apply global defaults first
|
||||
*/
|
||||
setDefaultConfiguration(config);
|
||||
setDefaultConfiguration(PASS_ENGINE_PARAMETER_F);
|
||||
#if EFI_SIMULATOR
|
||||
engineConfiguration->directSelfStimulation = true;
|
||||
#endif /* */
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct {
|
|||
crc_t value;
|
||||
} persistent_config_container_s;
|
||||
|
||||
void setDefaultConfiguration(persistent_config_s *config);
|
||||
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F);
|
||||
void setMap(fuel_table_t table, float value);
|
||||
void setWholeFuelMap(engine_configuration_s *engineConfiguration, float value);
|
||||
void setWholeTimingTable(engine_configuration_s *engineConfiguration, float value);
|
||||
|
|
|
@ -154,9 +154,9 @@ float getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_S) {
|
|||
* @note this method has nothing to do with fuel map VALUES - it's job
|
||||
* is to prepare the fuel map data structure for 3d interpolation
|
||||
*/
|
||||
void prepareFuelMap(engine_configuration_s *e) {
|
||||
fuelMap.init(e->fuelTable, e->fuelLoadBins, e->fuelRpmBins);
|
||||
fuelPhaseMap.init(e->injectionPhase, e->injPhaseLoadBins, e->injPhaseRpmBins);
|
||||
void prepareFuelMap(DECLARE_ENGINE_PARAMETER_F) {
|
||||
fuelMap.init(engineConfiguration->fuelTable, engineConfiguration->fuelLoadBins, engineConfiguration->fuelRpmBins);
|
||||
fuelPhaseMap.init(engineConfiguration->injectionPhase, engineConfiguration->injPhaseLoadBins, engineConfiguration->injPhaseRpmBins);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "engine.h"
|
||||
|
||||
void prepareFuelMap(engine_configuration_s *engineConfiguration);
|
||||
void prepareFuelMap(DECLARE_ENGINE_PARAMETER_F);
|
||||
|
||||
float getRealMafFuel(float airMass, int rpm DECLARE_ENGINE_PARAMETER_S);
|
||||
float getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_S);
|
||||
|
|
|
@ -92,8 +92,7 @@ float getSpeedDensityFuel(int rpm DECLARE_ENGINE_PARAMETER_S) {
|
|||
return sdMath(engineConfiguration, VE, map, AFR, tChargeK) * 1000;
|
||||
}
|
||||
|
||||
void setDetaultVETable(persistent_config_s *config) {
|
||||
engine_configuration_s *engineConfiguration = &config->engineConfiguration;
|
||||
void setDetaultVETable(DECLARE_ENGINE_PARAMETER_F) {
|
||||
setRpmTableBin(engineConfiguration->veRpmBins, FUEL_RPM_COUNT);
|
||||
setTableBin2(engineConfiguration->veLoadBins, FUEL_LOAD_COUNT, 10, 300, 1);
|
||||
veMap.setAll(0.8);
|
||||
|
@ -107,7 +106,7 @@ void setDetaultVETable(persistent_config_s *config) {
|
|||
afrMap.setAll(14.7);
|
||||
}
|
||||
|
||||
void initSpeedDensity(persistent_config_s *config) {
|
||||
void initSpeedDensity(DECLARE_ENGINE_PARAMETER_F) {
|
||||
efiAssertVoid(config!=NULL, "config is NULL");
|
||||
engine_configuration_s *e = &config->engineConfiguration;
|
||||
veMap.init(e->veTable, e->veLoadBins, e->veRpmBins);
|
||||
|
|
|
@ -17,8 +17,8 @@ float sdMath(engine_configuration_s *engineConfiguration, float VE, float MAP, f
|
|||
|
||||
#define cc_minute_to_gramm_second(ccm) ((ccm) * 0.0119997981)
|
||||
|
||||
void setDetaultVETable(engine_configuration_s *engineConfiguration);
|
||||
void initSpeedDensity(persistent_config_s *config);
|
||||
void setDetaultVETable(DECLARE_ENGINE_PARAMETER_F);
|
||||
void initSpeedDensity(DECLARE_ENGINE_PARAMETER_F);
|
||||
float getSpeedDensityFuel(int rpm DECLARE_ENGINE_PARAMETER_S);
|
||||
|
||||
#endif /* SPEED_DENSITY_H_ */
|
||||
|
|
|
@ -36,10 +36,10 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persiste
|
|||
engine.engineConfiguration2 = &ec2;
|
||||
|
||||
Engine *engine = &this->engine;
|
||||
prepareFuelMap(engine->engineConfiguration);
|
||||
prepareFuelMap(PASS_ENGINE_PARAMETER_F);
|
||||
|
||||
|
||||
initSpeedDensity(&persistentConfig);
|
||||
initSpeedDensity(PASS_ENGINE_PARAMETER_F);
|
||||
|
||||
resetConfigurationExt(NULL, engineType PASS_ENGINE_PARAMETER);
|
||||
prepareShapes(PASS_ENGINE_PARAMETER_F);
|
||||
|
|
|
@ -302,8 +302,10 @@ static void testTriggerDecoder2(const char *msg, engine_type_e type, int synchPo
|
|||
EngineTestHelper eth(type);
|
||||
engine_configuration_s *ec = eth.ec;
|
||||
persistent_config_s *config = eth.config;
|
||||
engine_configuration_s * engineConfiguration = eth.engineConfiguration;
|
||||
Engine *engine = ð.engine;
|
||||
|
||||
initSpeedDensity(config);
|
||||
initSpeedDensity(PASS_ENGINE_PARAMETER_F);
|
||||
|
||||
TriggerShape *t = ð.engine.triggerShape;
|
||||
|
||||
|
|
Loading…
Reference in New Issue