LCOV - code coverage report
Current view: top level - AP_RangeFinder - AP_RangeFinder_Backend_I2C.cpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 6 7 85.7 %
Date: 2026-09-09 11:02:08 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include "AP_RangeFinder_Backend_I2C.h"
       2             : 
       3             : #include "AP_RangeFinder_config.h"
       4             : 
       5             : #if AP_RANGEFINDER_ENABLED
       6             : 
       7          21 : AP_RangeFinder_Backend_I2C *AP_RangeFinder_Backend_I2C::configure(AP_RangeFinder_Backend_I2C *sensor)
       8             : {
       9          21 :     if (sensor == nullptr) {
      10           0 :         return nullptr;
      11             :     }
      12             : 
      13          21 :     if (!sensor->init()) {
      14           6 :         delete sensor;
      15           6 :         return nullptr;
      16             :     }
      17             : 
      18          15 :     return sensor;
      19             : }
      20             : 
      21             : #endif  // AP_RANGEFINDER_ENABLED

Generated by: LCOV version 1.14