From e1fb9ad271cea7fa253b32a2da0ac1fbef100946 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 25 Dec 2019 15:57:47 -0500 Subject: [PATCH] maybe improvent for trigger errors in TS and console, TS still does not know about order error counter --- firmware/console/binary/tunerstudio_configuration.h | 4 ++-- firmware/console/status_loop.cpp | 7 ++++--- firmware/tunerstudio/rusefi.input | 8 ++++---- java_console/models/src/com/rusefi/core/Sensor.java | 2 ++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/firmware/console/binary/tunerstudio_configuration.h b/firmware/console/binary/tunerstudio_configuration.h index dcfd321536..5507e0d45f 100644 --- a/firmware/console/binary/tunerstudio_configuration.h +++ b/firmware/console/binary/tunerstudio_configuration.h @@ -196,8 +196,8 @@ typedef struct { uint32_t tsConfigVersion; // 124 // Errors - int triggerErrorsCounter; // 128 - int totalTriggerErrorCounter; // 132 + int totalTriggerErrorCounter; // 128 + int orderingErrorCounter; // 132 int16_t warningCounter; // 136 int16_t lastErrorCode; // 138 int16_t recentErrorCodes[8]; // 140 diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 30e7b3d78a..b6ca2016bd 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -754,9 +754,11 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ // offset 116 // TPS acceleration tsOutputChannels->deltaTps = engine->tpsAccelEnrichment.getMaxDelta(); - // 120 - tsOutputChannels->triggerErrorsCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter; + // 128 + tsOutputChannels->totalTriggerErrorCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter; // 132 + tsOutputChannels->orderingErrorCounter = engine->triggerCentral.triggerState.orderingErrorCounter; + // 68 tsOutputChannels->baroCorrection = engine->engineState.baroCorrection; // 136 tsOutputChannels->pedalPosition = hasPedalPositionSensor(PASS_ENGINE_PARAMETER_SIGNATURE) ? getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE) : 0; @@ -810,7 +812,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->knockLevel = engine->knockVolts; tsOutputChannels->hasFatalError = hasFirmwareError(); - tsOutputChannels->totalTriggerErrorCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter; tsOutputChannels->coilDutyCycle = getCoilDutyCycle(rpm PASS_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 01cce71b41..3d13165c6b 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -292,8 +292,8 @@ fileVersion = { @@TS_FILE_VERSION@@ } firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 ; Errors - triggerErrorsCounter=scalar,U32, 128,"counter", 1, 0 - ; totalTriggerErrorCounter 132 + totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0 + ; orderingErrorCounter 132 warningCounter = scalar, U16, 136, "count", 1, 0 lastErrorCode = scalar, U16, 138, "error", 1, 0 recentErrorCode0= scalar, U16, 140, "error", 1, 0 @@ -805,7 +805,7 @@ gaugeCategory = Sensors - Extra 2 gaugeCategory = ECU Status warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0 lastErrorCodeGauge = lastErrorCode, "Last error", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 - triggerErrorsCounterGauge = triggerErrorsCounter, "Trigger error count", "count", 0, 15000, 0, 0, 6000, 6000, 0, 0 + triggerErrorsCounterGauge = totalTriggerErrorCounter, "Trigger error count", "count", 0, 15000, 0, 0, 6000, 6000, 0, 0 recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode2Gauge = recentErrorCode2, "Error#3", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 @@ -1003,7 +1003,7 @@ gaugeCategory = Throttle Body (incl. ETB) entry = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f" entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f" entry = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, float, "%.3f" - entry = triggerErrorsCounter, "trg err",int, "%d" + entry = totalTriggerErrorCounter, "trg err",int, "%d" entry = idleAirValvePosition, @@GAUGE_NAME_IAC@@, float, "%.3f" diff --git a/java_console/models/src/com/rusefi/core/Sensor.java b/java_console/models/src/com/rusefi/core/Sensor.java index 7e23a88a67..a1e12b297d 100644 --- a/java_console/models/src/com/rusefi/core/Sensor.java +++ b/java_console/models/src/com/rusefi/core/Sensor.java @@ -92,6 +92,8 @@ public enum Sensor { TS_CONFIG_VERSION(".ini version", SensorCategory.OPERATIONS, FieldType.INT, 124, BackgroundColor.BLUE), // Errors + totalTriggerErrorCounter("trigger total error counter", SensorCategory.STATUS, FieldType.INT, 128, BackgroundColor.MUD, 0, 5), + orderingErrorCounter("trigger order error counter", SensorCategory.STATUS, FieldType.INT, 132, BackgroundColor.MUD, 0, 5), errorCodeCounter("error counter", SensorCategory.STATUS, FieldType.INT, 136, BackgroundColor.MUD, 0, 5), lastErrorCode("last error", SensorCategory.STATUS, FieldType.INT, 138, BackgroundColor.MUD, 0, 5),