mirror of https://github.com/rusefi/rusefi.git
This commit is contained in:
parent
d6fdc8b29b
commit
94c92f41dc
|
@ -494,5 +494,6 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
|
||||||
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||||
void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void assertEngineReference(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void assertEngineReference(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
void validateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
#endif /* H_ENGINE_H_ */
|
#endif /* H_ENGINE_H_ */
|
||||||
|
|
|
@ -1190,6 +1190,13 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void validateConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
if (engineConfiguration->adcVcc > 5.0f || engineConfiguration->adcVcc < 1.0f) {
|
||||||
|
engineConfiguration->adcVcc = 3.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void applyNonPersistentConfiguration(Logging * logger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
efiAssertVoid(getRemainingStack(chThdGetSelfX()) > 256, "apply c");
|
efiAssertVoid(getRemainingStack(chThdGetSelfX()) > 256, "apply c");
|
||||||
|
|
|
@ -151,6 +151,7 @@ persisted_configuration_state_e readConfiguration(Logging * logger) {
|
||||||
}
|
}
|
||||||
// we can only change the state after the CRC check
|
// we can only change the state after the CRC check
|
||||||
engineConfiguration->byFirmwareVersion = getRusEfiVersion();
|
engineConfiguration->byFirmwareVersion = getRusEfiVersion();
|
||||||
|
validateConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue