rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
trigger_central.h File Reference

Data Structures

class  TriggerNoiseFilter
 
class  TriggerCentral
 

Typedefs

typedef void(* ShaftPositionListener) (trigger_event_e signal, uint32_t index, efitick_t edgeTimestamp)
 

Functions

void triggerInfo (void)
 
void hwHandleShaftSignal (int signalIndex, bool isRising, efitick_t timestamp)
 
void handleShaftSignal (int signalIndex, bool isRising, efitick_t timestamp)
 
void hwHandleVvtCamSignal (TriggerValue front, efitick_t timestamp, int index)
 
void hwHandleVvtCamSignal (bool isRising, efitick_t timestamp, int index)
 
void handleVvtCamSignal (TriggerValue front, efitick_t timestamp, int index)
 
void validateTriggerInputs ()
 
void initTriggerCentral ()
 
int isSignalDecoderError (void)
 
void onConfigurationChangeTriggerCallback ()
 
TriggerCentralgetTriggerCentral ()
 
int getCrankDivider (operation_mode_e operationMode)
 
constexpr bool isTriggerUpEvent (trigger_event_e event)
 

Typedef Documentation

◆ ShaftPositionListener

typedef void(* ShaftPositionListener) (trigger_event_e signal, uint32_t index, efitick_t edgeTimestamp)

Definition at line 28 of file trigger_central.h.

Function Documentation

◆ getCrankDivider()

int getCrankDivider ( operation_mode_e  operationMode)

todo: why is this method NOT reciprocal to getRpmMultiplier?!

wow even while we explicitly handle all enumerations in the switch above we still need a return statement due to https://stackoverflow.com/questions/34112483/gcc-how-best-to-handle-warning-about-unreachable-end-of-function-after-switch

Definition at line 92 of file trigger_central.cpp.

92 {
93 switch (operationMode) {
95 return 2;
97 return SYMMETRICAL_CRANK_SENSOR_DIVIDER;
99 return SYMMETRICAL_THREE_TIMES_CRANK_SENSOR_DIVIDER;
101 return SYMMETRICAL_SIX_TIMES_CRANK_SENSOR_DIVIDER;
103 return SYMMETRICAL_TWELVE_TIMES_CRANK_SENSOR_DIVIDER;
104 case OM_NONE:
106 case TWO_STROKE:
107 // That's easy - trigger cycle matches engine cycle
108 return 1;
109 /* let's NOT handle default in order to benefit from -Werror=switch */
110 }
111 /**
112 wow even while we explicitly handle all enumerations in the switch above we still need a return statement due to
113 https://stackoverflow.com/questions/34112483/gcc-how-best-to-handle-warning-about-unreachable-end-of-function-after-switch
114 */
115 criticalError("unreachable getCrankDivider");
116 return 1;
117}
@ FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR
@ FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR
@ FOUR_STROKE_THREE_TIMES_CRANK_SENSOR
@ FOUR_STROKE_CRANK_SENSOR
@ OM_NONE
@ FOUR_STROKE_CAM_SENSOR
@ TWO_STROKE
@ FOUR_STROKE_SIX_TIMES_CRANK_SENSOR

Referenced by adjustCrankPhase(), getRpmMultiplier(), and TriggerCentral::handleShaftSignal().

Here is the caller graph for this function:

◆ getTriggerCentral()

TriggerCentral * getTriggerCentral ( )

◆ handleShaftSignal()

void handleShaftSignal ( int  signalIndex,
bool  isRising,
efitick_t  timestamp 
)

no need to process VR falls further

Definition at line 485 of file trigger_central.cpp.

