rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Lps25Sensor.cpp
Go to the documentation of this file.
1/**
2 * @file Lps25Sensor.cpp
3 */
4
5#include "pch.h"
6
7#include "Lps25Sensor.h"
8
14
16 auto result = m_sensor->readPressureKpa();
17
18 if (result) {
19 setValidValue(result.Value, getTimeNowNt());
20 } else {
21 invalidate();
22 }
23}
Definition lps25.h:13
expected< float > readPressureKpa()
Definition lps25.cpp:76
Lps25Sensor(Lps25 &sensor)
Lps25 * m_sensor
Definition Lps25Sensor.h:14
Base class for sensors that compute a value on one thread, and want to make it available to consumers...
void setValidValue(float value, efitick_t timestamp)
efitick_t getTimeNowNt()
Definition efitime.cpp:19
static Lps25Sensor sensor(device)
SensorType
Definition sensor_type.h:18
@ BarometricPressure