forked from Archive/PX4-Autopilot
navigator: Feedback strings / text and logic was not consistent in previous state, fixed.
This commit is contained in:
parent
c01567c047
commit
101e7b1383
|
@ -136,14 +136,14 @@ bool MissionFeasibilityChecker::checkHomePositionAltitude(dm_item_t dm_current,
|
|||
}
|
||||
|
||||
/* calculate the global waypoint altitude */
|
||||
float wp_alt = (missionitem.altitude_is_relative) ? missionitem.altitude + home_alt ? missionitem.altitude;
|
||||
float wp_alt = (missionitem.altitude_is_relative) ? missionitem.altitude + home_alt : missionitem.altitude;
|
||||
|
||||
if (home_alt > wp_alt) {
|
||||
if (throw_error) {
|
||||
mavlink_log_critical(_mavlink_fd, "Warning: Waypoint %d below home", i);
|
||||
mavlink_log_critical(_mavlink_fd, "Rejecting Mission: Waypoint %d below home", i);
|
||||
return false;
|
||||
} else {
|
||||
mavlink_log_critical(_mavlink_fd, "Rejecting Mission: Waypoint %d below home", i);
|
||||
mavlink_log_critical(_mavlink_fd, "Warning: Waypoint %d below home", i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue