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 |
Public Member Functions inherited from TriggerDecoderBase | |
TriggerDecoderBase (const char *name) | |
int | getCurrentIndex () const |
int | getCrankSynchronizationCounter () 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. More... | |
void | onShaftSynchronization (bool wasSynchronized, const efitick_t nowNt, const TriggerWaveform &triggerShape) |
bool | isValidIndex (const TriggerWaveform &triggerShape) const |
void | setShaftSynchronized (bool value) |
bool | getShaftSynchronized () |
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 190 of file trigger_decoder.h.
PrimaryTriggerDecoder::PrimaryTriggerDecoder | ( | const char * | name | ) |
Definition at line 94 of file trigger_decoder.cpp.
|
inline |
Definition at line 208 of file trigger_decoder.h.
Referenced by getCurrentIgnitionMode(), handleVvtCamSignal(), and LimpManager::updateState().
|
overridevirtual |
Reimplemented from TriggerDecoderBase.
Definition at line 251 of file trigger_decoder.cpp.
|
overridevirtual |
Reimplemented from TriggerDecoderBase.
Definition at line 259 of file trigger_decoder.cpp.
|
overridevirtual |
Reimplemented from TriggerDecoderBase.
Definition at line 236 of file trigger_decoder.cpp.
|
inline |
Definition at line 195 of file trigger_decoder.h.
Referenced by onTriggerError(), resetState(), and setNeedsDisambiguation().
|
overridevirtual |
Reimplemented from TriggerDecoderBase.
Definition at line 175 of file trigger_decoder.cpp.
Referenced by Engine::OnTriggerSynchronizationLost(), and TriggerCentral::TriggerCentral().
|
inline |
Definition at line 212 of file trigger_decoder.h.
Referenced by TriggerCentral::updateWaveform().
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 208 of file trigger_decoder.cpp.
Referenced by TriggerCentral::syncEnginePhaseAndReport().
|
private |
Definition at line 225 of file trigger_decoder.h.
Referenced by resetHasFullSync(), and setNeedsDisambiguation().