LCOV - code coverage report
Current view: top level - AP_Gripper - AP_Gripper_Backend.cpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 8 10 80.0 %
Date: 2026-09-09 11:02:08 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #include "AP_Gripper_Backend.h"
       2             : 
       3             : #if AP_GRIPPER_ENABLED
       4             : 
       5             : #include <AP_Math/AP_Math.h>
       6             : 
       7           8 : void AP_Gripper_Backend::init()
       8             : {
       9           8 :     init_gripper();
      10           8 : }
      11             : 
      12             : // update - should be called at at least 10hz
      13        6402 : void AP_Gripper_Backend::update()
      14             : {
      15        6402 :     update_gripper();
      16             : 
      17             :     // close the gripper again if autoclose_time > 0.0
      18        3580 :     if (config.state == AP_Gripper::STATE_RELEASED && (_last_grab_or_release > 0) &&
      19        9982 :         (is_positive(config.autoclose_time)) &&
      20           0 :         (AP_HAL::millis() - _last_grab_or_release > (config.autoclose_time * 1000.0))) {
      21           0 :         grab();
      22             :     }
      23        6402 : }
      24             : 
      25             : #endif  // AP_GRIPPER_ENABLED

Generated by: LCOV version 1.14