485 {
486 bool isPrimary = signalIndex == 0;
487 if (!isPrimary && !TRIGGER_WAVEFORM(needSecondTriggerInput)) {
488 return;
489 }
490
491 trigger_event_e signal;
492 // todo: add support for 3rd channel
493 if (isRising) {
494 signal = isPrimary ?
496 (engineConfiguration->invertSecondaryTriggerSignal ? SHAFT_SECONDARY_FALLING : SHAFT_SECONDARY_RISING);
497 } else {
498 signal = isPrimary ?
500 (engineConfiguration->invertSecondaryTriggerSignal ? SHAFT_SECONDARY_RISING : SHAFT_SECONDARY_FALLING);
501 }
502 if (isPrimary) {
504 } else {
506 }
507
508 // Don't accept trigger input in case of some problems
509 if (!getLimpManager()->allowTriggerInput()) {
510 return;
511 }
512
513#if EFI_TOOTH_LOGGER
514 // Log to the Tunerstudio tooth logger
515 // We want to do this before anything else as we
516 // actually want to capture any noise/jitter that may be occurring
517
519
520 if (!logLogicState) {
521 // we log physical state even if displayLogicLevelsInEngineSniffer if both fronts are used by decoder
522 LogTriggerTooth(signal, timestamp);
523 }
524
525#endif /* EFI_TOOTH_LOGGER */
526
527 // for effective noise filtering, we need both signal edges,
528 // so we pass them to handleShaftSignal() and defer this test
530 if (!isUsefulSignal(signal, getTriggerCentral()->triggerShape)) {
531 /**
532 * no need to process VR falls further
533 */
534 return;
535 }
536 }
537
538#if EFI_TOOTH_LOGGER
539 if (logLogicState) {
540 // first log rising normally
541 LogTriggerTooth(signal, timestamp);
542 // in 'logLogicState' mode we log opposite front right after logical rising away
543 if (signal == SHAFT_PRIMARY_RISING) {
545 } else {
547 }
548 }
549#endif /* EFI_TOOTH_LOGGER */
550
551 uint32_t triggerHandlerEntryTime = getTimeNowLowerNt();
555
556 getTriggerCentral()->handleShaftSignal(signal, timestamp);
557
559 triggerDuration = getTimeNowLowerNt() - triggerHandlerEntryTime;
561}
TunerStudioOutputChannels outputChannels
Definition engine.h:109
TriggerWaveform triggerShape
void handleShaftSignal(trigger_event_e signal, efitick_t timestamp)
LimpManager * getLimpManager()
Definition engine.cpp:596
TriggerCentral * getTriggerCentral()
Definition engine.cpp:590
static constexpr engine_configuration_s * engineConfiguration
uint32_t getTimeNowLowerNt()
@ LogTriggerTooth
trigger_event_e
@ SHAFT_SECONDARY_RISING
@ SHAFT_SECONDARY_FALLING
@ SHAFT_PRIMARY_FALLING
@ SHAFT_PRIMARY_RISING
uint32_t triggerDuration
int maxTriggerReentrant
int triggerReentrant
uint32_t triggerMaxDuration
bool isUsefulSignal(trigger_event_e signal, const TriggerWaveform &shape)

Referenced by TriggerEmulatorHelper::handleEmulatorCallback(), and hwHandleShaftSignal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleVvtCamSignal()

void handleVvtCamSignal ( TriggerValue  front,
efitick_t  timestamp,
int  index 
)

we prefer not to have VVT sync right at trigger sync so that we do not have phase detection error if things happen a bit in wrong order due to belt flex or else https://github.com/rusefi/rusefi/issues/3269

Definition at line 323 of file trigger_central.cpp.

