better trigger state debug field logging

This commit is contained in:
rusefi 2019-08-07 20:13:30 -04:00
parent 183c1d47e9
commit 7a00ccd2ce
2 changed files with 5 additions and 0 deletions

View File

@ -76,6 +76,8 @@ extern bool main_loop_started;
#include "periodic_task.h"
extern int vvtEventRiseCounter;
extern int vvtEventFallCounter;
extern int icuWidthCallbackCounter;
extern int icuWidthPeriodCounter;
#endif /* EFI_PROD_CODE */
#if EFI_CJ125
@ -773,6 +775,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
#if EFI_PROD_CODE
tsOutputChannels->debugIntField4 = vvtEventRiseCounter;
tsOutputChannels->debugIntField5 = vvtEventFallCounter;
tsOutputChannels->debugFloatField5 = icuWidthCallbackCounter + icuWidthPeriodCounter;
#endif /* EFI_PROD_CODE */
tsOutputChannels->debugFloatField1 = engine->triggerCentral.getHwEventCounter((int)SHAFT_PRIMARY_RISING);

View File

@ -315,6 +315,8 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PAR
if (triggerShape.shapeDefinitionError) {
// trigger is broken, we cannot do anything here
warning(CUSTOM_ERR_UNEXPECTED_SHAFT_EVENT, "Shaft event while trigger is mis-configured");
// magic value to indicate a problem
hwEventCounters[0] = 155;
return;
}