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

Functions

void initSpeedometer ()
 
void speedoUpdate ()
 

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:

Go to the source code of this file.