maybe improvent for trigger errors in TS and console, TS still does not know about order error counter

This commit is contained in:
rusefi 2019-12-25 15:57:47 -05:00
parent 2621342a87
commit e1fb9ad271
4 changed files with 12 additions and 9 deletions

View File

@ -196,8 +196,8 @@ typedef struct {
uint32_t tsConfigVersion; // 124 uint32_t tsConfigVersion; // 124
// Errors // Errors
int triggerErrorsCounter; // 128 int totalTriggerErrorCounter; // 128
int totalTriggerErrorCounter; // 132 int orderingErrorCounter; // 132
int16_t warningCounter; // 136 int16_t warningCounter; // 136
int16_t lastErrorCode; // 138 int16_t lastErrorCode; // 138
int16_t recentErrorCodes[8]; // 140 int16_t recentErrorCodes[8]; // 140

View File

@ -754,9 +754,11 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
// offset 116 // offset 116
// TPS acceleration // TPS acceleration
tsOutputChannels->deltaTps = engine->tpsAccelEnrichment.getMaxDelta(); tsOutputChannels->deltaTps = engine->tpsAccelEnrichment.getMaxDelta();
// 120 // 128
tsOutputChannels->triggerErrorsCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter; tsOutputChannels->totalTriggerErrorCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter;
// 132 // 132
tsOutputChannels->orderingErrorCounter = engine->triggerCentral.triggerState.orderingErrorCounter;
// 68
tsOutputChannels->baroCorrection = engine->engineState.baroCorrection; tsOutputChannels->baroCorrection = engine->engineState.baroCorrection;
// 136 // 136
tsOutputChannels->pedalPosition = hasPedalPositionSensor(PASS_ENGINE_PARAMETER_SIGNATURE) ? getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE) : 0; 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->knockLevel = engine->knockVolts;
tsOutputChannels->hasFatalError = hasFirmwareError(); tsOutputChannels->hasFatalError = hasFirmwareError();
tsOutputChannels->totalTriggerErrorCounter = engine->triggerCentral.triggerState.totalTriggerErrorCounter;
tsOutputChannels->coilDutyCycle = getCoilDutyCycle(rpm PASS_ENGINE_PARAMETER_SUFFIX); tsOutputChannels->coilDutyCycle = getCoilDutyCycle(rpm PASS_ENGINE_PARAMETER_SUFFIX);

View File

@ -292,8 +292,8 @@ fileVersion = { @@TS_FILE_VERSION@@ }
firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0
; Errors ; Errors
triggerErrorsCounter=scalar,U32, 128,"counter", 1, 0 totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0
; totalTriggerErrorCounter 132 ; orderingErrorCounter 132
warningCounter = scalar, U16, 136, "count", 1, 0 warningCounter = scalar, U16, 136, "count", 1, 0
lastErrorCode = scalar, U16, 138, "error", 1, 0 lastErrorCode = scalar, U16, 138, "error", 1, 0
recentErrorCode0= scalar, U16, 140, "error", 1, 0 recentErrorCode0= scalar, U16, 140, "error", 1, 0
@ -805,7 +805,7 @@ gaugeCategory = Sensors - Extra 2
gaugeCategory = ECU Status gaugeCategory = ECU Status
warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0 warningCounterGauge = warningCounter, "Warning count", "", 0, 100, 0, 0, 100, 100, 0, 0
lastErrorCodeGauge = lastErrorCode, "Last error", "", 0, 18000, 0, 0, 18000, 18000, 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 recentErrorCode0Gauge = recentErrorCode0, "Error#1", "", 0, 18000, 0, 0, 18000, 18000, 0, 0
recentErrorCode1Gauge = recentErrorCode1, "Error#2", "", 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 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 = massAirFlowValue,@@GAUGE_NAME_AIR_FLOW@@, float, "%.3f"
entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f" entry = chargeAirMass, @@GAUGE_NAME_AIR_MASS@@, float, "%.3f"
entry = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, 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" entry = idleAirValvePosition, @@GAUGE_NAME_IAC@@, float, "%.3f"

View File

@ -92,6 +92,8 @@ public enum Sensor {
TS_CONFIG_VERSION(".ini version", SensorCategory.OPERATIONS, FieldType.INT, 124, BackgroundColor.BLUE), TS_CONFIG_VERSION(".ini version", SensorCategory.OPERATIONS, FieldType.INT, 124, BackgroundColor.BLUE),
// Errors // 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), errorCodeCounter("error counter", SensorCategory.STATUS, FieldType.INT, 136, BackgroundColor.MUD, 0, 5),
lastErrorCode("last error", SensorCategory.STATUS, FieldType.INT, 138, BackgroundColor.MUD, 0, 5), lastErrorCode("last error", SensorCategory.STATUS, FieldType.INT, 138, BackgroundColor.MUD, 0, 5),