Copter: fix guided attitude type_mask check

This commit is contained in:
vooon 2015-10-10 21:43:43 +09:00 committed by Randy Mackay
parent a142688fea
commit f3cbbef418
1 changed files with 2 additions and 2 deletions

View File

@ -1538,8 +1538,8 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
mavlink_set_attitude_target_t packet; mavlink_set_attitude_target_t packet;
mavlink_msg_set_attitude_target_decode(msg, &packet); mavlink_msg_set_attitude_target_decode(msg, &packet);
// ensure attitude and thrust are provided // ensure type_mask specifies to use attitude and thrust
if (((packet.type_mask & (1<<6)) == 0) || ((packet.type_mask & (1<<7)) == 0)) { if ((packet.type_mask & ((1<<7)|(1<<6))) != 0) {
break; break;
} }