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 31 of file speedometer.cpp.

31 {
32 hasSpeedoInit = false;
33
35 return;
36 }
37
39 "Speedometer",
42 NAN, 0.5f);
43
44 hasSpeedoInit = true;
45}
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 15 of file speedometer.cpp.

15 {
16 if (!hasSpeedoInit) {
17 return;
18 }
19
21 float kps = kph * (1. / 3600);
23
24 if (freq < 1) {
25 freq = NAN;
26 }
27
29}
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 13 of file speedometer.cpp.

Referenced by initSpeedometer(), and speedoUpdate().

◆ speedoPwm

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

GMT800 platform (1999–2007 classic Chevrolet Silverado/GMC Sierra, Tahoe, Yukon, etc.) 4000 pulses per mile 2485 pulses per kilometer

Referenced by initSpeedometer(), and speedoUpdate().

Go to the source code of this file.