323 {
325 if (index == 0) {
327 } else if (index == 1) {
329 } else if (index == 2) {
331 } else if (index == 3) {
333 }
334
335 int bankIndex = BANK_BY_INDEX(index);
336 int camIndex = CAM_BY_INDEX(index);
337 if (front == TriggerValue::RISE) {
338 tc->vvtEventRiseCounter[index]++;
339 } else {
340 tc->vvtEventFallCounter[index]++;
341 }
342 if (engineConfiguration->vvtMode[camIndex] == VVT_INACTIVE) {
343 warning(ObdCode::CUSTOM_VVT_MODE_NOT_SELECTED, "VVT: event on %d but no mode", camIndex);
344 }
345
346 const auto& vvtShape = tc->vvtShape[camIndex];
347
348 bool isVvtWithRealDecoder = vvtWithRealDecoder(engineConfiguration->vvtMode[camIndex]);
349
350 // Non real decoders only use the rising edge
351 bool vvtUseOnlyRise = !isVvtWithRealDecoder || vvtShape.useOnlyRisingEdges;
352 bool isImportantFront = !vvtUseOnlyRise || (front == TriggerValue::RISE);
353
354 logVvtFront(vvtUseOnlyRise, isImportantFront, front, nowNt, index);
355
356 if (!isImportantFront) {
357 // This edge is unimportant, ignore it.
358 return;
359 }
360
361 // If the main trigger is not synchronized, don't decode VVT yet
363 return;
364 }
365
366 TriggerDecoderBase& vvtDecoder = tc->vvtState[bankIndex][camIndex];
367
368 if (isVvtWithRealDecoder) {
369 vvtDecoder.decodeTriggerEvent(
370 "vvt",
371 vvtShape,
372 nullptr,
373 tc->vvtTriggerConfiguration[camIndex],
375 vvtDecoder.vvtToothDurations0 = (uint32_t)NT2US(vvtDecoder.toothDurations[0]);
376 }
377
378 // here we count all cams together
379 tc->vvtCamCounter++;
380
381 auto currentPhase = tc->getCurrentEnginePhase(nowNt);
382 if (!currentPhase) {
383 // If we couldn't resolve engine speed (yet primary trigger is sync'd), this
384 // probably means that we have partial crank sync, but not RPM information yet
385 return;
386 }
387
388 angle_t angleFromPrimarySyncPoint = currentPhase.Value;
389 // convert trigger cycle angle into engine cycle angle
390 angle_t currentPosition = angleFromPrimarySyncPoint - tdcPosition();
391 // https://github.com/rusefi/rusefi/issues/1713 currentPosition could be negative that's expected
392
393#if EFI_UNIT_TEST
394 tc->currentVVTEventPosition[bankIndex][camIndex] = currentPosition;
395#endif // EFI_UNIT_TEST
396
397 tc->triggerState.vvtCurrentPosition = currentPosition;
398
399 if (isVvtWithRealDecoder && vvtDecoder.currentCycle.current_index != 0) {
400 // this is not sync tooth - exiting
401 return;
402 }
403
404 auto vvtPosition = engineConfiguration->vvtOffsets[bankIndex * CAMS_PER_BANK + camIndex] - currentPosition;
405 tc->triggerState.vvtToothPosition[index] = vvtPosition;
406
407 bool skipTooth = skipToothSpecialShape(index, engineConfiguration->vvtMode[camIndex], currentPosition);
408 if (skipTooth) {
409 return;
410 }
411
412 // this could be just an 'if' but let's have it expandable for future use :)
413 switch(engineConfiguration->vvtMode[camIndex]) {
414 case VVT_HONDA_K_INTAKE:
415 // honda K has four tooth in VVT intake trigger, so we just wrap each of those to 720 / 4
416 vvtPosition = wrapVvt(vvtPosition, 180);
417 break;
418 default:
419 // else, do nothing
420 break;
421 }
422
423#if EFI_PROD_CODE
426 criticalError("Selected engine sync input not configured: %d", engineConfiguration->engineSyncCam);
427 }
428#endif // EFI_PROD_CODE
429
430 // Only do engine sync using one cam, other cams just provide VVT position.
431 if (index == engineConfiguration->engineSyncCam) {
432 angle_t crankOffset = adjustCrankPhase(camIndex);
433 // vvtPosition was calculated against wrong crank zero position. Now that we have adjusted crank position we
434 // shall adjust vvt position as well
435 vvtPosition -= crankOffset;
436 vvtPosition = wrapVvt(vvtPosition, FOUR_STROKE_CYCLE_DURATION);
437
438 if (absF(angleFromPrimarySyncPoint) < 7) {
439 /**
440 * we prefer not to have VVT sync right at trigger sync so that we do not have phase detection error if things happen a bit in
441 * wrong order due to belt flex or else
442 * https://github.com/rusefi/rusefi/issues/3269
443 */
444 warning(ObdCode::CUSTOM_VVT_SYNC_POSITION, "VVT sync position too close to trigger sync");
445 }
446 } else {
447 // Not using this cam for engine sync, just wrap the value in to the reasonable range
448 vvtPosition = wrapVvt(vvtPosition, FOUR_STROKE_CYCLE_DURATION);
449 }
450
451 // Only record VVT position if we have full engine sync - may be bogus before that point
453 tc->vvtPosition[bankIndex][camIndex] = vvtPosition;
454 } else {
455 tc->vvtPosition[bankIndex][camIndex] = 0;
456 }
457}
bool hasSynchronizedPhase() const
VvtTriggerDecoder vvtState[BANKS_COUNT][CAMS_PER_BANK]
PrimaryTriggerDecoder triggerState
TriggerWaveform vvtShape[CAMS_PER_BANK]
angle_t vvtPosition[BANKS_COUNT][CAMS_PER_BANK]
VvtTriggerConfiguration vvtTriggerConfiguration[CAMS_PER_BANK]
expected< float > getCurrentEnginePhase(efitick_t nowNt) const
angle_t currentVVTEventPosition[BANKS_COUNT][CAMS_PER_BANK]
expected< TriggerDecodeResult > decodeTriggerEvent(const char *msg, const TriggerWaveform &triggerShape, TriggerStateListener *triggerStateListener, const TriggerConfiguration &triggerConfiguration, const trigger_event_e signal, const efitick_t nowNt)
Trigger decoding happens here VR falls are filtered out and some VR noise detection happens prior to ...
current_cycle_state_s currentCycle
uint32_t toothDurations[GAP_TRACKING_LENGTH+1]
bool getShaftSynchronized() const
bool warning(ObdCode code, const char *fmt,...)
@ CUSTOM_VVT_SYNC_POSITION
@ CUSTOM_VVT_MODE_NOT_SELECTED
bool isBrainPinValid(brain_pin_e brainPin)
float angle_t
uint16_t vvtEventRiseCounter[CAM_INPUTS_COUNT]
uint16_t vvtEventFallCounter[CAM_INPUTS_COUNT]
static bool vvtWithRealDecoder(vvt_mode_e vvtMode)
static void logVvtFront(bool useOnlyRise, bool isImportantFront, TriggerValue front, efitick_t nowNt, int index)
static angle_t wrapVvt(angle_t vvtPosition, int period)
PUBLIC_API_WEAK bool skipToothSpecialShape(size_t index, vvt_mode_e vvtMode, angle_t currentPosition)
static angle_t adjustCrankPhase(int camIndex)

