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_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_SIZE, VVT_TABLE_SIZE, int8_t, uint16_t, uint16_t>

Definition at line 16 of file vvt.cpp.

Function Documentation

◆ applyVvtPinState()

static void applyVvtPinState ( int  stateIndex,
PwmConfig state 
)
static

Definition at line 159 of file vvt.cpp.

159 {
160 OutputPin *output = state->outputPins[0];
161 if (output == getOutputOnTheBenchTest()) {
162 return;
163 }
164 state->applyPwmValue(output, stateIndex);
165}
const OutputPin * getOutputOnTheBenchTest()
Single output pin reference and state.
Definition efi_output.h:49
state("state", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 1871, 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 155 of file vvt.cpp.

155 {
156 return &vvtPins[index];
157}
static OutputPin vvtPins[CAM_INPUTS_COUNT]
Definition vvt.cpp:152

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

Here is the caller graph for this function:

◆ initVvtActuators()

void initVvtActuators ( )

Definition at line 192 of file vvt.cpp.

192 {
193
196
197
202
204}
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
void startVvtControlPins()
Definition vvt.cpp:180
static vvt_map_t vvtTable1
Definition vvt.cpp:19
static SimplePwm vvtPwms[CAM_INPUTS_COUNT]
Definition vvt.cpp:153
static vvt_map_t vvtTable2
Definition vvt.cpp:20

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 96 of file vvt.cpp.

96 {
97 // grumble grumble, can't do an array of bits in c++
98 switch (camIndex) {
101 }
102
103 return false;
104}
static constexpr engine_configuration_s * engineConfiguration

Referenced by VvtController::getClosedLoop().

Here is the caller graph for this function:

◆ startVvtControlPins()

void startVvtControlPins ( )

Definition at line 180 of file vvt.cpp.

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

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 186 of file vvt.cpp.

186 {
187 for (int i = 0;i < CAM_INPUTS_COUNT;i++) {
189 }
190}
void deInit()
Definition efi_gpio.cpp:802
OutputPin * getVvtOutputPin(int index)
Definition vvt.cpp:155

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 167 of file vvt.cpp.

167 {
169 return;
170 }
171
175 getVvtOutputPin(index),
178}
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:139
static void applyVvtPinState(int stateIndex, PwmConfig *state)
Definition vvt.cpp:159

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 139 of file vvt.cpp.

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

Referenced by turnVvtPidOn().

◆ vvtPins

OutputPin vvtPins[CAM_INPUTS_COUNT]
static

Definition at line 152 of file vvt.cpp.

Referenced by getVvtOutputPin().

◆ vvtPwms

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

Definition at line 153 of file vvt.cpp.

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

Referenced by initVvtActuators(), and turnVvtPidOn().

◆ vvtTable1

vvt_map_t vvtTable1 {"vvt1"}
static

Definition at line 19 of file vvt.cpp.

19{"vvt1"};

Referenced by initVvtActuators().

◆ vvtTable2

vvt_map_t vvtTable2 {"vvt2"}
static

Definition at line 20 of file vvt.cpp.

20{"vvt2"};

Referenced by initVvtActuators().

Go to the source code of this file.