payload_deliverer: Fix Gripper unitialized message spamming

- When the gripper was uninitialized, the error message popped up
everytime the module had 'any' vehicle command received. But we should
be spamming only when we do actually get 'DO_GRIPPER' command received,
this commit adds that feature
- Also converted error messages for CLI when gripper test functinality
fails, so that user would get a feedback (originally, the PX4_DEBUG was
of course not outputting everything)
This commit is contained in:
Junwoo Hwang
2022-09-23 07:41:51 +02:00
committed by Beat Küng
parent fdf4b668eb
commit e65d48c070
2 changed files with 29 additions and 7 deletions
@@ -101,6 +101,16 @@ private:
*/
bool initialize_gripper();
/**
* @brief Update gipper instance's state and send vehicle command ack
*
* This updates the gripper instance to check if the gripper has reached the desired state.
* And if so, it sends a vehicle command ack to the navigator.
*
* If the gripper instance isn't valid (i.e. not initialized), it doesn't do anything
*/
void gripper_update(const hrt_abstime &now);
/**
* @brief Commands the payload delivery mechanism based on the received vehicle command
*