diff --git a/APMrover2/commands_logic.cpp b/APMrover2/commands_logic.cpp index 7e2fb54e38..4db81796a6 100644 --- a/APMrover2/commands_logic.cpp +++ b/APMrover2/commands_logic.cpp @@ -15,13 +15,13 @@ bool Rover::start_command(const AP_Mission::Mission_Command& cmd) return false; } - gcs_send_text_fmt(MAV_SEVERITY_INFO, "Executing command ID #%i",cmd.id); + gcs_send_text_fmt(MAV_SEVERITY_INFO, "Executing command ID #%i", cmd.id); // remember the course of our next navigation leg next_navigation_leg_cd = mission.get_next_ground_course_cd(0); switch (cmd.id) { - case MAV_CMD_NAV_WAYPOINT: // Navigate to Waypoint + case MAV_CMD_NAV_WAYPOINT: // Navigate to Waypoint do_nav_wp(cmd); break; @@ -161,7 +161,6 @@ Return true if we do not recognize the command so that we move on to the next co bool Rover::verify_command(const AP_Mission::Mission_Command& cmd) { switch (cmd.id) { - case MAV_CMD_NAV_WAYPOINT: return verify_nav_wp(cmd); @@ -197,11 +196,10 @@ bool Rover::verify_command(const AP_Mission::Mission_Command& cmd) default: // error message - gcs_send_text_fmt(MAV_SEVERITY_WARNING,"Skipping invalid cmd #%i",cmd.id); + gcs_send_text_fmt(MAV_SEVERITY_WARNING, "Skipping invalid cmd #%i", cmd.id); // return true if we do not recognize the command so that we move on to the next command return true; } - } /********************************************************************************/ @@ -211,7 +209,7 @@ bool Rover::verify_command(const AP_Mission::Mission_Command& cmd) void Rover::do_RTL(void) { prev_WP = current_loc; - control_mode = RTL; + control_mode = RTL; next_WP = home; } @@ -238,7 +236,7 @@ void Rover::do_loiter_unlimited(const AP_Mission::Mission_Command& cmd) { active_loiter = true; do_nav_wp(cmd); - loiter_duration = 100; // an arbitrary large loiter time + loiter_duration = 100; // an arbitrary large loiter time } // do_loiter_time - initiate loitering at a point for a given time period @@ -331,7 +329,7 @@ bool Rover::verify_nav_wp(const AP_Mission::Mission_Command& cmd) bool Rover::verify_RTL() { if (wp_distance <= g.waypoint_radius) { - gcs_send_text(MAV_SEVERITY_INFO,"Reached destination"); + gcs_send_text(MAV_SEVERITY_INFO, "Reached destination"); rtl_complete = true; return true; } @@ -413,7 +411,7 @@ void Rover::do_within_distance(const AP_Mission::Mission_Command& cmd) bool Rover::verify_wait_delay() { if ((uint32_t)(millis() - condition_start) > (uint32_t)condition_value) { - condition_value = 0; + condition_value = 0; return true; } return false;