From 21c06e15147372ba2f4473c7367feae422f46803 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 27 Jun 2021 13:00:01 -0400 Subject: [PATCH] refactoring maybe making code reuse more possible in the future --- firmware/controllers/trigger/trigger_central.cpp | 8 ++------ firmware/controllers/trigger/trigger_central.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 8c846d585f..3a3d8a98a9 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -291,13 +291,11 @@ int maxTriggerReentraint = 0; uint32_t triggerDuration; uint32_t triggerMaxDuration = 0; -#if EFI_PROD_CODE || EFI_SIMULATOR - /** * this method is invoked only by real hardware call-backs */ -void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) { +void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) { #if VR_HW_CHECK_MODE // some boards do not have hardware VR input LEDs which makes such boards harder to validate // from experience we know that assembly mistakes happen and quality control is required @@ -317,12 +315,10 @@ void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) { palWritePad(criticalErrorLedPort, criticalErrorLedPin, 0); #endif // VR_HW_CHECK_MODE - handleShaftSignal2(signal, timestamp); + handleShaftSignal2(signal, timestamp PASS_ENGINE_PARAMETER_SUFFIX); } -#endif /* EFI_PROD_CODE */ - /** * this method is invoked by both real hardware and self-stimulator */ diff --git a/firmware/controllers/trigger/trigger_central.h b/firmware/controllers/trigger/trigger_central.h index 615b165526..da754b377e 100644 --- a/firmware/controllers/trigger/trigger_central.h +++ b/firmware/controllers/trigger/trigger_central.h @@ -87,7 +87,7 @@ public: void triggerInfo(void); void handleShaftSignal2(trigger_event_e signal, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX); -void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp); +void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX); void hwHandleVvtCamSignal(trigger_value_e front, efitick_t timestamp, int index DECLARE_ENGINE_PARAMETER_SUFFIX); void initTriggerCentral();