Referenced by TriggerEmulatorHelper::handleEmulatorCallback(), and hwHandleVvtCamSignal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hwHandleShaftSignal()

void hwHandleShaftSignal ( int  signalIndex,
bool  isRising,
efitick_t  timestamp 
)

This function is called by all "hardware" trigger inputs:

  • Hardware triggers
  • Trigger replay from CSV (unit tests)

Definition at line 469 of file trigger_central.cpp.

469 {
470 if (tooSoonToHandleSignal()) {
471 return;
472 }
475
477 // sensor noise + self-stim = loss of trigger sync
478 return;
479 }
480
481 handleShaftSignal(signalIndex, isRising, timestamp);
482}
@ HandleShaftSignal
static bool tooSoonToHandleSignal()
void handleShaftSignal(int signalIndex, bool isRising, efitick_t timestamp)

Referenced by comp_shaft_callback(), onTriggerChanged(), and shaft_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hwHandleVvtCamSignal() [1/2]

void hwHandleVvtCamSignal ( bool  isRising,
efitick_t  nowNt,
int  index 
)

This function is called by all "hardware" trigger inputs:

  • Hardware triggers
  • Trigger replay from CSV (unit tests)

Definition at line 272 of file trigger_central.cpp.

272 {
273 int camIndex = CAM_BY_INDEX(index);
275
276 if (isRising ^ invertSetting) {
278 } else {
280 }
281}
void hwHandleVvtCamSignal(bool isRising, efitick_t nowNt, int index)

Referenced by cam_callback(), comp_cam_callback(), and hwHandleVvtCamSignal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hwHandleVvtCamSignal() [2/2]

void hwHandleVvtCamSignal ( TriggerValue  front,
efitick_t  timestamp,
int  index 
)

Definition at line 284 of file trigger_central.cpp.

284 {
285 if (tooSoonToHandleSignal()) {
286 return;
287 }
290 // sensor noise + self-stim = loss of trigger sync
291 return;
292 }
293 handleVvtCamSignal(front, nowNt, index);
294}
void handleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index)

Referenced by TriggerCentral::decodeMapCam().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initTriggerCentral()

void initTriggerCentral ( )

Definition at line 1276 of file trigger_central.cpp.

1276 {
1277
1278#if EFI_ENGINE_SNIFFER
1280#endif /* EFI_ENGINE_SNIFFER */
1281
1282#if EFI_PROD_CODE || EFI_SIMULATOR
1283 addConsoleAction(CMD_TRIGGERINFO, triggerInfo);
1284 addConsoleAction("trigger_shape_info", triggerShapeInfo);
1286#endif // EFI_PROD_CODE || EFI_SIMULATOR
1287
1288}
void addConsoleAction(const char *token, Void callback)
Register console action without parameters.
void initWaveChart(WaveChart *chart)
static void triggerShapeInfo()
void triggerInfo(void)
static void resetRunningTriggerCounters()
WaveChart waveChart

Referenced by commonEarlyInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSignalDecoderError()

int isSignalDecoderError ( void  )

◆ isTriggerUpEvent()

constexpr bool isTriggerUpEvent ( trigger_event_e  event)
constexpr

Definition at line 248 of file trigger_central.h.

