triggerinfo progress

This commit is contained in:
rusefi 2021-10-23 19:01:31 -04:00
parent 1f5e1c2ca5
commit 274a6d8ba6
6 changed files with 21 additions and 28 deletions

View File

@ -806,8 +806,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
#if EFI_PROD_CODE && HAL_USE_ICU == TRUE
tsOutputChannels->debugIntField3 = icuRisingCallbackCounter + icuFallingCallbackCounter;
#endif /* EFI_PROD_CODE */
tsOutputChannels->debugIntField4 = engine->triggerCentral.vvtEventRiseCounter;
tsOutputChannels->debugIntField5 = engine->triggerCentral.vvtEventFallCounter;
tsOutputChannels->debugIntField4 = engine->triggerCentral.vvtEventRiseCounter[0];
tsOutputChannels->debugIntField5 = engine->triggerCentral.vvtEventFallCounter[0];
tsOutputChannels->debugFloatField1 = engine->triggerCentral.getHwEventCounter((int)SHAFT_PRIMARY_RISING);
tsOutputChannels->debugFloatField2 = engine->triggerCentral.getHwEventCounter((int)SHAFT_SECONDARY_RISING);

View File

@ -171,9 +171,9 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt, int index DECL
int camIndex = index % CAMS_PER_BANK;
TriggerCentral *tc = &engine->triggerCentral;
if (front == TV_RISE) {
tc->vvtEventRiseCounter++;
tc->vvtEventRiseCounter[index]++;
} else {
tc->vvtEventFallCounter++;
tc->vvtEventFallCounter[index]++;
}
extern const char *vvtNames[];
const char *vvtName = vvtNames[index];
@ -706,13 +706,18 @@ void triggerInfo(void) {
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
#if EFI_PROD_CODE
if (HAVE_CAM_INPUT()) {
efiPrintf("VVT input: %s mode %s", hwPortname(engineConfiguration->camInputs[0]),
getVvt_mode_e(engineConfiguration->vvtMode[0]));
efiPrintf("VVT event counters: %d/%d", engine->triggerCentral.vvtEventRiseCounter, engine->triggerCentral.vvtEventFallCounter);
for (int camInputIndex = 0; camInputIndex<CAM_INPUTS_COUNT;camInputIndex++) {
if (isBrainPinValid(engineConfiguration->camInputs[camInputIndex])) {
int camLogicalIndex = camInputIndex % CAMS_PER_BANK;
efiPrintf("VVT input: %s mode %s", hwPortname(engineConfiguration->camInputs[camInputIndex]),
getVvt_mode_e(engineConfiguration->vvtMode[camLogicalIndex]));
efiPrintf("VVT %d event counters: %d/%d",
camInputIndex,
engine->triggerCentral.vvtEventRiseCounter[camInputIndex], engine->triggerCentral.vvtEventFallCounter[camInputIndex]);
}
}
efiPrintf("primary trigger input: %s", hwPortname(CONFIG(triggerInputPins)[0]));
efiPrintf("primary trigger simulator: %s %s freq=%d",
hwPortname(CONFIG(triggerSimulatorPins)[0]),

View File

@ -58,6 +58,9 @@ public:
TriggerNoiseFilter noiseFilter;
int vvtEventRiseCounter[CAM_INPUTS_COUNT];
int vvtEventFallCounter[CAM_INPUTS_COUNT];
trigger_type_e vvtTriggerType[CAMS_PER_BANK];
angle_t getVVTPosition(uint8_t bankIndex, uint8_t camIndex);

View File

@ -6,8 +6,5 @@ struct_no_prefix define_constructor trigger_central_s
int vvtCamCounter
int vvtEventRiseCounter
int vvtEventFallCounter
end_struct

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_central.txt Sun Oct 17 01:13:40 UTC 2021
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_central.txt Sat Oct 23 18:41:28 EDT 2021
// by class com.rusefi.output.CHeaderConsumer
// begin
#pragma once
@ -16,16 +16,8 @@ struct trigger_central_s {
* offset 24
*/
int vvtCamCounter = (int)0;
/**
* offset 28
*/
int vvtEventRiseCounter = (int)0;
/**
* offset 32
*/
int vvtEventFallCounter = (int)0;
/** total size 36*/
/** total size 28*/
};
// end
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_central.txt Sun Oct 17 01:13:40 UTC 2021
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_central.txt Sat Oct 23 18:41:28 EDT 2021

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_central.txt Sun Oct 17 01:13:40 UTC 2021
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_central.txt Sat Oct 23 18:41:28 EDT 2021
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
@ -14,8 +14,6 @@ public class TriggerCentral {
public static final Field HWEVENTCOUNTERS5 = Field.create("HWEVENTCOUNTERS5", 16, FieldType.INT);
public static final Field HWEVENTCOUNTERS6 = Field.create("HWEVENTCOUNTERS6", 20, FieldType.INT);
public static final Field VVTCAMCOUNTER = Field.create("VVTCAMCOUNTER", 24, FieldType.INT);
public static final Field VVTEVENTRISECOUNTER = Field.create("VVTEVENTRISECOUNTER", 28, FieldType.INT);
public static final Field VVTEVENTFALLCOUNTER = Field.create("VVTEVENTFALLCOUNTER", 32, FieldType.INT);
public static final Field[] VALUES = {
HWEVENTCOUNTERS1,
HWEVENTCOUNTERS2,
@ -24,7 +22,5 @@ public class TriggerCentral {
HWEVENTCOUNTERS5,
HWEVENTCOUNTERS6,
VVTCAMCOUNTER,
VVTEVENTRISECOUNTER,
VVTEVENTFALLCOUNTER,
};
}