LCOV - code coverage report
Current view: top level - AP_RangeFinder - AP_RangeFinder_Benewake.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 3 100.0 %
Date: 2026-09-09 11:02:08 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "AP_RangeFinder_config.h"
       4             : 
       5             : #if AP_RANGEFINDER_BENEWAKE_ENABLED
       6             : 
       7             : #include "AP_RangeFinder_Backend_Serial.h"
       8             : #include "AP_RangeFinder.h"
       9             : 
      10             : class AP_RangeFinder_Benewake : public AP_RangeFinder_Backend_Serial
      11             : {
      12             : 
      13             : public:
      14             : 
      15             :     using AP_RangeFinder_Backend_Serial::AP_RangeFinder_Backend_Serial;
      16             : 
      17             : protected:
      18             : 
      19        1452 :     virtual MAV_DISTANCE_SENSOR _get_mav_distance_sensor_type() const override {
      20        1452 :         return MAV_DISTANCE_SENSOR_LASER;
      21             :     }
      22             : 
      23             :     virtual float model_dist_max_cm() const = 0;
      24         689 :     virtual bool has_signal_byte() const { return false; }
      25             : 
      26             : private:
      27             : 
      28             :     // get a reading
      29             :     // distance returned in reading_m
      30             :     bool get_reading(float &reading_m) override;
      31             : 
      32             :     uint8_t linebuf[10];
      33             :     uint8_t linebuf_len;
      34             : };
      35             : 
      36             : #endif  // AP_RANGEFINDER_BENEWAKE_ENABLED

Generated by: LCOV version 1.14