auto-sync

This commit is contained in:
rusEfi 2015-02-28 00:04:17 -06:00
parent dc6669e8fe
commit d6db339524
9 changed files with 19 additions and 19 deletions

View File

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

View File

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

View File

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

View File

@ -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);
}
/**

View File

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

View File

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

View File

@ -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_ */

View File

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

View File

@ -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 = &eth.engine;
initSpeedDensity(config);
initSpeedDensity(PASS_ENGINE_PARAMETER_F);
TriggerShape *t = &eth.engine.triggerShape;