fix checkIfTriggerConfigChanged() for unit tests (#452)

This commit is contained in:
andreika-git 2017-06-28 18:06:40 +03:00 committed by rusefi
parent b7af346470
commit b9a1fa395e
2 changed files with 3 additions and 2 deletions

View File

@ -63,7 +63,6 @@ EXTERN_ENGINE
; ;
extern bool hasFirmwareErrorFlag; extern bool hasFirmwareErrorFlag;
static LocalVersionHolder triggerVersion;
static const char *prevOutputName = NULL; static const char *prevOutputName = NULL;
static Logging *logger; static Logging *logger;

View File

@ -20,6 +20,7 @@
#include "efilib2.h" #include "efilib2.h"
#include "settings.h" #include "settings.h"
#include "engine_math.h" #include "engine_math.h"
#include "LocalVersionHolder.h"
#include "rpm_calculator.h" #include "rpm_calculator.h"
#if EFI_PROD_CODE || defined(__DOXYGEN__) #if EFI_PROD_CODE || defined(__DOXYGEN__)
@ -41,6 +42,7 @@ static histogram_s triggerCallbackHistogram;
#endif /* EFI_HISTOGRAMS */ #endif /* EFI_HISTOGRAMS */
static Logging *logger; static Logging *logger;
static LocalVersionHolder triggerVersion;
efitime_t getCrankEventCounter(DECLARE_ENGINE_PARAMETER_SIGNATURE) { efitime_t getCrankEventCounter(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
return engine->triggerCentral.triggerState.getTotalEventCounter(); return engine->triggerCentral.triggerState.getTotalEventCounter();
@ -570,7 +572,7 @@ bool checkIfTriggerConfigChanged(void) {
#if EFI_PROD_CODE || defined(__DOXYGEN__) #if EFI_PROD_CODE || defined(__DOXYGEN__)
return isTriggerConfigChanged; return isTriggerConfigChanged;
#else #else
return false; return triggerVersion.isOld();
#endif /* EFI_PROD_CODE */ #endif /* EFI_PROD_CODE */
} }