improving internal consistency validation

This commit is contained in:
rusefi 2017-03-19 17:54:03 -04:00
parent 7a876bd45b
commit 24559473d6
3 changed files with 7 additions and 0 deletions

View File

@ -436,5 +436,6 @@ void prepareShapes(DECLARE_ENGINE_PARAMETER_F);
void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_ENGINE_PARAMETER_S);
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_S);
void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_F);
void assertEngineReference(DECLARE_ENGINE_PARAMETER_F);
#endif /* H_ENGINE_H_ */

View File

@ -1068,6 +1068,8 @@ void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_S
scheduleMsg(logger, "applyNonPersistentConfiguration()");
#endif
assertEngineReference(PASS_ENGINE_PARAMETER_F);
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
engine->triggerCentral.triggerShape.initializeTriggerShape(logger PASS_ENGINE_PARAMETER);
#endif

View File

@ -507,3 +507,7 @@ void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_S) {
void setInjectorLag(float value DECLARE_ENGINE_PARAMETER_S) {
setArrayValues(engineConfiguration->injector.battLagCorr, VBAT_INJECTOR_CURVE_SIZE, value);
}
void assertEngineReference(DECLARE_ENGINE_PARAMETER_F) {
efiAssertVoid(engine != NULL, "engine is NULL");
}