rusEFI
The most advanced open source ECU
|
#include <trigger_decoder.h>
Public Member Functions | |
PrimaryTriggerDecoder (const char *name) | |
void | resetState () override |
void | resetHasFullSync () |
angle_t | syncEnginePhase (int divider, int remainder, angle_t engineCycle) |
bool | hasSynchronizedPhase () const |
void | setNeedsDisambiguation (bool needsDisambiguation) |
void | onTriggerError () override |
void | onNotEnoughTeeth (int actual, int expected) override |
void | onTooManyTeeth (int actual, int expected) override |
![]() | |
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< 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 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 |
void | setShaftSynchronized (bool value) |
bool | getShaftSynchronized () const |
uint32_t | findTriggerZeroEventIndex (TriggerWaveform &shape, const TriggerConfiguration &triggerConfiguration) |
bool | someSortOfTriggerError () const |
Private Attributes | |
bool | m_needsDisambiguation = false |
the reason for sub-class is simply to save RAM but not having statistics in the trigger initialization instance
Definition at line 198 of file trigger_decoder.h.
PrimaryTriggerDecoder::PrimaryTriggerDecoder | ( | const char * | name | ) |
Definition at line 102 of file trigger_decoder.cpp.
|
inline |
Definition at line 216 of file trigger_decoder.h.
Referenced by getCurrentIgnitionMode(), handleVvtCamSignal(), and LimpManager::updateState().
|
overridevirtual |
Reimplemented from TriggerDecoderBase.
Definition at line 260 of file trigger_decoder.cpp.
|
overridevirtual |
Reimplemented from TriggerDecoderBase.
Definition at line 268 of file trigger_decoder.cpp.
|
overridevirtual |
Reimplemented from TriggerDecoderBase.
Definition at line 245 of file trigger_decoder.cpp.
|
inline |
Definition at line 203 of file trigger_decoder.h.
Referenced by onTriggerError(), resetState(), and setNeedsDisambiguation().
|
overridevirtual |
Reimplemented from TriggerDecoderBase.
Definition at line 183 of file trigger_decoder.cpp.
Referenced by Engine::OnTriggerSynchronizationLost(), and TriggerCentral::TriggerCentral().
|
inline |
Definition at line 220 of file trigger_decoder.h.
Referenced by TriggerCentral::applyShapesConfiguration().
returns zero if we were lucky to have correct engine phase, otherwise angle of engine phase correction which was applied.
we are here if we've detected the cam sensor within the wrong crank phase let's increase the trigger event counter, that would adjust the state of virtual crank-based trigger
Definition at line 216 of file trigger_decoder.cpp.
Referenced by TriggerCentral::syncEnginePhaseAndReport().
|
private |
Definition at line 233 of file trigger_decoder.h.
Referenced by resetHasFullSync(), and setNeedsDisambiguation().