248 {
249 switch (event) {
252 return false;
255 return true;
256 }
257
258 return false;
259}

Referenced by isUsefulSignal(), and reportEventToWaveChart().

Here is the caller graph for this function:

◆ onConfigurationChangeTriggerCallback()

void onConfigurationChangeTriggerCallback ( )

Definition at line 1057 of file trigger_central.cpp.

1057 {
1058 bool changed = false;
1059 // todo: how do we static_assert here?
1060 criticalAssertVoid(efi::size(engineConfiguration->camInputs) == efi::size(engineConfiguration->vvtOffsets), "sizes");
1061
1062 for (size_t camIndex = 0; camIndex < efi::size(engineConfiguration->camInputs); camIndex++) {
1063 changed |= isConfigurationChanged(camInputs[camIndex]);
1064 changed |= isConfigurationChanged(vvtOffsets[camIndex]);
1065 }
1066
1067 for (size_t i = 0; i < efi::size(engineConfiguration->triggerGapOverrideFrom); i++) {
1068 changed |= isConfigurationChanged(triggerGapOverrideFrom[i]);
1069 changed |= isConfigurationChanged(triggerGapOverrideTo[i]);
1070 }
1071
1072 for (size_t i = 0; i < efi::size(engineConfiguration->triggerInputPins); i++) {
1073 changed |= isConfigurationChanged(triggerInputPins[i]);
1075 if (engineConfiguration->vvtMode[0] == VVT_MAP_V_TWIN && isBrainPinValid(pin)) {
1076 criticalError("Please no physical sensors in CAM by MAP mode index=%d %s", i, hwPortname(pin));
1077 }
1078 }
1079
1080 for (size_t i = 0; i < efi::size(engineConfiguration->vvtMode); i++) {
1081 changed |= isConfigurationChanged(vvtMode[i]);
1082 }
1083
1084 changed |= isConfigurationChanged(trigger.type);
1085 changed |= isConfigurationChanged(skippedWheelOnCam);
1086 changed |= isConfigurationChanged(twoStroke);
1087 changed |= isConfigurationChanged(globalTriggerAngleOffset);
1088 changed |= isConfigurationChanged(trigger.customTotalToothCount);
1089 changed |= isConfigurationChanged(trigger.customSkippedToothCount);
1090 changed |= isConfigurationChanged(overrideTriggerGaps);
1091 changed |= isConfigurationChanged(gapTrackingLengthOverride);
1092 changed |= isConfigurationChanged(overrideVvtTriggerGaps);
1093 changed |= isConfigurationChanged(gapVvtTrackingLengthOverride);
1094
1095 if (changed) {
1096 #if EFI_ENGINE_CONTROL
1099 #endif
1100 }
1101#if EFI_DETAILED_LOGGING
1102 efiPrintf("isTriggerConfigChanged=%d", triggerConfigChanged);
1103#endif /* EFI_DETAILED_LOGGING */
1104
1105 // we do not want to miss two updates in a row
1107}
void updateTriggerConfiguration()
Definition engine.cpp:133
TriggerNoiseFilter noiseFilter
bool triggerConfigChangedOnLastConfigurationChange
const char * hwPortname(brain_pin_e brainPin)
brain_pin_e pin
Definition stm32_adc.cpp:15
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]

Referenced by incrementGlobalConfigurationVersion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triggerInfo()

void triggerInfo ( void  )

Definition at line 952 of file trigger_central.cpp.

