fix(payload_deliverer): zero-initialize the gripper vehicle command

The gripper command sent at boot left all fields except command, param2
and timestamp uninitialized, so from_external and the target fields held
stack garbage. UBSAN caught an invalid bool load in the COMMAND_LONG
stream.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>
This commit is contained in:
Julian Oes committed 2026-10-23 22:48:49 +02:00
1 parent ffaae36e5f
commit 75ab97e389
1 file changed
+1 -1
@@ -239,7 +239,7 @@ void PayloadDeliverer::handle_vehicle_command(const hrt_abstime &now, const veh
bool PayloadDeliverer::send_gripper_vehicle_command(const int32_t gripper_action)
{
vehicle_command_s vcmd;
vehicle_command_s vcmd{};
vcmd.timestamp = hrt_absolute_time();
vcmd.command = vehicle_command_s::VEHICLE_CMD_DO_GRIPPER;
vcmd.param2 = gripper_action;