rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
trigger_decoder.cpp File Reference

Detailed Description

Date
Dec 24, 2013
Author
Andrey Belomutskiy, (c) 2012-2020

enable trigger_details

This file is part of rusEfi - see http://rusefi.com

rusEfi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file trigger_decoder.cpp.

Functions

const chargetTrigger_event_e (trigger_event_e value)
 
const chargetTrigger_value_e (TriggerValue value)
 
PUBLIC_API_WEAK bool isTriggerCounterError (int8_t triggerCountersError)
 
static bool shouldConsiderEdge (const TriggerWaveform &triggerShape, TriggerWheel triggerWheel, TriggerValue edge)
 

Variables

bool printTriggerDebug = false
 
bool printTriggerTrace = false
 
static TriggerWheel eventIndex [4] = { TriggerWheel::T_PRIMARY, TriggerWheel::T_PRIMARY, TriggerWheel::T_SECONDARY, TriggerWheel::T_SECONDARY }
 
static TriggerValue eventType [4] = { TriggerValue::FALL, TriggerValue::RISE, TriggerValue::FALL, TriggerValue::RISE }
 
int tooManyTeethCounter = 0
 

Function Documentation

◆ getTrigger_event_e()

const char * getTrigger_event_e ( trigger_event_e  value)

Definition at line 290 of file trigger_decoder.cpp.

290 {
291switch(value) {
293 return "SHAFT_PRIMARY_FALLING";
295 return "SHAFT_PRIMARY_RISING";
297 return "SHAFT_SECONDARY_FALLING";
299 return "SHAFT_SECONDARY_RISING";
300 }
301 return NULL;
302}
@ SHAFT_SECONDARY_RISING
@ SHAFT_SECONDARY_FALLING
@ SHAFT_PRIMARY_FALLING
@ SHAFT_PRIMARY_RISING

Referenced by TriggerDecoderBase::decodeTriggerEvent().

Here is the caller graph for this function:

◆ getTrigger_value_e()

const char * getTrigger_value_e ( TriggerValue  value)

Definition at line 303 of file trigger_decoder.cpp.

303 {
304switch(value) {
306 return "TriggerValue::FALL";
308 return "TriggerValue::RISE";
309 }
310 return NULL;
311}

Referenced by TriggerWaveform::addEvent().

Here is the caller graph for this function:

◆ isTriggerCounterError()

PUBLIC_API_WEAK bool isTriggerCounterError ( int8_t  triggerCountersError)

Definition at line 321 of file trigger_decoder.cpp.

321 {
322 return triggerCountersError != 0;
323}
triggerCountersError("triggerCountersError", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 1605, 1.0, -1.0, -1.0, "")

Referenced by TriggerDecoderBase::decodeTriggerEvent().

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

◆ shouldConsiderEdge()

static bool shouldConsiderEdge ( const TriggerWaveform triggerShape,
TriggerWheel  triggerWheel,
TriggerValue  edge 
)
static

Definition at line 372 of file trigger_decoder.cpp.

372 {
373 if (triggerWheel != TriggerWheel::T_PRIMARY && triggerShape.useOnlyPrimaryForSync) {
374 // Non-primary events ignored
375 return false;
376 }
377
378 switch (triggerShape.syncEdge) {
379 case SyncEdge::Both: return true;
381 case SyncEdge::Rise: return edge == TriggerValue::RISE;
382 case SyncEdge::Fall: return edge == TriggerValue::FALL;
383 }
384
385 // how did we get here?
386 // assert(false)?
387
388 return false;
389}

Referenced by TriggerDecoderBase::decodeTriggerEvent().

Here is the caller graph for this function:

Variable Documentation

◆ eventIndex

◆ eventType

◆ printTriggerDebug

bool printTriggerDebug = false

◆ printTriggerTrace

bool printTriggerTrace = false

◆ tooManyTeethCounter

int tooManyTeethCounter = 0

Definition at line 279 of file trigger_decoder.cpp.

Referenced by TriggerDecoderBase::decodeTriggerEvent().

Go to the source code of this file.