fix #514
This commit is contained in:
parent
fe932b82c4
commit
f8014b2a1a
|
@ -90,6 +90,10 @@
|
|||
#include "HIP9011.h"
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
|
||||
#include "trigger_emulator.h"
|
||||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||
|
||||
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
|
||||
#include "tunerstudio.h"
|
||||
#endif
|
||||
|
@ -172,7 +176,9 @@ void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
|
||||
onConfigurationChangeTriggerCallback(&activeConfiguration);
|
||||
#endif /* EFI_SHAFT_POSITION_INPUT */
|
||||
|
||||
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
|
||||
onConfigurationChangeRpmEmulatorCallback(&activeConfiguration);
|
||||
#endif /* EFI_EMULATE_POSITION_SENSORS */
|
||||
rememberCurrentConfiguration();
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,14 @@ static OutputPin emulatorOutputs[3];
|
|||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration) {
|
||||
if (engineConfiguration->bc.triggerSimulatorFrequency ==
|
||||
previousConfiguration->bc.triggerSimulatorFrequency) {
|
||||
return;
|
||||
}
|
||||
setTriggerEmulatorRPM(engineConfiguration->bc.triggerSimulatorFrequency);
|
||||
}
|
||||
|
||||
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
||||
|
||||
|
|
|
@ -16,5 +16,6 @@
|
|||
|
||||
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void setTriggerEmulatorRPM(int value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration);
|
||||
|
||||
#endif /* DIST_EMULATOR_H_ */
|
||||
|
|
Loading…
Reference in New Issue