user is unable to start with zero fuel - at least showing a warning

https://rusefi.com/forum/viewtopic.php?p=33761#p33760
This commit is contained in:
rusefi 2019-07-06 20:45:47 -04:00
parent 52a0ce8c72
commit 2c515f13a9
4 changed files with 10 additions and 5 deletions

View File

@ -350,7 +350,12 @@ floatms_t getCrankingFuel3(float coolantTemperature,
float tpsCoef = cisnan(tps) ? 1 : interpolate2d("crankTps", tps, engineConfiguration->crankingTpsBins,
engineConfiguration->crankingTpsCoef, CRANKING_CURVE_SIZE);
return baseCrankingFuel * durationCoef * coolantTempCoef * tpsCoef;
floatms_t result = baseCrankingFuel * durationCoef * coolantTempCoef * tpsCoef;
if (result <= 0) {
warning(CUSTOM_ERR_ZERO_CRANKING_FUEL, "Cranking fuel value %f", result);
}
return result;
}
float getFuelRate(floatms_t totalInjDuration, efitick_t timePeriod DECLARE_ENGINE_PARAMETER_SUFFIX) {

View File

@ -2051,10 +2051,10 @@ typedef enum {
CUSTOM_ERR_6689 = 6689,
CUSTOM_ERR_6690 = 6690,
CUSTOM_ERR_6691 = 6691,
CUSTOM_ERR_MAP_AVG_OFFSET = 6691,
CUSTOM_ERR_6692 = 6692,
CUSTOM_ERR_6693 = 6693,
CUSTOM_ERR_6694 = 6694,
CUSTOM_ERR_ZERO_CRANKING_FUEL = 6694,
CUSTOM_ERR_6695 = 6695,
CUSTOM_ERR_6696 = 6696,
CUSTOM_ERR_6697 = 6697,

View File

@ -810,6 +810,6 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20190630;
return 20190706;
}
#endif /* EFI_UNIT_TEST */

View File

@ -232,7 +232,7 @@ void refreshMapAveragingPreCalc(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
efiAssertVoid(CUSTOM_ERR_6690, !cisnan(start), "start");
angle_t offsetAngle = TRIGGER_SHAPE(eventAngles[CONFIG(mapAveragingSchedulingAtIndex)]);
efiAssertVoid(CUSTOM_ERR_6691, !cisnan(offsetAngle), "offsetAngle");
efiAssertVoid(CUSTOM_ERR_MAP_AVG_OFFSET, !cisnan(offsetAngle), "offsetAngle");
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
angle_t cylinderOffset = getEngineCycle(engineConfiguration->operationMode) * i / engineConfiguration->specs.cylindersCount;