From d01485d48409cec31eabdc355e702f9884157816 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 22 Jul 2019 17:38:52 -0400 Subject: [PATCH] trigger error message makes trigger very unhappy #888 quick dirty temporary solution --- .../engine_configuration_generated_structures.h | 5 +++-- firmware/controllers/trigger/trigger_decoder.cpp | 9 ++++++++- firmware/integration/rusefi_config.txt | 2 +- firmware/tunerstudio/rusefi.ini | 4 +++- firmware/tunerstudio/rusefi.input | 1 + firmware/tunerstudio/rusefi_frankenso.ini | 4 +++- firmware/tunerstudio/rusefi_microrusefi.ini | 4 +++- firmware/tunerstudio/rusefi_prometheus.ini | 4 +++- 8 files changed, 25 insertions(+), 8 deletions(-) diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index 2b7c8235f7..73edb20f1f 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Jul 21 16:54:25 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jul 22 17:38:10 EDT 2019 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -1491,6 +1491,7 @@ struct engine_configuration_s { offset 1464 bit 5 */ bool isEngineChartEnabled : 1; /** + * Sometimes we have a performance issue while printing error offset 1464 bit 6 */ bool silentTriggerError : 1; /** @@ -2813,4 +2814,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Jul 21 16:54:25 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jul 22 17:38:10 EDT 2019 diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index 8f01fdc7a2..b11c133c98 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -509,8 +509,15 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no isSynchronizationPoint = isSync; + /** + * todo: technically we can afford detailed logging even with 60/2 as long as low RPM + * todo: figure out exact threshold as a function of RPM and tooth count? + * Open question what is 'triggerShape->getSize()' for 60/2 is it 58 or 58*2 or 58*4? + */ + bool silentTriggerError = triggerShape->getSize() > 40 && CONFIG(silentTriggerError); + #if EFI_PROD_CODE - if (CONFIG(verboseTriggerSynchDetails) || (someSortOfTriggerError && !CONFIG(silentTriggerError))) { + if (CONFIG(verboseTriggerSynchDetails) || (someSortOfTriggerError && !silentTriggerError)) { #else if (printTriggerDebug) { #endif /* EFI_PROD_CODE */ diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 134613033c..5108f1cf84 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -713,7 +713,7 @@ bit vvtDisplayInverted bit isVerboseETB;+Prints ETB details to rusEFI console bit useConstantDwellDuringCranking;+If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode. bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price - bit silentTriggerError + bit silentTriggerError;+Sometimes we have a performance issue while printing error bit useLinearCltSensor bit canReadEnabled bit canWriteEnabled diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 3609e5d0f5..e40c490d11 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -82,7 +82,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Jul 21 16:54:25 EDT 2019 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jul 22 17:38:10 EDT 2019 pageSize = 20000 page = 1 @@ -1009,6 +1009,7 @@ page = 1 isVerboseETB = "Prints ETB details to rusEFI console" useConstantDwellDuringCranking = "If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode." isEngineChartEnabled = "This options enables data for 'engine sniffer' tab in console, which comes at some CPU price" + silentTriggerError = "Sometimes we have a performance issue while printing error" useFSIO16ForTimingAdjustment = "See fsioTimingAdjustment" isAlternatorControlEnabled = "This enables smart alternator control and activates the extra alternator settings." invertPrimaryTriggerSignal = "This setting flips the signal from the primary engine speed sensor." @@ -2423,6 +2424,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Miata NB2 to (temporary)", miataNb2VVTRatioTo field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8} dialog = triggerConfiguration panel = triggerConfiguration_settings, North diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 8c7fd97e51..548df1b5dc 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1446,6 +1446,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Miata NB2 to (temporary)", miataNb2VVTRatioTo field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8} dialog = triggerConfiguration panel = triggerConfiguration_settings, North diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index 81a63bc633..ba269e7a1d 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -82,7 +82,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Jul 21 16:54:30 EDT 2019 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jul 22 17:38:15 EDT 2019 pageSize = 20000 page = 1 @@ -1009,6 +1009,7 @@ page = 1 isVerboseETB = "Prints ETB details to rusEFI console" useConstantDwellDuringCranking = "If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode." isEngineChartEnabled = "This options enables data for 'engine sniffer' tab in console, which comes at some CPU price" + silentTriggerError = "Sometimes we have a performance issue while printing error" useFSIO16ForTimingAdjustment = "See fsioTimingAdjustment" isAlternatorControlEnabled = "This enables smart alternator control and activates the extra alternator settings." invertPrimaryTriggerSignal = "This setting flips the signal from the primary engine speed sensor." @@ -2423,6 +2424,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Miata NB2 to (temporary)", miataNb2VVTRatioTo field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8} dialog = triggerConfiguration panel = triggerConfiguration_settings, North diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index be03f1bb42..8b3bc7bc5c 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -82,7 +82,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Jul 21 16:54:28 EDT 2019 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jul 22 17:38:13 EDT 2019 pageSize = 20000 page = 1 @@ -1009,6 +1009,7 @@ page = 1 isVerboseETB = "Prints ETB details to rusEFI console" useConstantDwellDuringCranking = "If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode." isEngineChartEnabled = "This options enables data for 'engine sniffer' tab in console, which comes at some CPU price" + silentTriggerError = "Sometimes we have a performance issue while printing error" useFSIO16ForTimingAdjustment = "See fsioTimingAdjustment" isAlternatorControlEnabled = "This enables smart alternator control and activates the extra alternator settings." invertPrimaryTriggerSignal = "This setting flips the signal from the primary engine speed sensor." @@ -2416,6 +2417,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Miata NB2 to (temporary)", miataNb2VVTRatioTo field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8} dialog = triggerConfiguration panel = triggerConfiguration_settings, North diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 802270e9cc..3f508d581c 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -82,7 +82,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Jul 21 16:54:32 EDT 2019 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jul 22 17:38:18 EDT 2019 pageSize = 20000 page = 1 @@ -1009,6 +1009,7 @@ page = 1 isVerboseETB = "Prints ETB details to rusEFI console" useConstantDwellDuringCranking = "If set to true, will use the specified duration for cranking dwell. If set to false, will use the specified dwell angle. Unless you have a really good reason to, leave this set to true to use duration mode." isEngineChartEnabled = "This options enables data for 'engine sniffer' tab in console, which comes at some CPU price" + silentTriggerError = "Sometimes we have a performance issue while printing error" useFSIO16ForTimingAdjustment = "See fsioTimingAdjustment" isAlternatorControlEnabled = "This enables smart alternator control and activates the extra alternator settings." invertPrimaryTriggerSignal = "This setting flips the signal from the primary engine speed sensor." @@ -2419,6 +2420,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Miata NB2 to (temporary)", miataNb2VVTRatioTo field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails + field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8} dialog = triggerConfiguration panel = triggerConfiguration_settings, North