From 56a7e520b672d8878ba0ea6377f47b00c906a80b Mon Sep 17 00:00:00 2001
From: Peter Barker <pbarker@barker.dropbear.id.au>
Date: Thu, 20 Jun 2024 09:56:43 +1000
Subject: [PATCH] AP_Gripper: correct emitting of grabbed/released messages

these strigs would only be released if release() or grab were called a second time
---
 libraries/AP_Gripper/AP_Gripper_Servo.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libraries/AP_Gripper/AP_Gripper_Servo.cpp b/libraries/AP_Gripper/AP_Gripper_Servo.cpp
index a2d1389772..9e2ad8956a 100644
--- a/libraries/AP_Gripper/AP_Gripper_Servo.cpp
+++ b/libraries/AP_Gripper/AP_Gripper_Servo.cpp
@@ -104,8 +104,10 @@ void AP_Gripper_Servo::update_gripper()
     // Check for successful grabbed or released
     if (config.state == AP_Gripper::STATE_GRABBING && has_state_pwm(config.grab_pwm)) {
         config.state = AP_Gripper::STATE_GRABBED;
+        GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Gripper load grabbed");
     } else if (config.state == AP_Gripper::STATE_RELEASING && has_state_pwm(config.release_pwm)) {
         config.state = AP_Gripper::STATE_RELEASED;
+        GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Gripper load released");
     }
 }