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

Functions

void speedoUpdate ()
 
void initSpeedometer ()
 

Variables

static SimplePwm speedoPwm ("speedo")
 
static bool hasSpeedoInit = false
 

Function Documentation

◆ initSpeedometer()

void initSpeedometer ( )

Definition at line 25 of file speedometer.cpp.

25 {
26 hasSpeedoInit = false;
27
29 return;
30 }
31
33 "Speedometer",
36 NAN, 0.5f);
37
38 hasSpeedoInit = true;
39}
SingleTimerExecutor scheduler
Definition engine.h:271
RegisteredOutputPin speedoOut
Definition efi_gpio.h:122
EnginePins enginePins
Definition efi_gpio.cpp:24
static EngineAccessor engine
Definition engine.h:413
static constexpr engine_configuration_s * engineConfiguration
bool isBrainPinValid(brain_pin_e brainPin)
void startSimplePwm(SimplePwm *state, const char *msg, Scheduler *executor, OutputPin *output, float frequency, float dutyCycle, pwm_gen_callback *callback)
static bool hasSpeedoInit
static SimplePwm speedoPwm("speedo")

Referenced by commonInitEngineController().

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

◆ speedoUpdate()

void speedoUpdate ( )

Definition at line 9 of file speedometer.cpp.

9 {
10 if (!hasSpeedoInit) {
11 return;
12 }
13
15 float kps = kph * (1. / 3600);
17
18 if (freq < 1) {
19 freq = NAN;
20 }
21
23}
void setFrequency(float frequency)
static float getOrZero(SensorType type)
Definition sensor.h:83

Referenced by Engine::periodicFastCallback().

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

Variable Documentation

◆ hasSpeedoInit

bool hasSpeedoInit = false
static

Definition at line 7 of file speedometer.cpp.

Referenced by initSpeedometer(), and speedoUpdate().

◆ speedoPwm

SimplePwm speedoPwm("speedo") ( "speedo"  )
static

Referenced by initSpeedometer(), and speedoUpdate().

Go to the source code of this file.