SITL: fixed gimbal simulator for recent MAVLink2 changes

This commit is contained in:
Andrew Tridgell 2016-06-16 10:17:28 +10:00
parent 145ab1d626
commit 027788f72b
1 changed files with 5 additions and 1 deletions

View File

@ -288,7 +288,11 @@ void Gimbal::send_report(void)
&msg, &gimbal_report);
chan0_status->current_tx_seq = saved_seq;
mav_socket.send(&msg.magic, len);
uint8_t msgbuf[len];
len = mavlink_msg_to_send_buffer(msgbuf, &msg);
if (len > 0) {
mav_socket.send(msgbuf, len);
}
delta_velocity.zero();
delta_angle.zero();