From bd270720dacc638c11b5eef7b09dfc9af0f33b0a Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Tue, 7 Jun 2016 08:27:40 -0700 Subject: [PATCH] Plane: whitespace formatting --- ArduPlane/GCS_Mavlink.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ArduPlane/GCS_Mavlink.cpp b/ArduPlane/GCS_Mavlink.cpp index 9c7604e2e2..054ac23865 100644 --- a/ArduPlane/GCS_Mavlink.cpp +++ b/ArduPlane/GCS_Mavlink.cpp @@ -2112,21 +2112,22 @@ void GCS_MAVLINK_Plane::handleMessage(mavlink_message_t* msg) case MAVLINK_MSG_ID_SET_POSITION_TARGET_GLOBAL_INT: { - //Only want to allow companion computer position control when + // Only want to allow companion computer position control when // in a certain mode to avoid inadvertently sending these // kinds of commands when the autopilot is responding to problems // in modes such as RTL, CIRCLE, etc. Specifying ONLY one mode // for companion computer control is more safe (provided // one uses the FENCE_ACTION = 4 (RTL) for geofence failures). - if (plane.control_mode != GUIDED) { //don't screw up failsafes + if (plane.control_mode != GUIDED) { + //don't screw up failsafes break; } mavlink_set_position_target_global_int_t pos_target; mavlink_msg_set_position_target_global_int_decode(msg, &pos_target); - //Unexepectedly, the mask is expecting "ones" for dimensions that should - //be IGNORNED rather than INCLUDED. See mavlink documentation of the - //SET_POSITION_TARGET_GLOBAL_INT message, type_mask field. + // Unexpectedly, the mask is expecting "ones" for dimensions that should + // be IGNORNED rather than INCLUDED. See mavlink documentation of the + // SET_POSITION_TARGET_GLOBAL_INT message, type_mask field. const uint16_t alt_mask = 0b1111111111111011; // (z mask at bit 3) bool msg_valid = true;