mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
Sub: small Auto_TerrainRecover fixes
This commit is contained in:
committed by
Willian Galvani
parent
25dd465429
commit
c883e46d79
@@ -497,7 +497,7 @@ void ModeAuto::auto_terrain_recover_run()
|
||||
break;
|
||||
|
||||
case RangeFinder::Status::OutOfRangeHigh:
|
||||
target_climb_rate = sub.wp_nav.get_default_speed_down_cms();
|
||||
target_climb_rate = -sub.wp_nav.get_default_speed_down_cms();
|
||||
rangefinder_recovery_ms = 0;
|
||||
break;
|
||||
|
||||
@@ -538,6 +538,7 @@ void ModeAuto::auto_terrain_recover_run()
|
||||
#else
|
||||
gcs().send_text(MAV_SEVERITY_CRITICAL, "Terrain failsafe recovery failure: No Rangefinder!");
|
||||
sub.failsafe_terrain_act();
|
||||
return;
|
||||
#endif
|
||||
|
||||
// exit on failure (timeout)
|
||||
@@ -545,6 +546,7 @@ void ModeAuto::auto_terrain_recover_run()
|
||||
// Recovery has failed, revert to failsafe action
|
||||
gcs().send_text(MAV_SEVERITY_CRITICAL, "Terrain failsafe recovery timeout!");
|
||||
sub.failsafe_terrain_act();
|
||||
return;
|
||||
}
|
||||
|
||||
// run loiter controller
|
||||
|
||||
Reference in New Issue
Block a user