Copter: auto takeoff may trigger terrain failsafe

This commit is contained in:
Randy Mackay 2022-08-19 16:52:05 +09:00
parent 6245b3aa16
commit 658298ed1d
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ void Mode::auto_takeoff_run()
// get terrain offset // get terrain offset
float terr_offset = 0.0f; float terr_offset = 0.0f;
if (auto_takeoff_terrain_alt && !wp_nav->get_terrain_offset(terr_offset)) { if (auto_takeoff_terrain_alt && !wp_nav->get_terrain_offset(terr_offset)) {
gcs().send_text(MAV_SEVERITY_CRITICAL, "auto takeoff: failed to get terrain offset"); // trigger terrain failsafe
copter.failsafe_terrain_on_event();
return; return;
} }