From f3cbbef41800d820c96a0f7bdff33d53f9fc042f Mon Sep 17 00:00:00 2001 From: vooon Date: Sat, 10 Oct 2015 21:43:43 +0900 Subject: [PATCH] Copter: fix guided attitude type_mask check --- ArduCopter/GCS_Mavlink.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopter/GCS_Mavlink.cpp b/ArduCopter/GCS_Mavlink.cpp index d9bb633c21..34d1acf1e7 100644 --- a/ArduCopter/GCS_Mavlink.cpp +++ b/ArduCopter/GCS_Mavlink.cpp @@ -1538,8 +1538,8 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) mavlink_set_attitude_target_t packet; mavlink_msg_set_attitude_target_decode(msg, &packet); - // ensure attitude and thrust are provided - if (((packet.type_mask & (1<<6)) == 0) || ((packet.type_mask & (1<<7)) == 0)) { + // ensure type_mask specifies to use attitude and thrust + if ((packet.type_mask & ((1<<7)|(1<<6))) != 0) { break; }