Skip to content

Commit

Permalink
AP_Gripper: correct emitting of grabbed/released messages
Browse files Browse the repository at this point in the history
these strigs would only be released if release() or grab were called a second time
  • Loading branch information
peterbarker committed Jun 20, 2024
1 parent 3630e77 commit 56a7e52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_Gripper/AP_Gripper_Servo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down

0 comments on commit 56a7e52

Please sign in to comment.