hopefully bugfix

This commit is contained in:
rusefi 2017-07-05 22:22:24 -04:00
parent e03883ab96
commit 698fdafb5c
1 changed files with 10 additions and 5 deletions

View File

@ -80,6 +80,9 @@ uint32_t triggerMaxDuration = 0;
static bool isInsideTriggerHandler = false;
/**
* true if most recent configuration change has changed any of the trigger settings
*/
static bool isTriggerConfigChanged = false;
efitick_t previousVvtCamTime = 0;
@ -565,16 +568,18 @@ void onConfigurationChangeTriggerCallback(engine_configuration_s *previousConfig
COMPARE_CONFIG_PARAMS(bc.nb2ratioFrom) ||
COMPARE_CONFIG_PARAMS(bc.nb2ratioTo) ||
COMPARE_CONFIG_PARAMS(nbVvtIndex);
isTriggerConfigChanged = true;
#endif /* EFI_PROD_CODE */
}
/**
* @returns true if configuration just changed, and if that change has affected trigger
*/
bool checkIfTriggerConfigChanged(void) {
//#if EFI_PROD_CODE || EFI_SIMULATOR || defined(__DOXYGEN__)
// return isTriggerConfigChanged;
//#else
#if EFI_PROD_CODE || EFI_SIMULATOR || defined(__DOXYGEN__)
return triggerVersion.isOld() && isTriggerConfigChanged;
#else
return triggerVersion.isOld();
//#endif /* EFI_PROD_CODE */
#endif /* EFI_PROD_CODE */
}
void initTriggerCentral(Logging *sharedLogger) {