From 14a2c2d90f80e2159dacf22bf174285461c24500 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 17 Sep 2018 21:42:04 -0400 Subject: [PATCH] metrics without text messages --- firmware/console/status_loop.cpp | 8 ++++++++ firmware/controllers/algo/auto_generated_enums.cpp | 8 +++++--- firmware/controllers/algo/rusefi_enums.h | 7 ++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index d4df9f5df9..d07f56c3cd 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -94,6 +94,8 @@ extern TunerStudioOutputChannels tsOutputChannels; extern bool hasFirmwareErrorFlag; extern tunerstudio_counters_s tsState; +extern int maxTriggerReentraint; +extern uint32_t maxLockedDuration; #define FULL_LOGGING_KEY "fl" static char LOGGING_BUFFER[1800] CCM_OPTIONAL; @@ -745,6 +747,12 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->debugFloatField1 = getTimeNowSeconds(); tsOutputChannels->debugIntField1 = atoi(VCS_VERSION); break; + case DBG_METRICS: +#if EFI_CLOCK_LOCKS || defined(__DOXYGEN__) + tsOutputChannels->debugIntField1 = maxLockedDuration; + tsOutputChannels->debugIntField2 = maxTriggerReentraint; +#endif /* EFI_CLOCK_LOCKS */ + break; case DBG_TPS_ACCEL: tsOutputChannels->debugIntField1 = engine->tpsAccelEnrichment.cb.getSize(); break; diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index cf403b2977..f7811f89a3 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -736,8 +736,8 @@ case DBG_CAN: return "DBG_CAN"; case DBG_MAP: return "DBG_MAP"; -case DBG_28: - return "DBG_28"; +case DBG_METRICS: + return "DBG_METRICS"; case DBG_29: return "DBG_29"; case DBG_ADC: @@ -792,7 +792,9 @@ case DBG_WARMUP_ENRICH: return "DBG_WARMUP_ENRICH"; case Force_4b_debug_mode_e: return "Force_4b_debug_mode_e"; - } +default: + return "NA"; +} return NULL; } const char *getAir_pressure_sensor_type_e(air_pressure_sensor_type_e value){ diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 8a409b1998..f13a189173 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -773,8 +773,13 @@ typedef enum { DBG_CJ125 = 25, DBG_CAN = 26, DBG_MAP = 27, - DBG_28 = 28, + DBG_METRICS = 28, DBG_29 = 29, + DBG_30 = 30, + DBG_31 = 31, + DBG_32 = 32, + DBG_33 = 33, + DBG_34 = 34, Force_4b_debug_mode_e = ENUM_32_BITS, } debug_mode_e;