mirror of https://github.com/rusefi/rusefi-1.git
better state validation
This commit is contained in:
parent
ce35b09ecb
commit
29878fcb4f
|
@ -101,8 +101,10 @@ angle_t getinjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
if (isnan(engineLoad)) {
|
if (isnan(engineLoad)) {
|
||||||
return 0; // error already reported
|
return 0; // error already reported
|
||||||
}
|
}
|
||||||
angle_t result = fuelPhaseMap.getValue(rpm, engineLoad) + CONFIG(extraInjectionOffset);
|
angle_t value = fuelPhaseMap.getValue(rpm, engineLoad);
|
||||||
fixAngle(result, "inj offset");
|
efiAssert(!cisnan(value), "inj offset#1", 0);
|
||||||
|
angle_t result = value + CONFIG(extraInjectionOffset);
|
||||||
|
fixAngle(result, "inj offset#2");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue