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

Typedefs

using vvt_map_t = Map3D< VVT_TABLE_RPM_SIZE, VVT_TABLE_SIZE, int8_t, uint16_t, uint16_t >
 

Functions

static bool shouldInvertVvt (int camIndex)
 
OutputPingetVvtOutputPin (int index)
 
static void applyVvtPinState (int stateIndex, PwmConfig *state)
 
static void turnVvtPidOn (int index)
 
void startVvtControlPins ()
 
void stopVvtControlPins ()
 
void initVvtActuators ()
 

Variables

static vvt_map_t vvtTable1 {"vvt1"}
 
static vvt_map_t vvtTable2 {"vvt2"}
 
static const charvvtOutputNames [CAM_INPUTS_COUNT]
 
static OutputPin vvtPins [CAM_INPUTS_COUNT]
 
static SimplePwm vvtPwms [CAM_INPUTS_COUNT] = { "VVT1", "VVT2", "VVT3", "VVT4" }
 

Typedef Documentation

◆ vvt_map_t

using vvt_map_t = Map3D<VVT_TABLE_RPM_SIZE, VVT_TABLE_SIZE, int8_t, uint16_t, uint16_t>

Definition at line 14 of file vvt.cpp.

Function Documentation

◆ applyVvtPinState()

static void applyVvtPinState ( int  stateIndex,
PwmConfig state 
)
static

Definition at line 157 of file vvt.cpp.

157 {
158 OutputPin *output = state->outputPins[0];
159 if (output == getOutputOnTheBenchTest()) {
160 return;
161 }
162 state->applyPwmValue(output, stateIndex);
163}
const OutputPin * getOutputOnTheBenchTest()
Single output pin reference and state.
Definition efi_output.h:49
state("state", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 1879, 1.0, -1.0, -1.0, "")

Referenced by turnVvtPidOn().

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

◆ getVvtOutputPin()

OutputPin * getVvtOutputPin ( int  index)

Definition at line 153 of file vvt.cpp.

153 {
154 return &vvtPins[index];
155}
static OutputPin vvtPins[CAM_INPUTS_COUNT]
Definition vvt.cpp:150

Referenced by EnginePins::getOutputPinForBenchMode(), stopVvtControlPins(), turnVvtPidOn(), and vvtValveBench().

Here is the caller graph for this function:

◆ initVvtActuators()

void initVvtActuators ( )

Definition at line 190 of file vvt.cpp.

190 {
191
194
195
200
202}
constexpr auto & module()
Definition engine.h:200
void initTable(TValueInit(&table)[TRowNum][TColNum], const TXColumnInit(&columnBins)[TColNum], const TRowInit(&rowBins)[TRowNum])
static EngineAccessor engine
Definition engine.h:413
static constexpr persistent_config_s * config
int8_t vvtTable1[VVT_TABLE_SIZE][VVT_TABLE_RPM_SIZE]
int8_t vvtTable2[VVT_TABLE_SIZE][VVT_TABLE_RPM_SIZE]
void startVvtControlPins()
Definition vvt.cpp:178
static vvt_map_t vvtTable1
Definition vvt.cpp:17
static SimplePwm vvtPwms[CAM_INPUTS_COUNT]
Definition vvt.cpp:151
static vvt_map_t vvtTable2
Definition vvt.cpp:18

Referenced by commonInitEngineController().

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

◆ shouldInvertVvt()

static bool shouldInvertVvt ( int  camIndex)
static

Definition at line 94 of file vvt.cpp.

94 {
95 // grumble grumble, can't do an array of bits in c++
96 switch (camIndex) {
99 }
100
101 return false;
102}
static constexpr engine_configuration_s * engineConfiguration

Referenced by VvtController::getClosedLoop().

Here is the caller graph for this function:

◆ startVvtControlPins()

void startVvtControlPins ( )

Definition at line 178 of file vvt.cpp.

178 {
179 for (int i = 0;i <CAM_INPUTS_COUNT;i++) {
180 turnVvtPidOn(i);
181 }
182}
static void turnVvtPidOn(int index)
Definition vvt.cpp:165

Referenced by applyNewHardwareSettings(), and initVvtActuators().

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

◆ stopVvtControlPins()

void stopVvtControlPins ( )

Definition at line 184 of file vvt.cpp.

184 {
185 for (int i = 0;i < CAM_INPUTS_COUNT;i++) {
187 }
188}
void deInit()
Definition efi_gpio.cpp:802
OutputPin * getVvtOutputPin(int index)
Definition vvt.cpp:153

Referenced by stopHardware().

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

◆ turnVvtPidOn()

static void turnVvtPidOn ( int  index)
static

Definition at line 165 of file vvt.cpp.

165 {
167 return;
168 }
169
173 getVvtOutputPin(index),
176}
SingleTimerExecutor scheduler
Definition engine.h:271
bool isBrainPinValid(brain_pin_e brainPin)
void startSimplePwmExt(SimplePwm *state, const char *msg, Scheduler *executor, brain_pin_e brainPin, OutputPin *output, float frequency, float dutyCycle, pwm_gen_callback *callback)
static const char * vvtOutputNames[CAM_INPUTS_COUNT]
Definition vvt.cpp:137
static void applyVvtPinState(int stateIndex, PwmConfig *state)
Definition vvt.cpp:157

Referenced by startVvtControlPins().

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

Variable Documentation

◆ vvtOutputNames

const char* vvtOutputNames[CAM_INPUTS_COUNT]
static
Initial value:
= {
"Vvt Output#1",
#if CAM_INPUTS_COUNT > 1
"Vvt Output#2",
#endif
#if CAM_INPUTS_COUNT > 2
"Vvt Output#3",
#endif
#if CAM_INPUTS_COUNT > 3
"Vvt Output#4",
#endif
}

Definition at line 137 of file vvt.cpp.

137 {
138"Vvt Output#1",
139#if CAM_INPUTS_COUNT > 1
140"Vvt Output#2",
141#endif
142#if CAM_INPUTS_COUNT > 2
143"Vvt Output#3",
144#endif
145#if CAM_INPUTS_COUNT > 3
146"Vvt Output#4",
147#endif
148 };

Referenced by turnVvtPidOn().

◆ vvtPins

OutputPin vvtPins[CAM_INPUTS_COUNT]
static

Definition at line 150 of file vvt.cpp.

Referenced by getVvtOutputPin().

◆ vvtPwms

SimplePwm vvtPwms[CAM_INPUTS_COUNT] = { "VVT1", "VVT2", "VVT3", "VVT4" }
static

Definition at line 151 of file vvt.cpp.

151{ "VVT1", "VVT2", "VVT3", "VVT4" };

Referenced by initVvtActuators(), and turnVvtPidOn().

◆ vvtTable1

vvt_map_t vvtTable1 {"vvt1"}
static

Definition at line 17 of file vvt.cpp.

17{"vvt1"};

Referenced by initVvtActuators().

◆ vvtTable2

vvt_map_t vvtTable2 {"vvt2"}
static

Definition at line 18 of file vvt.cpp.

18{"vvt2"};

Referenced by initVvtActuators().

Go to the source code of this file.