This commit is contained in:
parent
5bb24e0193
commit
b3e4ab1f6a
|
@ -81,7 +81,7 @@ floatms_t getBaseFuel(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
|
||||
floatms_t baseFuel;
|
||||
if (CONFIG(fuelAlgorithm) == LM_SPEED_DENSITY) {
|
||||
baseFuel = getSpeedDensityFuel(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
baseFuel = getSpeedDensityFuel(getMap() PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(baseFuel), "NaN sd baseFuel", 0);
|
||||
} else if (engineConfiguration->fuelAlgorithm == LM_REAL_MAF) {
|
||||
float maf = getRealMaf(PASS_ENGINE_PARAMETER_SIGNATURE) + engine->engineLoadAccelEnrichment.getEngineLoadEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "globalaccess.h"
|
||||
#include "speed_density.h"
|
||||
#include "interpolation.h"
|
||||
#include "rpm_calculator.h"
|
||||
#include "engine.h"
|
||||
#include "engine_math.h"
|
||||
#include "engine_state.h"
|
||||
#include "maf2map.h"
|
||||
|
||||
#define rpmMin 500
|
||||
|
@ -117,7 +117,7 @@ EXTERN_ENGINE;
|
|||
/**
|
||||
* @return per cylinder injection time, in Milliseconds
|
||||
*/
|
||||
floatms_t getSpeedDensityFuel(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
floatms_t getSpeedDensityFuel(float map DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
/**
|
||||
* most of the values are pre-calculated for performance reasons
|
||||
*/
|
||||
|
@ -126,7 +126,6 @@ floatms_t getSpeedDensityFuel(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
warning(CUSTOM_ERR_TCHARGE_NOT_READY2, "tChargeK not ready"); // this would happen before we have CLT reading for example
|
||||
return 0;
|
||||
}
|
||||
float map = getMap();
|
||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(map), "NaN map", 0);
|
||||
|
||||
float adjustedMap = map + engine->engineLoadAccelEnrichment.getEngineLoadEnrichment(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
#ifndef SPEED_DENSITY_H_
|
||||
#define SPEED_DENSITY_H_
|
||||
|
||||
#include "engine.h"
|
||||
|
||||
#define gramm_second_to_cc_minute(gs) ((gs) / 0.0119997981)
|
||||
#define cc_minute_to_gramm_second(ccm) ((ccm) * 0.0119997981)
|
||||
|
||||
|
@ -18,6 +16,6 @@ float sdMath(float airMass, float AFR DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|||
|
||||
void setDefaultVETable(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void initSpeedDensity(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
floatms_t getSpeedDensityFuel(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
floatms_t getSpeedDensityFuel(float map DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
#endif /* SPEED_DENSITY_H_ */
|
||||
|
|
Loading…
Reference in New Issue