rusEFI
The most advanced open source ECU
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 char * getTrigger_event_e (trigger_event_e value)
 
const char * getTrigger_value_e (TriggerValue value)
 
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 }
 

Function Documentation

◆ getTrigger_event_e()

const char* getTrigger_event_e ( trigger_event_e  value)

Definition at line 267 of file trigger_decoder.cpp.

267  {
268 switch(value) {
270  return "SHAFT_PRIMARY_FALLING";
272  return "SHAFT_PRIMARY_RISING";
274  return "SHAFT_SECONDARY_FALLING";
276  return "SHAFT_SECONDARY_RISING";
277  }
278  return NULL;
279 }
@ 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 280 of file trigger_decoder.cpp.

280  {
281 switch(value) {
282 case TriggerValue::FALL:
283  return "TriggerValue::FALL";
284 case TriggerValue::RISE:
285  return "TriggerValue::RISE";
286  }
287  return NULL;
288 }

Referenced by TriggerWaveform::addEvent().

Here is the caller graph for this function:

◆ shouldConsiderEdge()

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

Definition at line 342 of file trigger_decoder.cpp.

342  {
343  if (triggerWheel != TriggerWheel::T_PRIMARY && triggerShape.useOnlyPrimaryForSync) {
344  // Non-primary events ignored
345  return false;
346  }
347 
348  switch (triggerShape.syncEdge) {
349  case SyncEdge::Both: return true;
350  case SyncEdge::RiseOnly:
351  case SyncEdge::Rise: return edge == TriggerValue::RISE;
352  case SyncEdge::Fall: return edge == TriggerValue::FALL;
353  }
354 
355  // how did we get here?
356  // assert(false)?
357 
358  return false;
359 }

Referenced by TriggerDecoderBase::decodeTriggerEvent().

Here is the caller graph for this function:

Variable Documentation

◆ eventIndex

TriggerWheel eventIndex[4] = { TriggerWheel::T_PRIMARY, TriggerWheel::T_PRIMARY, TriggerWheel::T_SECONDARY, TriggerWheel:: T_SECONDARY }
static

◆ eventType

Definition at line 187 of file trigger_decoder.cpp.

Referenced by TriggerDecoderBase::decodeTriggerEvent().

◆ printTriggerDebug

bool printTriggerDebug = false

◆ printTriggerTrace

bool printTriggerTrace = false

Go to the source code of this file.