LCOV - code coverage report
Current view: top level - AP_Mount - AP_Mount_Backend_Serial.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_Mount_config.h"
       2             : 
       3             : #if HAL_MOUNT_ENABLED
       4             : 
       5             : #include "AP_Mount_Backend_Serial.h"
       6             : 
       7             : #include <AP_SerialManager/AP_SerialManager.h>
       8             : 
       9             : // Default init function for every mount
      10           4 : void AP_Mount_Backend_Serial::init()
      11             : {
      12           4 :     const AP_SerialManager& serial_manager = AP::serialmanager();
      13             : 
      14             :     // search for serial port.  hild classes should check that uart is not nullptr
      15           4 :     _uart = serial_manager.find_serial(AP_SerialManager::SerialProtocol_Gimbal, _serial_instance);
      16           4 :     if (_uart == nullptr) {
      17           0 :         return;
      18             :     }
      19             : 
      20             :     // initialised successfully if uart is found
      21           4 :     _initialised = true;
      22             : 
      23             :     // call the parent class init
      24           4 :     AP_Mount_Backend::init();
      25             : }
      26             : 
      27             : #endif // HAL_MOUNT_ENABLED

Generated by: LCOV version 1.14