LCOV - code coverage report
Current view: top level - firmware/controllers/sensors/impl - Lps25Sensor.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 3 9 33.3 %
Date: 2024-09-08 12:31:02 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /**
       2             :  * @file Lps25Sensor.cpp
       3             :  */
       4             : 
       5             : #include "pch.h"
       6             : 
       7             : #include "Lps25Sensor.h"
       8             : 
       9           1 : Lps25Sensor::Lps25Sensor(Lps25& sensor)
      10             :         : StoredValueSensor(SensorType::BarometricPressure, MS2NT(1000))
      11           1 :         , m_sensor(&sensor)
      12             : {
      13           1 : }
      14             : 
      15           0 : void Lps25Sensor::update() {
      16           0 :         auto result = m_sensor->readPressureKpa();
      17             : 
      18           0 :         if (result) {
      19           0 :                 setValidValue(result.Value, getTimeNowNt());
      20             :         } else {
      21           0 :                 invalidate();
      22             :         }
      23           0 : }

Generated by: LCOV version 1.14