rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Data Structures | Functions
trigger_structure.h File Reference

Detailed Description

rusEFI defines trigger shape programmatically in C code For integration we have exportAllTriggers export

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

Definition in file trigger_structure.h.

Data Structures

class  TriggerWaveform
 Trigger shape has all the fields needed to describe and decode trigger signal. More...
 
class  TriggerFormDetails
 

Functions

void wrapAngle (angle_t &angle, const char *msg, ObdCode code)
 
angle_t wrapAngleMethod (angle_t param, const char *msg="", ObdCode code=ObdCode::OBD_PCM_Processor_Fault)
 

Function Documentation

◆ wrapAngle()

void wrapAngle ( angle_t angle,
const char msg,
ObdCode  code 
)

Definition at line 43 of file trigger_structure.cpp.

43 {
44 if (std::isnan(angle)) {
46 angle = 0;
47 }
48
49 assertAngleRange(angle, msg, code);
50 float engineCycle = getEngineState()->engineCycle;
51
52 while (angle < 0) {
53 angle += engineCycle;
54 }
55
56 while (angle >= engineCycle) {
57 angle -= engineCycle;
58 }
59}
uint8_t code
Definition bluetooth.cpp:40
angle_t engineCycle
EngineState * getEngineState()
Definition engine.cpp:577
void firmwareError(ObdCode code, const char *fmt,...)
@ CUSTOM_ERR_ANGLE

Referenced by auxPlainPinTurnOn(), InstantRpmCalculator::calculateInstantRpm(), InjectionEvent::computeInjectionAngle(), TriggerCentral::findNextTriggerToothAngle(), getInjectionOffset(), IgnitionState::getWrappedAdvance(), TriggerCentral::handleShaftSignal(), MapAveragingModule::onFastCallback(), EngineState::periodicFastCallback(), prepareCylinderIgnitionSchedule(), TriggerFormDetails::prepareEventAngles(), reportWave(), HpfpController::scheduleNextCycle(), tdcMarkCallback(), and wrapAngleMethod().

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

◆ wrapAngleMethod()

angle_t wrapAngleMethod ( angle_t  param,
const char msg = "",
ObdCode  code = ObdCode::OBD_PCM_Processor_Fault 
)
inline

Definition at line 32 of file trigger_structure.h.

32 {
33 wrapAngle(param, msg, code);
34 return param;
35}
void wrapAngle(angle_t &angle, const char *msg, ObdCode code)
static tstrWifiInitParam param

Referenced by TriggerCentral::handleShaftSignal().

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

Go to the source code of this file.