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

          Line data    Source code
       1             : /*
       2             :   SITL airspeed backend - a perfect airspeed sensor
       3             :  */
       4             : #pragma once
       5             : 
       6             : #include "AP_Airspeed_config.h"
       7             : 
       8             : #if AP_AIRSPEED_SITL_ENABLED
       9             : 
      10             : #include <AP_HAL/AP_HAL.h>
      11             : #include "AP_Airspeed_Backend.h"
      12             : 
      13             : class AP_Airspeed_SITL : public AP_Airspeed_Backend
      14             : {
      15             : public:
      16             : 
      17             :     using AP_Airspeed_Backend::AP_Airspeed_Backend;
      18             : 
      19           6 :     bool init(void) override {
      20           6 :         set_bus_id(AP_HAL::Device::make_bus_id(
      21             :             AP_HAL::Device::BUS_TYPE_SITL,
      22             :             0,
      23             :             0,
      24             :             uint8_t(DevType::SITL)
      25             :         ));
      26           6 :         return true;
      27             :     }
      28             : 
      29             :     // return the current differential_pressure in Pascal
      30             :     bool get_differential_pressure(float &pressure) override;
      31             : 
      32             :     // temperature not available via analog backend
      33             :     bool get_temperature(float &temperature) override;
      34             : 
      35             : private:
      36             : };
      37             : 
      38             : #endif // AP_AIRSPEED_SITL_ENABLED

Generated by: LCOV version 1.14