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 }
 

Function Documentation

◆ getTrigger_event_e()

const char * getTrigger_event_e ( trigger_event_e  value)

Definition at line 276 of file trigger_decoder.cpp.

276 {
277switch(value) {
279 return "SHAFT_PRIMARY_FALLING";
281 return "SHAFT_PRIMARY_RISING";
283 return "SHAFT_SECONDARY_FALLING";
285 return "SHAFT_SECONDARY_RISING";
286 }
287 return NULL;
288}
@ 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 289 of file trigger_decoder.cpp.

289 {
290switch(value) {
292 return "TriggerValue::FALL";
294 return "TriggerValue::RISE";
295 }
296 return NULL;
297}

Referenced by TriggerWaveform::addEvent().

Here is the caller graph for this function:

◆ isTriggerCounterError()

PUBLIC_API_WEAK bool isTriggerCounterError ( int8_t  triggerCountersError)

Definition at line 307 of file trigger_decoder.cpp.

307 {
308 return triggerCountersError != 0;
309}
triggerCountersError("triggerCountersError", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 1585, 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 358 of file trigger_decoder.cpp.

358 {
359 if (triggerWheel != TriggerWheel::T_PRIMARY && triggerShape.useOnlyPrimaryForSync) {
360 // Non-primary events ignored
361 return false;
362 }
363
364 switch (triggerShape.syncEdge) {
365 case SyncEdge::Both: return true;
367 case SyncEdge::Rise: return edge == TriggerValue::RISE;
368 case SyncEdge::Fall: return edge == TriggerValue::FALL;
369 }
370
371 // how did we get here?
372 // assert(false)?
373
374 return false;
375}

Referenced by TriggerDecoderBase::decodeTriggerEvent().

Here is the caller graph for this function:

Variable Documentation

◆ eventIndex

◆ eventType

◆ printTriggerDebug

bool printTriggerDebug = false

◆ printTriggerTrace

bool printTriggerTrace = false

Go to the source code of this file.