952 {
953#if EFI_PROD_CODE || EFI_SIMULATOR
954
956 TriggerWaveform *ts = &tc->triggerShape;
957
958
959#if (HAL_TRIGGER_USE_PAL == TRUE) && (PAL_USE_CALLBACKS == TRUE)
960 efiPrintf("trigger PAL mode %d", tc->hwTriggerInputEnabled);
961#else
962
963#endif /* HAL_TRIGGER_USE_PAL */
964
965 efiPrintf("Template %s (%d) trigger %s (%d) syncEdge=%s tdcOffset=%.2f",
970 getSyncEdge(TRIGGER_WAVEFORM(syncEdge)), TRIGGER_WAVEFORM(tdcPosition));
971
973 efiPrintf("total %d/skipped %d", engineConfiguration->trigger.customTotalToothCount,
975 }
976
977
978 efiPrintf("trigger#1 event counters up=%d/down=%d", tc->getHwEventCounter(0),
979 tc->getHwEventCounter(1));
980
981 if (ts->needSecondTriggerInput) {
982 efiPrintf("trigger#2 event counters up=%d/down=%d", tc->getHwEventCounter(2),
983 tc->getHwEventCounter(3));
984 }
985 efiPrintf("expected cycle events %d/%d",
986 TRIGGER_WAVEFORM(getExpectedEventCount(TriggerWheel::T_PRIMARY)),
987 TRIGGER_WAVEFORM(getExpectedEventCount(TriggerWheel::T_SECONDARY)));
988
989 efiPrintf("trigger type=%d/need2ndChannel=%s", (int)engineConfiguration->trigger.type,
990 boolToString(TRIGGER_WAVEFORM(needSecondTriggerInput)));
991
992
993 efiPrintf("synchronizationNeeded=%s/isError=%s/total errors=%lu ord_err=%lu/total revolutions=%d/self=%s",
1000
1001 if (TRIGGER_WAVEFORM(isSynchronizationNeeded)) {
1002 efiPrintf("gap from %.2f to %.2f", TRIGGER_WAVEFORM(synchronizationRatioFrom[0]), TRIGGER_WAVEFORM(synchronizationRatioTo[0]));
1003 }
1004
1005#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
1006
1007#if EFI_PROD_CODE
1008
1009 efiPrintf("primary trigger input: %s", hwPortname(engineConfiguration->triggerInputPins[0]));
1010 efiPrintf("primary trigger simulator: %s %s freq=%d",
1014
1015 if (ts->needSecondTriggerInput) {
1016 efiPrintf("secondary trigger input: %s", hwPortname(engineConfiguration->triggerInputPins[1]));
1017#if EFI_EMULATE_POSITION_SENSORS
1018 efiPrintf("secondary trigger simulator: %s %s phase=%d",
1021#endif /* EFI_EMULATE_POSITION_SENSORS */
1022 }
1023
1024
1025 for (int camInputIndex = 0; camInputIndex<CAM_INPUTS_COUNT;camInputIndex++) {
1026 if (isBrainPinValid(engineConfiguration->camInputs[camInputIndex])) {
1027 int camLogicalIndex = camInputIndex % CAMS_PER_BANK;
1028 efiPrintf("VVT input: %s mode %s", hwPortname(engineConfiguration->camInputs[camInputIndex]),
1029 getVvt_mode_e(engineConfiguration->vvtMode[camLogicalIndex]));
1030 efiPrintf("VVT %d event counters: %d/%d",
1031 camInputIndex,
1032 tc->vvtEventRiseCounter[camInputIndex], tc->vvtEventFallCounter[camInputIndex]);
1033 }
1034 }
1035
1036 efiPrintf("primary logic input: %s", hwPortname(engineConfiguration->logicAnalyzerPins[0]));
1037 efiPrintf("secondary logic input: %s", hwPortname(engineConfiguration->logicAnalyzerPins[1]));
1038
1039
1040 efiPrintf("totalTriggerHandlerMaxTime=%lu", triggerMaxDuration);
1041
1042#endif /* EFI_PROD_CODE */
1043
1044#if EFI_ENGINE_SNIFFER
1045 efiPrintf("engine sniffer current size=%d", waveChart.getSize());
1046#endif /* EFI_ENGINE_SNIFFER */
1047
1048}
const char * getPin_output_mode_e(pin_output_mode_e value)
const char * getVvt_mode_e(vvt_mode_e value)
const char * getEngine_type_e(engine_type_e value)
const char * getTrigger_type_e(trigger_type_e value)
const char * getSyncEdge(SyncEdge value)
pwm_config_safe_state_s safe
int getHwEventCounter(int index) const
int getSynchronizationCounter() const
uint32_t totalTriggerErrorCounter
Trigger shape has all the fields needed to describe and decode trigger signal.
const char * boolToString(bool value)
Definition efilib.cpp:19
brain_input_pin_e logicAnalyzerPins[LOGIC_ANALYZER_CHANNEL_COUNT]
pin_output_mode_e triggerSimulatorPinModes[TRIGGER_SIMULATOR_PIN_COUNT]
PwmConfig triggerEmulatorSignals[NUM_EMULATOR_CHANNELS]

Referenced by initTriggerCentral(), and resetRunningTriggerCounters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateTriggerInputs()

void validateTriggerInputs ( )

Definition at line 1266 of file trigger_central.cpp.

1266 {
1268 criticalError("First trigger channel not configured while second one is.");
1269 }
1270
1272 criticalError("First bank cam input is required if second bank specified");
1273 }
1274}

Referenced by startHardware().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.