rusEFI
The most advanced open source ECU
init_baro.cpp
Go to the documentation of this file.
1 #include "pch.h"
2 #include "Lps25Sensor.h"
3 
4 static Lps25 device;
6 
7 void initBaro() {
8  // If there's already an external (analog) baro sensor configured,
9  // don't configure the internal one.
11  return;
12  }
13 
15  sensor.Register();
16  }
17 }
18 
20 #if EFI_PROD_CODE
21  if (device.hasInit()) {
22  sensor.update();
23  }
24 #endif // EFI_PROD_CODE
25 }
Definition: lps25.h:13
bool init(brain_pin_e scl, brain_pin_e sda)
Definition: lps25.cpp:37
bool hasInit() const
Definition: lps25.h:19
void update()
Definition: Lps25Sensor.cpp:15
bool Register()
Definition: sensor.cpp:131
virtual bool hasSensor() const
Definition: sensor.h:155
static Lps25 device
Definition: init_baro.cpp:4
void initBaro()
Definition: init_baro.cpp:7
void baroLps25Update()
Definition: init_baro.cpp:19
static Lps25Sensor sensor(device)
engine_configuration_s * engineConfiguration
@ BarometricPressure