From 0af290c381b4cf6d06e9b739d94bb3ff745289fd Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 3 Nov 2018 13:27:48 -0400 Subject: [PATCH] CJ125 unit-tests coverage #617 --- firmware/hw_layer/HIP9011.cpp | 7 +++++-- firmware/hw_layer/sensors/CJ125.cpp | 3 +++ firmware/hw_layer/sensors/CJ125.h | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/firmware/hw_layer/HIP9011.cpp b/firmware/hw_layer/HIP9011.cpp index 145f495dbf..dbe374b5ca 100644 --- a/firmware/hw_layer/HIP9011.cpp +++ b/firmware/hw_layer/HIP9011.cpp @@ -35,7 +35,6 @@ #include "global.h" #include "engine.h" #include "settings.h" -#include "pin_repository.h" #include "hardware.h" #include "rpm_calculator.h" #include "trigger_central.h" @@ -45,6 +44,10 @@ #include "efilib2.h" #include "engine_controller.h" +#if EFI_PROD_CODE +#include "pin_repository.h" +#endif + #if EFI_HIP_9011 || defined(__DOXYGEN__) static NamedOutputPin intHold(HIP_NAME); @@ -252,7 +255,7 @@ static void intHoldCallback(trigger_event_e ckpEventType, uint32_t index DECLARE (schfunc_t) &startIntegration, NULL, &engine->rpmCalculator); #if EFI_PROD_CODE hipLastExecutionCount = lastExecutionCount; -#endif +#endif /* EFI_PROD_CODE */ scheduleByAngle(rpm, &endTimer[structIndex], engineConfiguration->knockDetectionWindowEnd, (schfunc_t) &endIntegration, NULL, &engine->rpmCalculator); diff --git a/firmware/hw_layer/sensors/CJ125.cpp b/firmware/hw_layer/sensors/CJ125.cpp index dbafa56705..019ee2dc52 100644 --- a/firmware/hw_layer/sensors/CJ125.cpp +++ b/firmware/hw_layer/sensors/CJ125.cpp @@ -590,6 +590,8 @@ bool cjHasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) { return true; } + +#if EFI_TUNER_STUDIO || defined(__DOXYGEN__) // used by DBG_CJ125 void cjPostState(TunerStudioOutputChannels *tsOutputChannels) { tsOutputChannels->debugFloatField1 = heaterDuty; @@ -602,6 +604,7 @@ void cjPostState(TunerStudioOutputChannels *tsOutputChannels) { tsOutputChannels->debugIntField1 = state; tsOutputChannels->debugIntField2 = diag; } +#endif /* EFI_TUNER_STUDIO */ void initCJ125(Logging *sharedLogger) { logger = sharedLogger; diff --git a/firmware/hw_layer/sensors/CJ125.h b/firmware/hw_layer/sensors/CJ125.h index cf757116fd..2b2c8e0201 100644 --- a/firmware/hw_layer/sensors/CJ125.h +++ b/firmware/hw_layer/sensors/CJ125.h @@ -175,7 +175,9 @@ typedef enum { void initCJ125(Logging *shared); +#if EFI_TUNER_STUDIO || defined(__DOXYGEN__) void cjPostState(TunerStudioOutputChannels *tsOutputChannels); +#endif float cjGetAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE); bool cjHasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE); void cj125defaultPinout();