refactoring maybe making code reuse more possible in the future

This commit is contained in:
Andrey 2021-06-27 13:00:01 -04:00
parent 2e252022aa
commit 21c06e1514
2 changed files with 3 additions and 7 deletions

View File

@ -291,13 +291,11 @@ int maxTriggerReentraint = 0;
uint32_t triggerDuration; uint32_t triggerDuration;
uint32_t triggerMaxDuration = 0; uint32_t triggerMaxDuration = 0;
#if EFI_PROD_CODE || EFI_SIMULATOR
/** /**
* this method is invoked only by real hardware call-backs * 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 #if VR_HW_CHECK_MODE
// some boards do not have hardware VR input LEDs which makes such boards harder to validate // 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 // 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); palWritePad(criticalErrorLedPort, criticalErrorLedPin, 0);
#endif // VR_HW_CHECK_MODE #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 * this method is invoked by both real hardware and self-stimulator
*/ */

View File

@ -87,7 +87,7 @@ public:
void triggerInfo(void); void triggerInfo(void);
void handleShaftSignal2(trigger_event_e signal, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX); 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 hwHandleVvtCamSignal(trigger_value_e front, efitick_t timestamp, int index DECLARE_ENGINE_PARAMETER_SUFFIX);
void initTriggerCentral(); void initTriggerCentral();