rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions
VvtTriggerDecoder Class Reference

#include <trigger_decoder.h>

Inheritance diagram for VvtTriggerDecoder:
Inheritance graph
[legend]
Collaboration diagram for VvtTriggerDecoder:
Collaboration graph
[legend]

Public Member Functions

 VvtTriggerDecoder (const char *p_name)
 
void onNotEnoughTeeth (int actual, int expected) override
 
void onTooManyTeeth (int actual, int expected) override
 
- Public Member Functions inherited from TriggerDecoderBase
 TriggerDecoderBase (const char *name)
 
void printGaps (const char *prefix, const TriggerConfiguration &triggerConfiguration, const TriggerWaveform &triggerShape)
 
int getCurrentIndex () const
 
int getSynchronizationCounter () const
 
void incrementShaftSynchronizationCounter ()
 
int64_t getTotalEventCounter () const
 
expected< TriggerDecodeResultdecodeTriggerEvent (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 invoking this method, for Hall this method is invoked every time we have a fall or rise on one of the trigger sensors. This method changes the state of trigger_state_s data structure according to the trigger event.
 
void onShaftSynchronization (bool wasSynchronized, const efitick_t nowNt, const TriggerWaveform &triggerShape)
 
bool isValidIndex (const TriggerWaveform &triggerShape) const
 
virtual void resetState ()
 
void setShaftSynchronized (bool value)
 
bool getShaftSynchronized () const
 
uint32_t findTriggerZeroEventIndex (TriggerWaveform &shape, const TriggerConfiguration &triggerConfiguration)
 
bool someSortOfTriggerError () const
 

Additional Inherited Members

- Data Fields inherited from TriggerDecoderBase
float gapRatio [PWM_PHASE_MAX_COUNT *6]
 
bool shaft_is_synchronized = false
 
efitick_t mostRecentSyncTime
 
Timer previousEventTimer
 
uint32_t toothDurations [GAP_TRACKING_LENGTH+1]
 
efitick_t toothed_previous_time
 
current_cycle_state_s currentCycle
 
const char *const name
 
uint32_t totalTriggerErrorCounter
 
uint32_t orderingErrorCounter
 
efitick_t startOfCycleNt
 
- Data Fields inherited from trigger_state_s
uint32_t synchronizationCounter = (uint32_t)0
 
uint32_t vvtToothDurations0 = (uint32_t)0
 
float vvtCurrentPosition = (float)0
 
float vvtToothPosition [4] = {}
 
float triggerSyncGapRatio = (float)0
 
uint8_t triggerStateIndex = (uint8_t)0
 
int8_t triggerCountersError = (int8_t)0
 
uint8_t alignmentFill_at_34 [2] = {}
 
- Protected Member Functions inherited from TriggerDecoderBase
virtual void onTriggerError ()
 

Detailed Description

Definition at line 236 of file trigger_decoder.h.

Constructor & Destructor Documentation

◆ VvtTriggerDecoder()

VvtTriggerDecoder::VvtTriggerDecoder ( const char p_name)
inline

Definition at line 238 of file trigger_decoder.h.

Member Function Documentation

◆ onNotEnoughTeeth()

void VvtTriggerDecoder::onNotEnoughTeeth ( int  actual,
int  expected 
)
overridevirtual

Reimplemented from TriggerDecoderBase.

Definition at line 299 of file trigger_decoder.cpp.

299 {
300 warning(ObdCode::CUSTOM_CAM_NOT_ENOUGH_TEETH, "cam %s trigger error: not enough teeth between sync points: actual %d expected %d", name, actual, expected);
301}
const char *const name
bool warning(ObdCode code, const char *fmt,...)
@ CUSTOM_CAM_NOT_ENOUGH_TEETH
Here is the call graph for this function:

◆ onTooManyTeeth()

void VvtTriggerDecoder::onTooManyTeeth ( int  actual,
int  expected 
)
overridevirtual

Reimplemented from TriggerDecoderBase.

Definition at line 303 of file trigger_decoder.cpp.

303 {
304 warning(ObdCode::CUSTOM_CAM_TOO_MANY_TEETH, "cam %s trigger error: too many teeth between sync points: %d > %d", name, actual, expected);
305}
@ CUSTOM_CAM_TOO_MANY_TEETH
Here is the call graph for this function:

The documentation for this class was generated from the following files: