From 6bd6b0b43ff8f6f44c1ded262dc7204e26fa73b0 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 17 Aug 2015 23:02:01 -0400 Subject: [PATCH] auto-sync --- firmware/console/binary/tunerstudio_configuration.h | 3 ++- firmware/console/status_loop.cpp | 1 + firmware/controllers/trigger/trigger_decoder.h | 3 +++ firmware/tunerstudio/rusefi.ini | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/firmware/console/binary/tunerstudio_configuration.h b/firmware/console/binary/tunerstudio_configuration.h index 4f0c1bd544..b7e6af8b27 100644 --- a/firmware/console/binary/tunerstudio_configuration.h +++ b/firmware/console/binary/tunerstudio_configuration.h @@ -96,7 +96,8 @@ typedef struct { int knockCount; float fuelLevel; float knockLevel; - int unused3[10]; + int totalTriggerErrorCounter; + int unused3[9]; } TunerStudioOutputChannels; #endif /* TUNERSTUDIO_CONFIGURATION_H_ */ diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index afc8f3af3b..450e05285d 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -597,6 +597,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm PASS_ENGINE_PARAMETER); tsOutputChannels->fuelLevel = engine->engineState.fuelLevel; tsOutputChannels->hasFatalError = hasFirmwareError(); + tsOutputChannels->totalTriggerErrorCounter = triggerCentral.triggerState.totalTriggerErrorCounter; tsOutputChannels->checkEngine = hasErrorCodes(); #if EFI_PROD_CODE || defined(__DOXYGEN__) diff --git a/firmware/controllers/trigger/trigger_decoder.h b/firmware/controllers/trigger/trigger_decoder.h index 80a246695f..562ca74821 100644 --- a/firmware/controllers/trigger/trigger_decoder.h +++ b/firmware/controllers/trigger/trigger_decoder.h @@ -52,6 +52,9 @@ public: */ uint32_t prevTotalTime[PWM_PHASE_MAX_WAVE_PER_PWM]; int expectedTotalTime[PWM_PHASE_MAX_WAVE_PER_PWM]; + /** + * how many times since ECU reboot we had unexpected number of teeth in trigger cycle + */ uint32_t totalTriggerErrorCounter; uint32_t runningTriggerErrorCounter; uint32_t orderingErrorCounter; diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 7ddffb6f43..ea5f4ef6e3 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -1034,6 +1034,8 @@ fileVersion = { 20150625 } dialog = triggerConfiguration_IO, "Settings I/O" field = "Primary input channel", triggerInputPins1 field = "Secondary channel", triggerInputPins2 + field = "Trigger error LED", triggerErrorPin + field = "Trigger error LED mode", triggerErrorPinMode dialog = triggerConfiguration panel = triggerConfiguration_settings, North panel = triggerConfiguration_IO, South