Copter: ensure take-off alt is at least 1m

fixes issue #377
This commit is contained in:
Randy Mackay 2013-07-16 15:51:18 +09:00
parent 336357fbaf
commit 1dcc5886d0

View File

@ -245,6 +245,7 @@ static void do_takeoff()
// Set wp navigation target to safe altitude above current position
Vector3f pos = inertial_nav.get_position();
pos.z = max(pos.z, command_nav_queue.alt);
pos.z = max(pos.z, 100.0f);
wp_nav.set_destination(pos);
// prevent flips