Sub: Simplify some returns logic

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2018-05-15 10:19:45 -03:00 committed by Jacob Walser
parent 8c485e1a9e
commit 5a8d04e8f5
1 changed files with 4 additions and 4 deletions

View File

@ -587,9 +587,9 @@ bool Sub::verify_nav_wp(const AP_Mission::Mission_Command& cmd)
if (((millis() - loiter_time) / 1000) >= loiter_time_max) { if (((millis() - loiter_time) / 1000) >= loiter_time_max) {
gcs().send_text(MAV_SEVERITY_INFO, "Reached command #%i",cmd.index); gcs().send_text(MAV_SEVERITY_INFO, "Reached command #%i",cmd.index);
return true; return true;
} else {
return false;
} }
return false;
} }
// verify_surface - returns true if surface procedure has been completed // verify_surface - returns true if surface procedure has been completed
@ -702,9 +702,9 @@ bool Sub::verify_spline_wp(const AP_Mission::Mission_Command& cmd)
if (((millis() - loiter_time) / 1000) >= loiter_time_max) { if (((millis() - loiter_time) / 1000) >= loiter_time_max) {
gcs().send_text(MAV_SEVERITY_INFO, "Reached command #%i",cmd.index); gcs().send_text(MAV_SEVERITY_INFO, "Reached command #%i",cmd.index);
return true; return true;
} else {
return false;
} }
return false;
} }
#if NAV_GUIDED == ENABLED #if NAV_GUIDED == ENABLED