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

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <AP_Logger/LogStructure.h>
       4             : 
       5             : #include <AP_VisualOdom/AP_VisualOdom.h>
       6             : 
       7             : #if HAL_VISUALODOM_ENABLED
       8             : 
       9             : class AP_DAL_VisualOdom {
      10             : public:
      11             : 
      12             :     // return VisualOdom health
      13             :     bool healthy() const {
      14             :         return RVOH.healthy;
      15             :     }
      16             : 
      17      281270 :     bool enabled() const {
      18      281270 :         return RVOH.enabled;
      19             :     }
      20             : 
      21          20 :     uint16_t get_delay_ms() const {
      22          20 :         return RVOH.delay_ms;
      23             :     }
      24             : 
      25             :     // return a 3D vector defining the position offset of the camera in meters relative to the body frame origin
      26       26176 :     const Vector3f &get_pos_offset() const {
      27       26176 :         return RVOH.pos_offset;
      28             :     }
      29             : 
      30             :     // update position offsets to align to AHRS position
      31             :     // should only be called when this library is not being used as the position source
      32             :     void align_position_to_ahrs(bool align_xy, bool align_z);
      33             : 
      34             :     void start_frame();
      35             : 
      36             :     void handle_message(const log_RVOH &msg) {
      37             :         RVOH = msg;
      38             :     }
      39             : 
      40             : private:
      41             : 
      42             :     struct log_RVOH RVOH;
      43             : };
      44             : 
      45             : #endif // HAL_VISUALODOM_ENABLED

Generated by: LCOV version 1.14