better state validation
This commit is contained in:
parent
adf6b99b38
commit
3232d0d59d
|
@ -32,6 +32,10 @@ void setFlatInjectorLag(float value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
*/
|
*/
|
||||||
#define fixAngle(angle, msg) \
|
#define fixAngle(angle, msg) \
|
||||||
{ \
|
{ \
|
||||||
|
if (cisnan(angle)) { \
|
||||||
|
firmwareError(CUSTOM_ERR_6516, "angle NaN %s", msg); \
|
||||||
|
angle = 0; \
|
||||||
|
} \
|
||||||
assertAngleRange(angle, msg); \
|
assertAngleRange(angle, msg); \
|
||||||
float engineCycleDurationLocalCopy = ENGINE(engineCycle); \
|
float engineCycleDurationLocalCopy = ENGINE(engineCycle); \
|
||||||
/* todo: split this method into 'fixAngleUp' and 'fixAngleDown'*/ \
|
/* todo: split this method into 'fixAngleUp' and 'fixAngleDown'*/ \
|
||||||
|
|
Loading…
Reference in New Issue